[FFmpeg-user] Concatenating grows file size

Moritz Barsnick barsnick at gmx.net
Wed Nov 20 14:49:31 EET 2019


On Wed, Nov 20, 2019 at 11:54:43 +0100, Cecil Westerhof wrote:
>     ffmpeg -f concat -safe 0 -i <(echo "${files}") -c copy ${newFile}.mts
>
> I would expect the resulting file to have the same size as the
> original files, but the size grows. The input files are together
> 10.6 GB while the concatenated file is 10.9 GB. That is 3% extra. Is
> this normal, or am I doing something wrong?

That is probably to be expected. What ffmpeg does is to remux your
streams. ffmpeg's MPEG-TS muxer may not be as efficient as the
original, and/or have other options, leading to a differing size.

Does the suffix .mts imply the M2TS format? If so, you may need to
specify "-mpegts_m2ts_mode 1" to achieve this, which will make the
muxer operate differently. You can also check out other available
options with "ffmpeg -h muxer=mpegts". But I suppose you should just
accept that the difference is expected, if that's okay for you.

Cheers,
Moritz


More information about the ffmpeg-user mailing list