From 1100562e29f6476448b656dbddd4cf22505523f6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 10 Mar 2024 14:59:14 +0100 Subject: Move back to JBMAFP --- content/notes/2023-05-14-convert-mkv.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 content/notes/2023-05-14-convert-mkv.md (limited to 'content/notes/2023-05-14-convert-mkv.md') diff --git a/content/notes/2023-05-14-convert-mkv.md b/content/notes/2023-05-14-convert-mkv.md new file mode 100644 index 0000000..0aa96fd --- /dev/null +++ b/content/notes/2023-05-14-convert-mkv.md @@ -0,0 +1,21 @@ +--- +title: Convert all MKV files into other formats +url: /convert-mkv.html +date: 2023-05-14T12:00:00+02:00 +type: note +draft: false +--- + +You will need `ffmpeg` installed on your system. This will convert all MKV files +into WebM format. + +```sh +# 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"' {} \; +``` + +```sh +# 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"' {} \; +``` + -- cgit v1.2.3