[FFmpeg-devel] [PATCH] lavf/flvenc: fail in case the muxed packet is too big

wm4 nfxjfg at googlemail.com
Mon Nov 3 10:16:37 CET 2014


On Mon, 3 Nov 2014 10:05:40 +0100
Stefano Sabatini <stefasab at gmail.com> wrote:

> On date Monday 2014-11-03 01:18:05 +0100, wm4 encoded:
> > On Mon, 3 Nov 2014 00:35:58 +0100
> > Stefano Sabatini <stefasab at gmail.com> wrote:
> > 
> > > On date Monday 2014-11-03 00:32:04 +0100, Stefano Sabatini encoded:
> > > > Avoid the creation of files which cannot be successfully decoded by
> > > > ffmpeg, for example generated with:
> > > 
> > > > ffmpeg -f lavfi -i sine -af "aselect='not(between(t,100,500))',aresample=min_comp=0.001:min_hard_comp=0.100000" -acodec pcm_s16le -t 1000 -y out_audio.flv
> > > 
> 
> > > BTW I wonder if we should tweak aresample to generate smaller packets,
> > > my current workaround is to add asetnsamples after aresample.
> > 
> > Why should filter output sizes have anything to do with packet sizes?
> 
> This would avoid the need for custom asetnsamples insertions. I bet
> many more muxers miss maximum packet size checks.

Well, isn't there something that cuts the PCM into frames of the size
as needed by the encoder? So wouldn't it be rather simple to enforce
sane frame sizes for PCM? PCM packets can have an arbitrary size, but in
general small (but not too small) sizes are preferable.


More information about the ffmpeg-devel mailing list