Changes between Version 19 and Version 20 of Map
- Timestamp:
- May 14, 2020, 11:28:20 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Map
v19 v20 27 27 }}} 28 28 29 {{{ 30 #!div style="border: 1px solid #e5e5c7; margin: 1em; background-color: #ffd;" 31 '''Note:''' The index numbers start from 0. So the first input is !#0, second input is !#1, third input is !#2, etc. 32 }}} 33 29 34 Translation: 30 35 31 * `2` is input file !#3.32 * `v` is a [https://ffmpeg.org/ffmpeg.html#Stream-specifiers-1 stream specifier] to choose the type of stream. Other stream specifiers include`a`udio, `s`ubtitles, `d`ata, a`t`tachments.33 * `5` is video stream !#6.36 * `2` is input file index !#2. The index numbers start from 0, so this refers to the third input. 37 * `v` refers to video. This is a [https://ffmpeg.org/ffmpeg.html#Stream-specifiers-1 stream specifier] to choose the type of stream. Stream specifiers include `v`ideo, `a`udio, `s`ubtitles, `d`ata, a`t`tachments. 38 * `5` is video stream index !#5. The index numbers start from 0, so this refers to the sixth stream. 34 39 35 So `-map 2:v:5` will choose from input !#3, audio stream !#6. Note that counting starts from 0.40 So `-map 2:v:5` will choose from input index !#2, video stream index !#5. Note that counting starts from 0. 36 41 37 The stream specifier is optional and can be omitted. Example: 38 39 {{{ 40 -map 1:2 41 }}} 42 43 From input !#2 choose stream !#3. 42 The stream specifier is optional and can be omitted. For example, `-map 1:2` is interpreted as, ''from input index !#1 choose stream index !#2''. 44 43 45 44 = Examples = … … 79 78 == A specific video stream only == 80 79 81 Choose video stream !#5:80 Choose the 5th video stream: 82 81 83 82 {{{ … … 123 122 == Different outputs == 124 123 125 Video to `video.mp4`, audio !#2 to `audio_2.mp3`, audio !#3to `audio_3.wav`:124 Output video to `video.mp4`. Output audio stream index !#1 (the 2nd audio stream) to `audio_1.mp3`. Output audio stream index !#3 (the 4th audio stream) to `audio_3.wav`: 126 125 127 126 {{{ 128 ffmpeg -i input.mkv -map 0:v video.mp4 -map 0:a:1 audio_ 2.mp3 -map 0:a:2audio_3.wav127 ffmpeg -i input.mkv -map 0:v video.mp4 -map 0:a:1 audio_1.mp3 -map 0:a:3 audio_3.wav 129 128 }}} 130 129
