Extract specific Video and Audio tracks using FFMPEG

Some files comes with different video and audio tracks. FFMPEG can extract specific video and audio tracks and combine them to make the output.
You can use the -map option to select specific input streams and map them to your output. The stream number starts with 0.

If you want to choose video, audio or subtitle tracks specifically, you can use stream specifiers

-i "eSourceFile" -y -s 640x360 -b:v 1024k -vcodec libx264 -r 59.94 -movflags faststart -map 0:v:0 -map 0:a:1 -pix_fmt yuv420p "eDestPath\eUUID_1.mp4"

Here, 0:v:0 is the first video stream and 0:a:1 is the second audio stream. So, the output file will be having the video from the track 1 and audio from track 2.

Add Feedback