[FFmpeg-user] Concatenating grows file size

Cecil Westerhof Cecil at decebal.nl
Wed Nov 20 15:49:23 EET 2019


Moritz Barsnick <barsnick at gmx.net> writes:

> 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.

Because the '-c copy' I did not expect that, but I do not have to
worry then.

Also, in the past I had another camera which produce MP4 files and I
think there the sizes stayed the same, but I am not sure.


> 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.

Was just wondering if something went wrong. But that is not the case.
What I get is OK. Later I will look in the options you mentioned.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list