jacksonlcrews / darkice

Automatically exported from code.google.com/p/darkice
0 stars 0 forks source link

No checking whether cbr/abr bitrate is supported by libvorbis #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a config file containing a vorbis stream of 32 kbps cbr
2. ./darkice -c /etc/darkice.cfg

What is the expected output? What do you see instead?
I expect to get an error message telling me that 32kbps is not supported. 
Instead, darkice blindly passes the output bitrate to libvorbis and then throws 
a cryptic exception at an exit code of -130.

What version of the product are you using? On what operating system?
Trunk as of 2013-10-14 (r554), CentOS 6.4 i386

Please provide any additional information below.
Patch is attached.

Original issue reported on code.google.com by mhazinsk@vt.edu on 14 Oct 2013 at 6:07

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r557.

Original comment by rafael2k...@gmail.com on 11 Dec 2013 at 1:08

GoogleCodeExporter commented 9 years ago
Patch appied in 557.

Original comment by rafael2k...@gmail.com on 11 Dec 2013 at 1:09

GoogleCodeExporter commented 9 years ago
This is not the whole truth. Allowed bitrates are dependent on audio sample 
rate. Vorbis stream can actually be 32 kbps if audio sample rate is less than 
44100.

minimum allowed bitrate = 45 * sample-rate / 44100

Original comment by kulon...@gmail.com on 20 Jan 2014 at 3:55

GoogleCodeExporter commented 9 years ago
kulon is correct.

Vorbis works at 32kbps when encoding a 22050 kHz mono source.
The following code is broken for a sample rate of 22050.

#define VORBIS_MIN_BITRATE 45
...
  if ( getOutBitrate() < VORBIS_MIN_BITRATE )

Original comment by rosswi...@gmail.com on 25 Mar 2014 at 5:19