IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Specifying maximum bit rate for Speex-VBR mode
tech_noobie
post Jun 29 2005, 10:43
Post #1





Group: Members
Posts: 36
Joined: 6-May 05
Member No.: 21908



Hi everyone,

I am currently trying to encode some files using Speex. I execute the following command lines in Speex:

speexenc --vbr --quality 10 --comp 4 --bitrate 24576 filename.wav filename.spx

and

speexenc --vbr --quality 10 --comp 4 --bitrate 131072 filename.wav filename2.spx

When I compared the filesize and the quality of both outputs, I cannot find the difference between the two, and hence it seems to me that with Speex - VBR mode - only the "quality" feature matters, is it true? Is there anyway in which I can specify the maximum bitrate to be used in the case of VBR? And if there isn't what is the default maximum bitrate being used in this case? because I am pretty sure that with LAME, it is possible for people to actually set the maximum bitrate in the case of VBR.

Also if I want to give a fair (quality) comparison between CBR and ABR in this case let say for a bit rate of Z then would the following be appropriate:
For CBR part:
speexenc --quality 10 --comp 4 --bitrate Z filename.wav filename3.spx

and for ABR part:
speexenc --quality 10 --comp 4 --abr Z filename.wav filename4.spx

Thank you very much for your time and help. I appreciate it very much smile.gif.
Go to the top of the page
+Quote Post
jmvalin
post Jun 30 2005, 01:34
Post #2


Xiph.org Speex developer


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



QUOTE (tech_noobie @ Jun 29 2005, 06:43 PM)
Hi everyone,

I am currently trying to encode some files using Speex. I execute the following command lines in Speex:

speexenc --vbr --quality 10 --comp 4 --bitrate 24576 filename.wav filename.spx

and

speexenc --vbr --quality 10 --comp 4 --bitrate 131072 filename.wav filename2.spx

When I compared the filesize and the quality of both outputs, I cannot find the difference between the two, and hence it seems to me that with Speex - VBR mode -  only the "quality" feature matters, is it true? Is there anyway in which I can specify the maximum bitrate to be used in the case of VBR? And if there isn't what is the default maximum bitrate being used in this case? because I am pretty sure that with LAME, it is possible for people to actually set the maximum bitrate in the case of VBR.

Also if I want to give a fair (quality) comparison between CBR and ABR in this case let say for a bit rate of Z then would the following be appropriate:
For CBR part:
speexenc  --quality 10 --comp 4 --bitrate Z filename.wav filename3.spx

and for ABR part:
speexenc --quality 10 --comp 4 --abr Z filename.wav filename4.spx

Thank you very much for your time and help. I appreciate it very much smile.gif.
*


The problem is you're using a whole bunch of mutually exclusive options. Speex can be controlled *either* by quality or by bit-rate. It's logical, you can't ask for maximum quality at minimum bit-rate. So, you either specify:
--quality <cbr quality>
--bitrate Z <cbr bitrate>
--vbr --quality <vbr quality>
--abr <vbr average bitrate>
Go to the top of the page
+Quote Post
tech_noobie
post Jun 30 2005, 17:49
Post #3





Group: Members
Posts: 36
Joined: 6-May 05
Member No.: 21908



Hi jmvalin,

Thank you very much for your help, that clears up some of the confusion that I have with Speex laugh.gif . Just to make sure that I do the right thing, would the following comparison make more sense:

where Z is the same number in both case, if I want to compare between ABR and CBR then:

for CBR:
speexenc --comp 4 --bitrate Z filename.wav filename1.spx

for ABR:
speexenc --comp 4 --abr Z filename.wav filename2.spx

Once again thank you very much for your time. smile.gif
Go to the top of the page
+Quote Post
jmvalin
post Jun 30 2005, 23:50
Post #4


Xiph.org Speex developer


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



QUOTE (tech_noobie @ Jul 1 2005, 01:49 AM)
Hi jmvalin,

Thank you very much for your help, that clears up some of the confusion that I have with Speex  laugh.gif . Just to make sure that I do the right thing, would the following comparison make more sense:

where Z is the same number in both case, if I want to compare between ABR and CBR then:

for CBR:
speexenc --comp 4 --bitrate Z filename.wav filename1.spx

for ABR:
speexenc --comp 4 --abr Z filename.wav filename2.spx

Once again thank you very much for your time.  smile.gif
*


It would make sense as long as the bit-rate Z you choose is available in CBR (otherwise, Speex takes the closest bit-rate below Z). Use -V to see what bit-rate is being used.
Go to the top of the page
+Quote Post
tech_noobie
post Jul 3 2005, 14:41
Post #5





Group: Members
Posts: 36
Joined: 6-May 05
Member No.: 21908



Hi jmvalin, Thank you for your kind help. I am currently doing my Uni project and hence your help meant a lot to me smile.gif. There is another question I would like to ask, what is the maximum bitrate being used when we use ABR mode? Does it depend on the value that you set for the average bit rate? Because with LAME you can specify the maximum bitrate to be used during the encoding but whether or not it is possible using Speex.

Also I am very sorry, I am not too sure whether this should be put in another thread altogether but since it is related to my previous question so I thought putting it here would be fine.

The question that I have this time is still around the Speex ABR and CBR mode, by doing some experimentation I found some of the available bitrates available to the CBR mode are 24.6 kbps, 18 kbps, 15 kbps and 8 kbps (thanks to jmvalin for your guide in using -V). I have then tried to implement the same thing with the ABR mode and by setting the --abr feature to a certain value of Z, I have got a result of certain value of U (the average bitrate as obtained by using the -V feature) as follows:

Command line: speexenc --comp 4 --abr Z filename.wav filename2.spx
Z = 15000 ----> U = 10677
Z = 18000 ----> U = 10678
Z = 24000 ----> U = 13544

Initially, before I start the experimentation I expect that the value of U would approximately be equal to or a bit less than the value of Z (based on what I have read on the documentation) since I use ABR, but based on these I do not think that my initial thought is correct.

Secondly, my current thought is that ABR, like VBR, allocates as little bits as possible to unimportant area such as silent area in the audio, no matter what value you put for Z, and thus even if Z is different (i.e. 15000 and 18000) if it is thought that the little amount of bits put for those unimportant areas would suffice then it will not allocate any more bits to these areas. On the other hand, in areas of significant importance, it would try to allocate as much bits as possible. But I still cannot think of why when Z is increased from 15000 to 18000 U only increase by 1 bit.

Thank you very much once again for your time and advises.
Go to the top of the page
+Quote Post
jmvalin
post Jul 5 2005, 05:28
Post #6


Xiph.org Speex developer


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



QUOTE (tech_noobie @ Jul 3 2005, 10:41 PM)
Secondly, my current thought is that ABR, like VBR, allocates as little bits as possible to unimportant area such as silent area in the audio, no matter what value you put for Z, and thus even if Z is different (i.e. 15000 and 18000) if it is thought that the little amount of bits put for those unimportant areas would suffice then it will not allocate any more bits to these areas. On the other hand, in areas of significant importance, it would try to allocate as much bits as possible. But I still cannot think of why when Z is increased from 15000 to 18000 U only increase by 1 bit.

Thank you very much once again for your time and advises.
*


Keep in mind that ABR does a long term average. If you encode several minutes of speech, then you'll likely see the average bit-rate being close to the target average. The max bit-rate for VBR/ABR/CBR are the same and equal to CBR quality 10.
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: 29th July 2014 - 16:06