Convert all MKV files into other formats

note, May 14, 2023 on Mitja Felicijan's blog

You will need ffmpeg installed on your system. This will convert all MKV files +into WebM format.

# Convert all MKV files into WebM format.
+find ./ -name '*.mkv' -exec bash -c 'ffmpeg -i "$0" -vcodec libvpx -acodec libvorbis -cpu-used 5 -threads 8 "${0%%.mp4}.webm"' {} \;
+
# Convert all MKV files into MP4 format.
+find ./ -name '*.mkv' -exec bash -c 'ffmpeg -i "$0" c:a copy -c:v copy -cpu-used 5 -threads 8 "${0%%.mp4}.mp4"' {} \;
+