It’s very simple using the ffmpeg
.
To convert only one file you use the:
ffmpeg -i arquivo.mkv -codec copy arquivo.mp4
Here, you are copying the video codec and audio codec so that nothing is encoded and the quality reduced.
To convert all MKV files into the current directory, run a simple loop on the terminal:
r i in *.mkv;
do
ffmpeg -i "$i" -codec copy "${i%.*}.mp4"
done
Note: Apparently subtitles included in MKV are not converted together with MKV.
A tip, try to create an alias on Ubuntu with this loop, so when you want to convert all MKV from a folder to MP4, just enter the folder and run the alias.
Look... Thanks a lot saw! I’ll do it next time. I just had to make a manual script to make it run auto. Imagine the work.
– Sandson Costa