From cd6644ea4ddc78597934ab0ef5ba50e3c3daa927 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sat, 8 Jul 2023 23:25:41 +0200 Subject: Moved to a simpler SSG --- content/convert-mkv.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 content/convert-mkv.md (limited to 'content/convert-mkv.md') diff --git a/content/convert-mkv.md b/content/convert-mkv.md new file mode 100644 index 0000000..2219eed --- /dev/null +++ b/content/convert-mkv.md @@ -0,0 +1,22 @@ +--- +title: Convert all MKV files into other formats +url: convert-mkv.html +date: 2023-05-14T12:00:00+02:00 +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