blob: bafdfb3e11ee8d8df744f3250a503d6a91ce06ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
title: Convert all MKV files into other formats
url: convert-mkv.html
date: 2023-05-14
type: notes
draft: false
tags: [ffmpeg, mkv, webm, mp4]
---
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"' {} \;
```
|