Reputation: 9663
What does below ffmpeg option do?
-map [v] -map [a]
and
-map 0
I have read this but still not able to understand exactly what it does and when to use them?
Upvotes: 3
Views: 4559
Reputation: 134103
The -map
option can refer to arbitrary stream labels or specific input streams.
-map [v] -map [a]
– Select the streams arbitrarily labeled v
and a
. For example, these could be the outputs of filtering:
ffmpeg -i input -filter_complex "[0:v]scale=iw/2:-1[v];[0:a]afade=d=5[a]" -map "[v]" -map "[a]" output
-map 0
– Select all streams from input 0. ffmpeg
begins counting from 0, so this is the first input; using -map 4
would refer to the fifth input. Because the default stream selection behavior only chooses one stream per stream type, using -map 0
is useful if you want to select all streams from input 0. Example:
ffmpeg -i input0 -i input1 -map 0 -map 1 output
Also see:
Upvotes: 6