diff --git a/libavformat/file.c b/libavformat/file.c
index 3db9cd0b9e409e27f048b1b54b3309f99631e17a..1d321c42050e31588a411583c4f9578254460ac0 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -229,6 +229,11 @@ static int file_open(URLContext *h, const char *filename, int flags)
 
     h->is_streamed = !fstat(fd, &st) && S_ISFIFO(st.st_mode);
 
+    /* Buffer writes more than the default 32k to improve throughput especially
+     * with networked file systems */
+    if (!h->is_streamed && flags & AVIO_FLAG_WRITE)
+        h->min_packet_size = h->max_packet_size = 262144;
+
     return 0;
 }