I have MKV file which contains:
Stream #0:0(eng): Video: h264 (High)
Stream #0:1(pol): Audio: ac3
Stream #0:2(eng): Audio: dts (DTS)
Stream #0:3(pol): Subtitle: subrip
Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
I would like to omit subtitles (-sn
option), copy video and encode audio streams to AAC.
I tried few various command and output file is always the same (2 audio streams but in both sound from first audio stream).
Here are my commands:
ffmpeg -i input.mkv -sn -map 0:a? -map 0:v -c:v copy -c:a? aac output.mp4
ffmpeg -i input.mkv -sn -map 0 -c:v copy -c:a aac output.mp4
ffmpeg -i input.mkv -sn -map 0:? -c:v copy -c:a aac output.mp4
Everything almost work but in output file I have 2 audio streams with name (pol) and (eng) but in both is sound from (pol) stream0:1.
What command should I use to convert audio streams in order to achieve two a audio streams where will be pol and eng sound (not pol in both of them). Sometimes input file has only 1 audio stream so to command line should be universal, I guess ffmpeg map with ?
character.