Changes between Version 5 and Version 6 of Map


Ignore:
Timestamp:
Dec 30, 2015, 2:20:30 PM (2 years ago)
Author:
rogerdpack
Comment:

more examples

Legend:

Unmodified
Added
Removed
Modified
  • Map

    v5 v6  
    140140- mark just the video streams to be re-encoded (using "-c:v mpeg2video") 
    141141- write the output file 'output.mkv' 
     142 
     143== Example 5 == 
     144You can use the "-map" command in creating multiple output files, ex: 
     145{{{ 
     146ffmpeg -i input.mkv -map 0:1 -map 0:2 audios_only.mkv -map 0:0 video_only.mkv 
     147}}} 
     148 
     149The default is to map the "highest quality video" and "highest quality audio" to each output file (basically reuses it for each output), see also [[Creating multiple outputs]]. 
     150 
     151== Example 6 == 
     152You can use the named output of a filtergraph as a mapping parameter, ex: 
     153{{{ 
     154ffmpeg -i INPUT -filter_complex "[0] scale=100x100[smaller_sized]"  -map "[smaller_sized]" out.mp4 
     155}}} 
     156which (in our example) is the same as specifying the stream more precisely, and equivalent to this 
     157{{{ 
     158ffmpeg -i INPUT -filter_complex "[0:0] scale=100x100[smaller_sized]"  -map "[smaller_sized]" out.mp4 
     159}}} 
     160 
     161== Example 7 == 
     162 
     163There are stream selection shortcuts you can also use like "0:v" 
     164{{{ 
     165ffmpeg -i input -map 0:v -map 0:a output.mkv # chooses video and audio from input 0 
     166}}} 
     167See [http://ffmpeg.org/ffmpeg.html#Stream-specifiers stream specifiers] for details.