I'm having a few mp4 with two audio tracks, an english one in aac and a french one in dts.

Now I want to convert only the french dts to eac3 with a single ffmpeg command.

I use

ffmpeg -hide_banner -i input.mp4 ^
             -map_metadata -1 ^
             -map 0:0 -c:v copy ^
             -map 0:1 -c:a copy ^
             -map 0:2 -c:a eac3 -b:a 1536k ^
             -metadata:s:a:0 language=eng ^
             -metadata:s:a:0 title="Stereo" ^
             -metadata:s:a:1 language=fra ^
             -metadata:s:a:1 title="Stereo" ^

This works quite nice, but it converts both audio tracks to eac3, instead of leaving the first one untouched ... What's wrong in the command?

(ffmpeg version 2023-12-23-git-f5f414d9c4-full_build-www.gyan.dev under Windows 10)

  • -map does new order of streams in output. just ffmpeg -i in -c copy -c:a:1 eac3 -b:a:1 1637k... same as in -metadata:s:a:1 Dec 31, 2023 at 6:41


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.