Wednesday, September 7, 2016

Convert .mkv to .mp4

If you only want to convert mkv to mp4 then you will save quality and a lot of time by just changing the containers. Both of these are just wrappers over the same content so the cpu only needs to do a little work. Don't re encode as you will definitely lose quality


Straightforward way is

ffmpeg -i LostInTranslation.mkv -vcodec copy -acodec copy LostInTranslation.mp4


To convert all the mkv files in current directory, run a simple loop in terminal:

for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done


No encoding happens. just video codec is being converted to audio codec