[FFmpeg-devel] [PATCH 4/4] avformat/file: increase min/max packet size to 256k for written files
Michael Niedermayer
michael at niedermayer.cc
Mon Jun 19 18:22:53 EEST 2017
On Mon, Jun 19, 2017 at 12:02:54AM +0200, Marton Balint wrote:
> Buffering more than one packet can be a huge performance improvement for
> encoding files with small packets (e.g. wav) over SMB/CIFS.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavformat/file.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavformat/file.c b/libavformat/file.c
> index 3db9cd0b9e..1d321c4205 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;
Acked-by: Michael
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170619/148f1675/attachment.sig>
More information about the ffmpeg-devel
mailing list