From 51ca7a4200bb702f0550f051e8f69b0bf0c8669a Mon Sep 17 00:00:00 2001 From: kfrn Date: Fri, 2 Aug 2019 19:25:27 +1200 Subject: [PATCH] Revert "Add note to Stream Mapping entry about mapping with a failsafe" This reverts commit 76c3fe1f885440fa2516cccfa5d0374568f08ecd. --- index.html | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.html b/index.html index d5e7c37..fb6c486 100644 --- a/index.html +++ b/index.html @@ -178,13 +178,8 @@
  • -map 0:0 -map 0:2 means ‘take the first and third streams from the first input file’.
  • -map 0:1 -map 1:0 means ‘take the second stream from the first input file and the first stream from the second input file’.
  • -

    When no mapping is specified in an ffmpeg command, the default for video files is to take just one video and one audio stream for the output: other stream types, such as timecode or subtitles, will not be copied to the output file by default. If multiple video or audio streams are present, the best quality one is automatically selected by FFmpeg.

    To map all streams in the input file to the output file, use -map 0. However, note that not all container formats can include all stream types: for example, .mp4 cannot contain timecode.

    - -

    Mapping with a failsafe

    -

    To safely process files that may or may not contain given a type of stream, you can add a trailing ? to your map commands: for example, -map 0:a? instead of -map 0:a.

    -

    This means that audio streams will be mapped over if they are present in the file—but if the file contains no audio streams, the transcode will precede as usual, minus the audio stream mapping. Without adding the trailing ?, FFmpeg will skip over files which don't contain an audio track.

    -

    This is especially recommended when batch processing video files: it ensures that all files in your batch will be transcoded, whether or not they contain audio streams.

    +

    When no mapping is specified in an ffmpeg command, the default for video files is to take just one video and one audio stream for the output: other stream types, such as timecode or subtitles, will not be copied to the output file by default. If multiple video or audio streams are present, the best quality one is automatically selected by FFmpeg.

    For more information, check out the FFmpeg wiki Map page, and the official FFmpeg documentation on -map.