opus icon indicating copy to clipboard operation
opus copied to clipboard

Libopus does not encode 5.1ch(side) / data loss when encoding from 5.1 ch -> 5.1(side) ch

Open solomoncyj opened this issue 7 months ago • 0 comments

wehn encoding a file with 5.1(side) ch with the channel layout C L R Ls Rs LFE to normal 5.1ch L R C Lb Rb LFE via fmpeg, with the command

 ffmpeg -i out.dts -c:a libopus -b:a 160k  -af "channelmap=channel_layout=5.1(side)"  out.opus

the following errors are produced:

[libopus @ 0x561fbbfb0740] Invalid channel layout 5.1(side) for specified mapping family -1.
[aost#0:0/libopus @ 0x561fbbfb0480] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Error while filtering: Invalid argument
[out#0/opus @ 0x561fbbfad6c0] Nothing was written into output file, because at least one of its streams received no packets.

if the following command is issued however, the encode would be successful, however, no sound would be played when playing the file in vlc. libopus should ensure that channels are properly mapped during transcoding

fmpeg -i out.dts -c:a libopus -b:a 160k -af "channelmap=channel_layout=5.1" out.opus

solomoncyj avatar Jul 09 '24 11:07 solomoncyj