[FFmpeg-user] Stereo AAC

Moritz Barsnick barsnick at gmx.net
Wed Apr 18 00:42:50 EEST 2018


On Mon, Apr 16, 2018 at 16:02:53 -0400, antony baxter wrote:
> I have some video files with a DTS audio stream. I'm trying to add a
> couple of additional audio streams into the file, transcoded from the
> DTS stream. My command line is:
> 
>    ffmpeg
>       -i "${input}"
>       -map 0:0
>       -map 0:1
>       -map 0:1
>       -map 0:1
>       -c:v copy
>       -movflags +faststart
>       -c:a:0 aac
>       -b:a:0 192k
>       -ac 2
>       -metadata:s:a:0 title="AAC Stereo Audio"
>       -c:a:1 ac3
>       -ac 6
>       -metadata:s:a:1 title="AC3 5.1 Audio"
>       -c:a:2 copy
>       -disposition:a -default
>       -disposition:a:0 default
>       -f mp4
>       "${output}.mp4"
> 
> However, this isn't doing exactly what I expected. The output is:
[...]
> Note that Stream #0:1 is being output as AAC 5.1 instead of AAC stereo.
> 
> How come the -ac 2 flag is being ignored - do I need to specify which
> stream this applies to, and if so how?

It's being overridden by the second "-ac" flag. Note that you can make
this more specific, and it should actually work:

  -ac:a:0 2 -ac:a:1 6 -ac:a:2 6

Moritz


More information about the ffmpeg-user mailing list