[FFmpeg-user] Why does this command produce different size segments depending on the input?

Moritz Barsnick barsnick at gmx.net
Thu Mar 17 17:07:54 CET 2016

On Wed, Mar 16, 2016 at 16:15:05 -0600, Grant Curtis wrote:
> However, when I try the same command on a file, as opposed to a live
> stream, I get chunks of variable file sizes.

I can't reproduce this with any of the audio streams I have available.
Perhaps you need to provide a sample file. (I don't know the source
enough yet to be able to understand whether this should be happening or

> Here is the command and the output when it produces an undesirable file
> size:

>     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default)

> For reference, here is the output when an rtmp stream is used as an input:

>     Stream #0:1: Audio: mp3, 22050 Hz, mono, s16p, 49 kb/s

I need to point out that mono and stereo inputs will result in
differing sample sizes. If you want to keep the two comparable, you
need to add "-ac 1" to the command lines.

Do you happen to be using an input file where the channel layout
changes during time? That would be a cause. I'm not sure the mp4
container allows that though (MPEG-TS does).


More information about the ffmpeg-user mailing list