[FFmpeg-user] File size doubles with MKV to MP4 re-encoding?

Sven C. Dack sven.c.dack at sky.com
Mon Oct 17 00:12:36 EEST 2016

On 15/10/16 22:54, Ana B. wrote:
> Hello! I am trying to* re-encode MKV files into MP4 *and am getting pretty
> desperate. FFMPEG changes my files to MP4 format, with the same quality
> intact, but *the file size nearly doubles* with every conversion. (I don't
> know if this is helpful, but using conversion programs like HandBrake
> yields the same results: same quality but double the size of the original
> MKV.) This is taking up a lot of GB on my laptop, but I absolutely need the
> MP4 container to play my videos in Sony Vegas.
> Here is the code that I run:
> ffmpeg -i input.mkv -c:v libx264 output.mp4
> Why is the file size doubling? Is there anything I can do to prevent this
> or do you have any other suggestions? I seriously appreciate any help, *thank
> you so much*!!
> _______________________________________________

If you know your input has got compatible streams then you can do:

$ ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4

Otherwise will you have to set either a bit rate or a fixed quality for the 
transcoding and thereby control the output size. This means you will also lose a 
bit in quality, because of another lossy compression. Why do you need the video 
in an .mp4 container format?


More information about the ffmpeg-user mailing list