From 4abcce013c9ee3053badf2abda77190233066676 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 23 Feb 2024 10:35:22 +0100 Subject: Testing thoughts page --- _posts/notes/2023-05-14-convert-mkv.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 _posts/notes/2023-05-14-convert-mkv.md (limited to '_posts/notes/2023-05-14-convert-mkv.md') diff --git a/_posts/notes/2023-05-14-convert-mkv.md b/_posts/notes/2023-05-14-convert-mkv.md new file mode 100644 index 0000000..7cc6189 --- /dev/null +++ b/_posts/notes/2023-05-14-convert-mkv.md @@ -0,0 +1,23 @@ +--- +title: Convert all MKV files into other formats +permalink: /convert-mkv.html +date: 2023-05-14T12:00:00+02:00 +layout: post +type: note +draft: false +tags: [ffmpeg] +--- + +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