ab-av1
ab-av1 copied to clipboard
Question about how to handle multi channel audio
Hello,
I noticed that when specifying --acodec but leaving --downmix-to-stereo out, audio is converted, however channels are not kept in same order as they were, leading to L C R becoming L R C sometimes.
This applies to DTS mainly.
Would it be possible to add a check for this? To keep the same order of L, R, C etc?
Or should I just downmix?
Cheers!
We're mostly just relying on ffmpeg to do its thing with audio. So we inherit the default behaviour. I'm not sure why this would be the default behaviour of ffmpeg though.
Related: You can configure more ffmpeg audio options using --enc
. You can also just copy the audio and deal with it directly in ffmpeg (or something else) later.
I remember this was a thing with libopus. The channels are not 1:1 the same, so telling 5.1 or 7.1 explicit should help. Googling for libopus multichannel 5.1 should give more details.
Try --acodec libopus --enc af=aformat=channel_layouts="7.1|5.1"
or use copy/default on the first run and then afterwards directly with ffmpeg ffmpeg -i myfile.mkv -vcodec copy -map 0 -c:a libopus -af aformat=channel_layouts="7.1|5.1|stereo" myfileoutput.mkv
Or use for faster comparing/results only the audio track (first in this example) and mux it later: ffmpeg -i myfile.mkv -map 0:a:0 -af aformat=channel_layouts="7.1|5.1|stereo" myfileaudiotrack1.opus
(typed from my memory, don't use it blindly)
6channels will get default 320kbps, stereo 96kbps and 8channels even more, but overall it is enough to be transparent.