From 2417a6b7603524dc5cd30d29b153f91024b9443d Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 1 Nov 2023 22:54:27 +0100 Subject: Move to Jekyll --- _posts/2023-05-14-convert-mkv.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 _posts/2023-05-14-convert-mkv.md (limited to '_posts/2023-05-14-convert-mkv.md') diff --git a/_posts/2023-05-14-convert-mkv.md b/_posts/2023-05-14-convert-mkv.md new file mode 100644 index 0000000..7cc6189 --- /dev/null +++ b/_posts/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