


Accessing the audio from follows the same pattern with the :a. The volume filter is applied to, the audio in input2.mp4, and a new virtual stream,, must be created for -map to set the new audio in the output. In this example, the output will have the video input1.mp4 and the audio from input2.mp4 with a volume increase of 10dB for the output result: $ ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "volume=10dB" -map 0:v -map :a -shortest output.mp4 In the case of two inputs with a filter, the syntax is a little different. In this example, the video (v) from input1.mp4 (index 0) is selected for output while the audio (a) from input2.mp4 (index 1) is selected for output: $ ffmpeg -i input1.mp4 -i input2.mp4 -map 0:v -map 1:a -shortest output.mp4 In examples where multiple inputs are available, the use of -map is specific on what the output will include. Normally, a map isn’t required to set an output as the result audio and video is known: $ ffmpeg -i input.mp4 output.mp4 In addition, virtual streams can be created to apply complex manipulations which can be accessed with -map. The -map functionality is an advanced feature that allows the user to select specific input audio or video that is sent to the output.
