IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Questions about VBR Opus
YellowOnion
post Aug 1 2014, 13:35
Post #1





Group: Members
Posts: 35
Joined: 9-April 12
Member No.: 98589



I'm curious about Opus VBR mode, every thing I throw at it, the bitrate tends around my target bitrate very tightly +-5%, unlike say vorbis or lame which wildly fluctuate, 'ball park' style bitrates.


Here is an extreme example:

CODE
sox.exe -n -t sox - synth 30 brownnoise brownnoise gain -3 lowpass 180 | ffmpeg -f sox -i - -q:a 10 -y output.ogg


This generates 30 seconds of brownnoise with a lowpass filter over the top, sounds like the warp engine of the Enterprise.

Basically Ogg vorbis at quality 10, nominal 500kbps~, but the actual output is only 183.8kbps because of the simplicity of the audio sample.

Opus on the other hand:
CODE
sox.exe -n -t sox - synth 30 brownnoise brownnoise gain -3 lowpass 180 | ffmpeg -f sox -i - -b:a 510k -vbr on -y output.opus


The output is 499.2kbps, this is not exactly what I expected vbr mode to do.

too me this looks like ABR, does Opus' VBR just need more time to mature?
Go to the top of the page
+Quote Post
lithopsian
post Aug 1 2014, 14:53
Post #2





Group: Members
Posts: 255
Joined: 27-February 14
Member No.: 114718



Opus VBR varies as expected for me. Probably an ffmpeg issue. What version of libopus do you have? Have you tried with opusenc? libopus 1.1 supports unconstraint VBR (-vbr), constrained VBR (-cbr), and CBR (--hard-cbr). Older versions did not support true unconstrained VBR.
Go to the top of the page
+Quote Post
Octocontrabass
post Aug 1 2014, 20:56
Post #3





Group: Members
Posts: 66
Joined: 9-September 13
Member No.: 110004



QUOTE (YellowOnion @ Aug 1 2014, 05:35) *
CODE
-b:a 510k
Opus has a hard limit of about 510kbps for stereo audio, which impedes the VBR algorithm. You need to use a much lower bitrate (with the latest libopus) to see the full effect.
Go to the top of the page
+Quote Post
YellowOnion
post Aug 3 2014, 18:25
Post #4





Group: Members
Posts: 35
Joined: 9-April 12
Member No.: 98589



QUOTE (lithopsian @ Aug 2 2014, 01:53) *
Opus VBR varies as expected for me. Probably an ffmpeg issue. What version of libopus do you have? Have you tried with opusenc? libopus 1.1 supports unconstraint VBR (-vbr), constrained VBR (-cbr), and CBR (--hard-cbr). Older versions did not support true unconstrained VBR.


opusenc does the same thing, at least on my specific example, I tried running a movie soundtrack through opusenc and got a bitrate of about 60kbps for 64kbps, but the 'instant bitrates' were 30-130kbps, Still find it odd that it allocates so much to such a similar sample.
Go to the top of the page
+Quote Post
saratoga
post Aug 3 2014, 20:43
Post #5





Group: Members
Posts: 5147
Joined: 2-September 02
Member No.: 3264



QUOTE (YellowOnion @ Aug 3 2014, 13:25) *
QUOTE (lithopsian @ Aug 2 2014, 01:53) *
Opus VBR varies as expected for me. Probably an ffmpeg issue. What version of libopus do you have? Have you tried with opusenc? libopus 1.1 supports unconstraint VBR (-vbr), constrained VBR (-cbr), and CBR (--hard-cbr). Older versions did not support true unconstrained VBR.


opusenc does the same thing, at least on my specific example, I tried running a movie soundtrack through opusenc and got a bitrate of about 60kbps for 64kbps, but the 'instant bitrates' were 30-130kbps, Still find it odd that it allocates so much to such a similar sample.


By "similar sample" you mean brown noise? I wouldn't call noise very similar to a movie sound track at all. Noise has very high entropy.
Go to the top of the page
+Quote Post
Octocontrabass
post Aug 4 2014, 01:25
Post #6





Group: Members
Posts: 66
Joined: 9-September 13
Member No.: 110004



Opus is not at all like Vorbis, so it's no surprise that the VBR behavior differs between the two. Try encoding something else, you might be surprised by the results.

Here's a graph of the bitrates of each track from two CDs encoded at a target bitrate of 64kbps. I chose these CDs specifically for their variety of genres, so these results might be exaggerated somewhat. However, it should be apparent that there is (almost?) no correlation between the VBR behaviors of these codecs.



(Bonus if you can guess what type of music the top-left point represents.)
Go to the top of the page
+Quote Post
IgorC
post Aug 4 2014, 01:54
Post #7





Group: Members
Posts: 1580
Joined: 3-January 05
From: ARG/RUS
Member No.: 18803



QUOTE (Octocontrabass @ Aug 3 2014, 21:25) *
(Bonus if you can guess what type of music the top-left point represents.)

Classic or some 8 bit computer game music tongue.gif

While Opus has some similarity with AAC and Vorbis it also has come important differences. Even two encoders of the same format can have different VBR approaches.

This post has been edited by IgorC: Aug 4 2014, 02:28
Go to the top of the page
+Quote Post
yourlord
post Aug 4 2014, 19:03
Post #8





Group: Members
Posts: 249
Joined: 1-March 11
Member No.: 88621



Vegetarian Progressive Metal?
Go to the top of the page
+Quote Post
Octocontrabass
post Aug 4 2014, 20:26
Post #9





Group: Members
Posts: 66
Joined: 9-September 13
Member No.: 110004



QUOTE (IgorC @ Aug 3 2014, 17:54) *
Classic or some 8 bit computer game music tongue.gif
That's right! (Close examination suggests that it was produced with an emulator, but it still sounds authentic.)
Go to the top of the page
+Quote Post
YellowOnion
post Aug 5 2014, 08:03
Post #10





Group: Members
Posts: 35
Joined: 9-April 12
Member No.: 98589



Sorry guys I meant simple (for Vorbis), not similar. My brain had a fart.

I was considering noise had pretty high entropy, but at the same time Vorbis didn't struggle nearly as much.

Maybe some more sane settings will produce far lower bitrates.
Go to the top of the page
+Quote Post
jmvalin
post Aug 5 2014, 16:44
Post #11


Xiph.org Speex developer


Group: Developer
Posts: 485
Joined: 21-August 02
Member No.: 3134



QUOTE (YellowOnion @ Aug 5 2014, 03:03) *
Sorry guys I meant simple (for Vorbis), not similar. My brain had a fart.

I was considering noise had pretty high entropy, but at the same time Vorbis didn't struggle nearly as much.

Maybe some more sane settings will produce far lower bitrates.


As someone already pointed out, if you were using a 1.0.x encoder, then you'll get nearly no variation on the final size because 1.0.x never had true unconstrained VBR, only ABR. OTOH, with 1.1.x, you'll see large differences between files. Noise should end up at a lower bitrate and tonal content should end up at a higher bitrate.
Go to the top of the page
+Quote Post
YellowOnion
post Aug 5 2014, 17:02
Post #12





Group: Members
Posts: 35
Joined: 9-April 12
Member No.: 98589



QUOTE (jmvalin @ Aug 6 2014, 03:44) *
if you were using a 1.0.x encoder


Definitely the latest opusenc from their website, 0.1.9, and a fairly new version of ffmpeg (build within days of the post), both output extremely high 500kbps~ streams.
Go to the top of the page
+Quote Post
Octocontrabass
post Aug 5 2014, 20:38
Post #13





Group: Members
Posts: 66
Joined: 9-September 13
Member No.: 110004



Here's the final bitrates from encoding three samples: lowpassed brown noise, the 8-bit game music from before, and something loud with lots of distortion and dubstep-like bass.

CODE
        Brown    8-bit     Loud
  Rate  noise    Nintendo  music
  ----  -------  --------  -------
     8    8.018    9.012     7.219
    12   12.00    11.94     11.75
    16   16.01    15.63     15.53
    24   23.81    25.30     23.80
    32   32.01    33.97     31.98
    48   47.47    61.61     46.07
    64   63.03    91.31     57.46
    96   95.14   129.6      84.81
   128  126.1    163.0     114.0
   192  189.4    232.4     174.7
   256  250.5    291.8     235.8
   384  378.5    415.7     360.2
   512  502.3    501.0     479.9

This looks normal to me. If you don't see enough variation in bitrate, choose something lower than 510kbps.

Or, as I said earlier:
QUOTE (Octocontrabass @ Aug 3 2014, 17:25) *
Try encoding something else.

rolleyes.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2014 - 19:38