Changes between Version 19 and Version 20 of Map


Ignore:
Timestamp:
May 14, 2020, 11:28:20 PM (7 years ago)
Author:
llogan
Comment:

typos. clarify counting from 0.

Legend:

Unmodified
Added
Removed
Modified
  • Map

    v19 v20  
    2727}}}
    2828
     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
    2934Translation:
    3035
    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.
    3439
    35 So `-map 2:v:5` will choose from input !#3, audio stream !#6. Note that counting starts from 0.
     40So `-map 2:v:5` will choose from input index !#2, video stream index !#5. Note that counting starts from 0.
    3641
    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.
     42The stream specifier is optional and can be omitted. For example, `-map 1:2` is interpreted as, ''from input index !#1 choose stream index !#2''.
    4443
    4544= Examples =
    … …  
    7978== A specific video stream only ==
    8079
    81 Choose video stream !#5:
     80Choose the 5th video stream:
    8281
    8382{{{
    … …  
    123122== Different outputs ==
    124123
    125 Video to `video.mp4`, audio !#2 to `audio_2.mp3`, audio !#3 to `audio_3.wav`:
     124Output 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`:
    126125
    127126{{{
    128 ffmpeg -i input.mkv -map 0:v video.mp4 -map 0:a:1 audio_2.mp3 -map 0:a:2 audio_3.wav
     127ffmpeg -i input.mkv -map 0:v video.mp4 -map 0:a:1 audio_1.mp3 -map 0:a:3 audio_3.wav
    129128}}}
    130129