Changes between Version 1 and Version 2 of Map


Ignore:
Timestamp:
Oct 7, 2012, 4:05:12 PM (7 years ago)
Author:
burek
Comment:

added an example 4 how to re-encode only video streams and copy all the others

Legend:

Unmodified
Added
Removed
Modified
  • Map

    v1 v2  
    112112ffmpeg -i input.mkv -map 0:1 -map 0:2 -c copy output.mkv
    113113}}}
     114
     115== Example 4 ==
     116
     117If we want to re-encode just the video streams, but copy all the other streams (like audio, subtitles, attachments, etc), we might use something like this:
     118{{{
     119ffmpeg -i input.mkv -map 0 -c copy -c:v mpeg2video output.mkv
     120}}}
     121It will tell ffmpeg to:
     122- read the input file 'input.mkv'
     123- select all the input streams (first input = 0) to be processed (using "-map 0")
     124- mark all the streams to be just copied to the output (using "-c copy")
     125- mark just the video streams to be re-encoded (using "-c:v mpeg2video")
     126- write the output file 'output.mkv'