--- title: "convert .mkv to .mp4" date: 2020-06-30T16:31:35+02:00 draft: false snippet_types: ["ffmpeg"] --- Before I updated my [OBS](https://obsproject.com/) settings to record to .mp4 files I manually converted .mkv files to .mp4. This shell command does that for every recording in a directory deleting the original. ```shell $ for x in $(ls *.mkv | awk -F "." '{print $1}') ; do ffmpeg -i $x.mkv -c copy $x.mp4 && rm $x.mkv ; sleep 3; done ```