Forked from jamesmacwhite/ffmpeg_mkv_mp4_conversion.md
Created
March 24, 2024 08:03
-
-
Save ThorsAngerVaNeT/00e2ce7e7529e11ac18cf952e1839c70 to your computer and use it in GitHub Desktop.
Easy way to convert MKV to MP4 with ffmpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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