Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ThorsAngerVaNeT/00e2ce7e7529e11ac18cf952e1839c70 to your computer and use it in GitHub Desktop.
Save ThorsAngerVaNeT/00e2ce7e7529e11ac18cf952e1839c70 to your computer and use it in GitHub Desktop.
Easy way to convert MKV to MP4 with ffmpeg
# Converting mkv to mp4 with ffmpeg
# Basically just copy video and audio stream as is into a new container, no funny business
# Single file conversion example
ffmpeg -i example.mkv -vcodec copy -acodec copy example.mp4
# Multiple file conversion (cd into directory containing mkv files and run the following)
# Unix one-liner example
for i in *mkv; do ffmpeg -i "$i" -vcodec copy -acodec copy "${i%.mkv}.mp4"; done
# Windows one-liner example
for %i IN (*.mkv) DO ffmpeg -i "%i" -vcodec copy -acodec copy "%i.mp4"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment