Command line MKV to mp4 conversion

sudo apt-get install libav-tools

sudo avconv -stats -i "/mnt/Media/Downloads/Fargo.S03E04.720p.HDTV.x264-AVS[eztv].mkv" -codec copy "/mnt/Media/Downloads/Fargo.S03E04.720p.HDTV.x264-AVS[eztv].mp4" -y

sudo find $1 -name *.mkv |
while read filename
do
	result_string="${filename/mkv/mp4}"
	sudo avconv -stats -i "$filename" -codec copy "$result_string" -y
done

./MKVConvert.sh /path/to/mkv

This website is currently having a full content audit - apologies if some of the code or content looks a bit funky!

View this post on Gitlab

You might also enjoy…

Mike Street

Written by Mike Street

Mike is a front-end developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Twitter.