FFMPEG logo Quite a handy line of code to keep from having to transcode each file. Even if done in batch, transcoding is more time consuming as well as resource intensive then just converting it (switching containers).

Once you have FFMPEG installed, you run this one line of code.

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

This command will do the following:

  • Convert the file from .mkv to .mp4
  • Retain the original audio and video codec
  • Retain the original file name

© 2017. All Rights Reserved.

Proudly published with Ghost