Specifying maximum bit rate for Speex-VBR mode |
![]() ![]() |
Specifying maximum bit rate for Speex-VBR mode |
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 |
|
|
|
Jun 30 2005, 01:34
Post
#2
|
|
|
Xiph.org Speex developer Group: Developer Posts: 430 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 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> |
|
|
|
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 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. |
|
|
|
Jun 30 2005, 23:50
Post
#4
|
|
|
Xiph.org Speex developer Group: Developer Posts: 430 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 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. 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. |
|
|
|
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
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. |
|
|
|
Jul 5 2005, 05:28
Post
#6
|
|
|
Xiph.org Speex developer Group: Developer Posts: 430 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. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 08:21 |