mirror of
https://gist.github.com/1f8fdd96ead3829465897e413188190a.git
synced 2025-06-29 17:21:07 +00:00
This commit is contained in:
parent
b235ce2756
commit
7866b741bb
@ -5,10 +5,9 @@ Full documentation: https://ffmpeg.org/ffmpeg.html
|
||||
```
|
||||
ffmpeg -i input.mkv
|
||||
```
|
||||
|
||||
track indexes are zero-based.
|
||||
|
||||
### Types
|
||||
### Track types
|
||||
```
|
||||
v - video
|
||||
a - audio
|
||||
@ -19,12 +18,12 @@ m - metadata
|
||||
```
|
||||
---
|
||||
### Pick tracks
|
||||
syntax
|
||||
#### syntax
|
||||
```
|
||||
ffmpeg -i input.mkv -map 0:type -map 0:type -c copy output.mkv
|
||||
ffmpeg -i input.mkv -map 0:type:index -map 0:type:index -c copy output.mkv
|
||||
```
|
||||
#### examples:
|
||||
#### examples
|
||||
pick all video tracks, second audio track and third subtitle track:
|
||||
```
|
||||
ffmpeg -i input.mkv -map 0:v -map 0:a:1 -map 0:s:2 -c copy output.mkv
|
||||
@ -35,18 +34,18 @@ ffmpeg -i "$i" -map 0:v:0 -map 0:a:0 -map 0:s:0 -map 0:t -c copy
|
||||
```
|
||||
---
|
||||
### Omit tracks (negative mapping)
|
||||
syntax
|
||||
#### syntax
|
||||
```
|
||||
ffmpeg -i input.mkv -map 0 -map -0:type:index -c output.mkv
|
||||
```
|
||||
#### examples:
|
||||
#### examples
|
||||
keep all tracks except first audio and first subtitle tracks:
|
||||
```
|
||||
ffmpeg -i input.mkv -map 0 -map -0:a:0 -map -0:s:0 -c output.mkv
|
||||
```
|
||||
---
|
||||
### Extract subtitle track
|
||||
syntax
|
||||
#### syntax
|
||||
```
|
||||
ffmpeg -i input.mkv -map 0:m:key:value -c:s copy|format output.srt
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user