Version: StaxRip 2.1.4.8 Beta
Using Opus codec with no additional parameters on a DTS-HD MA 5.1 channel audio track yields an error:
[libopus @ 0000017c89ba6880] Invalid channel layout 5.1(side) for specified mapping family -1.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
This can be fixed by manually specifying it by saying -af "channelmap=channel_layout=5.1", but this shouldn't be necessary. I think it may be due to the recent changes committed by Patman.
For clarification: StaxRip 2.1.4.4 Beta works with the same parameters, because it implements -ac 6 in the command line. It appears that removing the checks in commit 99dd7d0f3a857dbb2b9a607db41d810820ee06ce causes it to fail.
This is very old ffMpeg bug with certain channels layout (eg.side). With ffMpeg default mapping family -1 , LibOpus efficiency is ~30% off. All multichannels & LFE optimizations are disabled , basically all features since Opus v1.1 are missing. https://hydrogenaud.io/index.php?topic=117698.0, https://trac.ffmpeg.org/ticket/5718 , https://trac.ffmpeg.org/ticket/5759 Workaround is using mapping family 0 or 1 while fiddling with -AC number settings, or use better encoder. Reference Opus encoder (Opus tools) CLI works like a charm . I already added this one to Staxrip as GUI encoder, will try to commit this
Gotcha. I'll plan to use the new Opus encoder once it is committed and released.
Most helpful comment
This is very old ffMpeg bug with certain channels layout (eg.side). With ffMpeg default mapping family -1 , LibOpus efficiency is ~30% off. All multichannels & LFE optimizations are disabled , basically all features since Opus v1.1 are missing. https://hydrogenaud.io/index.php?topic=117698.0, https://trac.ffmpeg.org/ticket/5718 , https://trac.ffmpeg.org/ticket/5759 Workaround is using mapping family 0 or 1 while fiddling with -AC number settings, or use better encoder. Reference Opus encoder (Opus tools) CLI works like a charm . I already added this one to Staxrip as GUI encoder, will try to commit this