
-disposition:a:0 default: This sets our required audio stream (English) as the default. -c copy: Copy the video, audio and subtitle streams with no re-encoding. -map 0:s: Select all of the subtitle files. English is of course specified first and is stream 2. The final digit of each 'set' selects from the 4 audio streams with '0' being the first stream and '3' being the final audio stream. -map 0:a:1 -map 0:a:0 -map 0:a:2 -map 0:a:3: The audio streams are individually placed. -map 0:v:0: The first (and only) video stream is selected. Best syntax for this is arguably: ffmpeg -i input.mkv -map 0:v:0 \ The ordering of the audio streams can be accomplished using FFmpeg's map and disposition options. Stream #0:4(jpn): Audio: opus, 48000 Hz, stereo, fltp
Stream #0:3(eng): Audio: opus, 48000 Hz, stereo, fltp Stream #0:2(spa): Audio: opus, 48000 Hz, stereo, fltp Stream #0:1(por): Audio: opus, 48000 Hz, stereo, fltp (default) _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_WRITING_APP-eng: mkvmerge v45.0.0 ('Heaven') 64-bit The information about the video is as follows: Input #0, matroska,webm, from 'input.mkv':Įncoder : libebml v1.3.10 + libmatroska v1.5.2ĭuration: 00:26:36.85, start: -0.007000, bitrate: 2157 kb/s
The video contains 4 Audio Tracks: Portuguese (Default), Spanish, English and Japanese. I want to change the default audio track from Portuguese to English in the file input.mkv.