Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels? (Read 3882 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

When Opus compresses 5.1 and 7.1 channels, the set bit rate is used for all channels.
Some past compression formats use 2.0 channels as a benchmark to calculate the total bit rate required to compress 5.1 channels and 7.1 channels.
Why is there such a change?

The highest bit rate of Opus is 512kb, the bit rate of mono is 85kb in 5.1 channel, and the bit rate of mono in 7.1 channel is 64kb.
From the experience of 2.0 channel, the bit rate assigned to mono channel is low.
When multi-channel, the upper limit can only be 512kb, so is it meaningless to have a higher bit rate for mono?

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #1
The upper limit is 256kbps for each channel, not 512kbps total.

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #2
The upper limit is 256kbps for each channel, not 512kbps total.

The upper limit of the mono channel you mentioned is only valid when the 2.0 channel is used.


Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #4
If you use opusenc, the bitrate is limited to 256kbps per channel for any number of channels.

I use foobar2000 Free Encoder Pack,
Set VBR 512 kbps music,
Compress 5.1 and 2.0 channels of the same movie,
The size of the 5.1-channel alac format is 2.93 GB,
The size of the 2.0-channel alac format is 1.17 GB,
Compressed result:
5.1 channel is 350 MB,
2.0 channel is 392 MB,
After compression, the size of 5.1 channel is smaller than that of 2.0 channel, so I wonder if the bit rate of mono channel may not be enough.

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #5
You asked for 512kbps and you got 512kbps. If you want more, set it to more. The maximum bitrate for 5.1 channels is 1536kbps.

You probably don't need such high bitrates.

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #6
You asked for 512kbps and you got 512kbps. If you want more, set it to more. The maximum bitrate for 5.1 channels is 1536kbps.



You probably don't need such high bitrates.

The official website says Bitrates from 6 kb/s to 510 kb/s
https://opus-codec.org/


The maximum value that foobar2000 can set is 512kb。


You said The maximum bitrate for 5.1 channels is 1536kbps.


very confusing information。

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #7
https://opus-codec.org/docs/opus-tools/opusenc.html#Encoding_options
Quote
Encoding options
--bitrate N    Set target bitrate in kbit/s (6–256 per channel).
                     In VBR mode this specifies the average rate for a large and diverse collection of audio. In CVBR and Hard-CBR mode it specifies the specific output bitrate.

max
2 * 256 = 512  (2.0)
6 * 256 = 1536 (5.1)
8 * 256 = 2048 (7.1)

Quote
The maximum value that foobar2000 can set is 512kb。
So then don't use that preset. Create a 'custom' preset for opus multichannel.
The below is set at 720 (I'm not recommending 720. This is just an example above 512. You can try 1536 if you want.)
6 * 120 = 720 (5.1)
8 *  90 = 720 (7.1)

korth

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #8
the bit rate of mono is 85kb in 5.1 channel, and the bit rate of mono in 7.1 channel is 64kb.

Others have mentioned the "per channel" problem in your calculation, so here's the other issue: Opus doesn't do multi-mono surround. That's wasteful and less tolerant of phase errors. Opus does paired M/S stereo (with a adjustable weight factor) substreams. It distributes bitrate equally initially among substreams, plus some crumbs for LFE (well it's low-frequency effects, not much stuff in there). So in the 5.1 case, LF+RF gets a slice, C gets a slice, LR+RR gets a slice, and LFE gets some crumbs to start with. Each slice would be ~82 Kbps for 256 Kbps total.

Then the fancy tools come in. Stereo saving checks if you have a stereo image, and takes away bits. Surround masking checks if Opus can get away with herding some bands away from a sub stream without you noticing (under the important assumption that you are doing surround sound with real loudspeakers!), and it takes away bits. The tonality detection looks for tonal sounds (a known weakness of Opus) and adds bits.

The result, as alleged by the Xiph people, is that you can get away with 128 - 256 Kbps on 5.1 and 256 - 450 on 7.1.



Assuming no "fancy tools" appear in the bitrate adjustment chain, the bitrate required to get the same quality as 128 Kbps stereo with 5.1 is just 3 * 128 + 16 = 400 Kbps: 3 substreams, and an arbitrary 16 Kbps assigned to the LFE. This estimate is very conservative because (1) masking exists (2) LFE typically takes just 4-8 (3) C channel usually takes half as much as a paired stereo channel, not one whole slice. A better estimate is probably 2.5 * 128 + 8 = 328 Kbps -- still not taking into account masking.

Similarly, a very conservative estimate for 128-quality 7.1 is 4 * 128 + 16 = 528 Kbps, while the "better" guess is 3.5 * 128 + 8 = 456 Kbps.

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #9
Similarly, a very conservative estimate for 128-quality 7.1 is 4 * 128 + 16 = 528 Kbps, while the "better" guess is 3.5 * 128 + 8 = 456 Kbps.

I used to do opus 5.1 @ 256 kbps thinking it's more than enough. Good to know.


Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #11
https://hydrogenaud.io/index.php/topic,120007.msg997612.html#msg997612
Here's a good formula for surround sound using opus.

Wow. It's hillariously simple, but somehow makes sense. Kudos to that.
[ul]
  • The ^0.75 power looks like a pretty reasonable estimate of surround masking -- compared to the base case of ^1 (no masking).
  • With writing "5.1" as, well, the decimal number 5.1, it basically does an LFE estimate by counting it as one-tenth of a channel.
[/ul]

Re: Is the bitrate enough for Opus to compress 5.1 and 7.1 channels?

Reply #12

Assuming no "fancy tools" appear in the bitrate adjustment chain, the bitrate required to get the same quality as 128 Kbps stereo with 5.1 is just 3 * 128 + 16 = 400 Kbps: 3 substreams, and an arbitrary 16 Kbps assigned to the LFE. This estimate is very conservative because (1) masking exists (2) LFE typically takes just 4-8 (3) C channel usually takes half as much as a paired stereo channel, not one whole slice. A better estimate is probably 2.5 * 128 + 8 = 328 Kbps -- still not taking into account masking.

Similarly, a very conservative estimate for 128-quality 7.1 is 4 * 128 + 16 = 528 Kbps, while the "better" guess is 3.5 * 128 + 8 = 456 Kbps.


Opus is optimized for 5.1 channel and 7.1 channel standards, but these standards may change in the future, and there is no guarantee that the future or some niche art will use 6 channels and 8 channels in a standard way, if there is a non-existing standard channel use method, such as: There are two or more bass channels in the 6 channels, and for example: the speaker layout is not symmetrical, and these are not the current standard cases, Opus may make mistakes.