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: best mp3 preset and settings for 128 kbps CBR (Read 23757 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

best mp3 preset and settings for 128 kbps CBR

Hey guys, maybe it's discussed before (I found only the threat from 2003), and sorry if i'm posting duplicate.

I have a radiostation that obviously has output frequency responce of 30 hz up to 16 khz, with brickwall filters, and some other fancy equipment....
I want to steam this station at 128 kbps and achieve the best possible quality of a CBR 128 KBPS mp3 encoder. Did I mention that the input material is 99.9% lossless audio? 

I currently use edcast with Lame 3.93.1 using preset=12 and quality=0 and I'm getting decent results. But I hear lots of dirrerence between the original output and the stream. Am I doing something wrong? And is there better way to squeze more out of the mp3 codec?

best mp3 preset and settings for 128 kbps CBR

Reply #1
Get a version of LAME that was released more recently than 2002, for starters!

The simplest setting is “-b128”, but perhaps others can suggest tweaks that might improve the quality.

best mp3 preset and settings for 128 kbps CBR

Reply #2
Try ABR, or even a VBR setting that gives about the same bitrate.

best mp3 preset and settings for 128 kbps CBR

Reply #3
Try ABR, or even a VBR setting that gives about the same bitrate.


I think he has to use CBR because he is streaming. (correct me if I'm wrong, I'm new!)

@ OP, Use the latest version of LAME, certainly! If you still hear differences (ABX it) you might want to move on up to 192 or higher. . .
FLAC -> JDS Labs ODAC/O2 -> Sennheiser HD 650 (equalized)

best mp3 preset and settings for 128 kbps CBR

Reply #4
Streaming does not HAVE TO use CBR. It's just the most predictable/stable mode bandwidth-wise. If you don't care about this property much (receivers have large enough buffer and bandwidth reserve) then ABR or even VBR may be better alternatives. Especially if you're willing to endure bitrate fluctuations to maximize the quality.

 

best mp3 preset and settings for 128 kbps CBR

Reply #5
You can use ABR with a hard bandwidth cap - but worst case that's as bandwidth hungry as CBR at the bandwidth cap. If that worst case is acceptable in bandwidth terms, you might as well use CBR at that bandwidth cap!

The advantage of ABR or VBR in this case is that it can save you a little bandwidth/money, but not increase quality.

You could manage peak and average bitrates over timescales which equate to typical buffers, giving you a potentially useful quality increase (compared with CBR) within the same overall bandwidth constraints. However, unless I'm mistaken, lame doesn't give you this kind of control, does it?

You could say that you don't care, and that overall VBR will still work well enough overall - but then you will get users whose feed drops out when the bitrate goes up. That's far worse than an occasional encoding artefact.

Cheers,
David.

best mp3 preset and settings for 128 kbps CBR

Reply #6
Most streaming server services charge for bandwidth, not total data transferred.  If you're going to do ABR with a hard cap, you might as well do CBR at the cap.  You'll get objectively higher quality without any additional cost.  The only advantage to ABR with a hard cap is that you might have some additional bandwidth to buffer new listeners faster.

best mp3 preset and settings for 128 kbps CBR

Reply #7
For clarification, since many seem to be misunderstanding this: CBR does not mean that each audio frame consumes the same number of bits. It's VBR restricted by a bit reservoir of fixed size/length (a buffer). Which IMHO is exactly what you need for streaming and what the bit reservoir mode was developed for. Some mostly accurate further reading I found in a hurry:

http://wiki.hydrogenaudio.org/index.php?title=Bit_reservoir*
http://www.linuxconsulting.ro/darkice/streaming-modes.html

Btw, AAC is much better suited for CBR encoding because 1) the frame sizes don't have to be integer multiples of 16 or 32 kbps, 2) the bit reservoir is larger (at least I think it is, 6144 bits per channel in AAC... mp3? Edit: Less than 1000 it seems?)

Chris

* This says "The term bit reservoir is used exclusively in the MP3 specification", which is not true. It's also used in all versions of AAC.
If I don't reply to your reply, it means I agree with you.

best mp3 preset and settings for 128 kbps CBR

Reply #8
Yes, but the mp3 CBR bitrate reservoir isn't really related to the kind of buffering, network latency / jitter etc that you want to anticipate / take advantage of in the real world - it's one or two orders of magnitude too small IMO.

I agree about AAC - it seems to work really well in this respect.

Cheers,
David.

best mp3 preset and settings for 128 kbps CBR

Reply #9
You could stream Vorbis and buy some more bandwidth with the saved mp3 license fees 

best mp3 preset and settings for 128 kbps CBR

Reply #10
Hey guys. Thanks for the replies. I've expected a "read the lame documentation" + ban from the site for that kind of "question" 

You can use ABR with a hard bandwidth cap - but worst case that's as bandwidth hungry as CBR at the bandwidth cap. If that worst case is acceptable in bandwidth terms, you might as well use CBR at that bandwidth cap!

The advantage of ABR or VBR in this case is that it can save you a little bandwidth/money, but not increase quality.

You could manage peak and average bitrates over timescales which equate to typical buffers, giving you a potentially useful quality increase (compared with CBR) within the same overall bandwidth constraints. However, unless I'm mistaken, lame doesn't give you this kind of control, does it?

You could say that you don't care, and that overall VBR will still work well enough overall - but then you will get users whose feed drops out when the bitrate goes up. That's far worse than an occasional encoding artefact.

Cheers,
David.


I use dedicated servers for this, with fixed network line speed, that is almost 100% full because of the popularity of the station.

As I've read in here and here that the LAME 3.93.1 is the "best" encoder for streaming at 128 kbps.
Using VBR means:
1. Bursting over the bandwidth cap;
2. Compatibility problem with some devices.

For clarification, since many seem to be misunderstanding this: CBR does not mean that each audio frame consumes the same number of bits. It's VBR restricted by a bit reservoir of fixed size/length (a buffer). Which IMHO is exactly what you need for streaming and what the bit reservoir mode was developed for. Some mostly accurate further reading I found in a hurry:

http://wiki.hydrogenaudio.org/index.php?title=Bit_reservoir*
http://www.linuxconsulting.ro/darkice/streaming-modes.html

Btw, AAC is much better suited for CBR encoding because 1) the frame sizes don't have to be integer multiples of 16 or 32 kbps, 2) the bit reservoir is larger (at least I think it is, 6144 bits per channel in AAC... mp3? Edit: Less than 1000 it seems?)

Chris

* This says "The term bit reservoir is used exclusively in the MP3 specification", which is not true. It's also used in all versions of AAC.


I don't like the way AAC+ v2 sounds to me at high bitrate. The very first AAC (not v1, v2, etc.) sounds good to me, but it requires high bitrate for it.
But I'm considering AAC+ as option in the future, because I have a 32 kbps AAC+ v2 PS stream and it sounds very good, given the low bitrate.
Also, going to AAC+ will yield lots of compatibility problems along players and devices that "listen" to the stream.

You could stream Vorbis and buy some more bandwidth with the saved mp3 license fees 


This is not a bad idea, I like Vorbis the best. It sounds really good even at quality 2, and it will save me some bandwidth
But as I said above, going to OGG/Vorbis means lots of incompatibility.

best mp3 preset and settings for 128 kbps CBR

Reply #11
Btw, AAC is much better suited for CBR encoding because 1) the frame sizes don't have to be integer multiples of 16 or 32 kbps, 2) the bit reservoir is larger (at least I think it is, 6144 bits per channel in AAC... mp3? Edit: Less than 1000 it seems?)
I don't like the way AAC+ v2 sounds to me at high bitrate. The very first AAC (not v1, v2, etc.) sounds good to me, but it requires high bitrate for it.
But I'm considering AAC+ as option in the future, because I have a 32 kbps AAC+ v2 PS stream and it sounds very good, given the low bitrate.
Also, going to AAC+ will yield lots of compatibility problems along players and devices that "listen" to the stream.
AAC+ (a.k.a. HE-AAC) is designed for low bitrates only. Basic (i.e. LC-)AAC is designed for the same ranges as MP3 and tends to perform slightly better (albeit not always to a statistically significant extent </obligatorydisclaimer>) at equivalent bitrates.

best mp3 preset and settings for 128 kbps CBR

Reply #12
Some stations offer multiple formats: a choice  of vorbis and mp3 and/or multiple data rates.  For some the alternate is a flash player (unknown format).  The station I listen to most on line encourages the flash player as cheaper for them, so presumably it's either a free format or more efficient than mp3.

Another issue, no doubt addressed hundreds of times: when you hit your cap, do you prevent additional stream starts, or do you lower the rate for everyone so everyone can listen?

best mp3 preset and settings for 128 kbps CBR

Reply #13
I have been using the ABR128 preset with LAME 3.98.2 re-sampled to 32khz.
This should compare favorably to any FM signal.
I also prefer ogg q2 for streaming, however compatibility can be an issue for listeners.
AAC+ does not sound transparent to my ears at all. (I realize it was never designed to be, but the artifacts are almost always there)

best mp3 preset and settings for 128 kbps CBR

Reply #14
As I've read in here and here that the LAME 3.93.1 is the "best" encoder for streaming at 128 kbps.


1st link: "I did extensive blind ABX testing to find that 3.93.1 seems to sound the closest to the original input, at 128kbps cbr. This was done when 3.97 was out, so it's possible that 3.98.x would beat 3.93.1, but I highly doubt it." So far so good.

2nd link: comparison of waveform ?? That's not how lossy codecs can be compared.

best mp3 preset and settings for 128 kbps CBR

Reply #15
AAC+ does not sound transparent to my ears at all. (I realize it was never designed to be, but the artifacts are almost always there)
Makes sense, considering that it’s not designed for transparency but for audibly pleasing reconstruction of high frequencies from very low-bitrate streams. IIRC, about 96 kbps is its threshold of utility.

best mp3 preset and settings for 128 kbps CBR

Reply #16
I am streaming at 128 kbps  mp3 CBR using newest lame for audacity. I suggest to encode, normalize and compress all your tracks first using Audacity compression and normalization default settings, later export to 128kbps CBR and save into your stream tracks folder. Then try a direct conection to your server, not needs to re-encode.
Let me know if this little trick solve your Sound quality troubles!

best mp3 preset and settings for 128 kbps CBR

Reply #17
Basic (i.e. LC-)AAC is designed for the same ranges as MP3 and tends to perform slightly better (albeit not always to a statistically significant extent </obligatorydisclaimer>) at equivalent bitrates.

'Slightly'?

I think 'considerably' is a correct word. Last time I checked iTunes LC-AAC 96 kbps VBR was on par with LAME -V5 (130-140 kbps).
Also iTunes LC-AAC 96 kbps was used as high anchor(!) in some previous public tests. http://listening-tests.hydrogenaudio.org/sebastian/
That means that it's really good already at such low bitrate.


best mp3 preset and settings for 128 kbps CBR

Reply #18
I don't like the way AAC+ v2 sounds to me at high bitrate. The very first AAC (not v1, v2, etc.) sounds good to me, but it requires high bitrate for it.
But I'm considering AAC+ as option in the future, because I have a 32 kbps AAC+ v2 PS stream and it sounds very good, given the low bitrate.

Yes, that's what HE-AAC v2 is designed for: bitrates of 32 kbps or lower. It uses parametric coding, so it cannot become transparent like the "first AAC" (Low Complexity). The latter of course can't do miracles, but give it a try at 96 kbps compared to MP3 at 128. You might come to the same conclusion as Igor.

Chris
If I don't reply to your reply, it means I agree with you.

best mp3 preset and settings for 128 kbps CBR

Reply #19
Some stations offer multiple formats: a choice  of vorbis and mp3 and/or multiple data rates.  For some the alternate is a flash player (unknown format).  The station I listen to most on line encourages the flash player as cheaper for them, so presumably it's either a free format or more efficient than mp3.

Another issue, no doubt addressed hundreds of times: when you hit your cap, do you prevent additional stream starts, or do you lower the rate for everyone so everyone can listen?


I use the same technology, Flash Player that plays the 128 KBPS CBR mp3 Stream. It works just fine (with the right encapsulation that is done by my streaming server)
Going VBR/ABR will kill the flash player or make it behave like crazy.


When I hit the cap, I redirect listeners to a stream, "saying" that there are no slots at the moment.

I am streaming at 128 kbps  mp3 CBR using newest lame for audacity. I suggest to encode, normalize and compress all your tracks first using Audacity compression and normalization default settings, later export to 128kbps CBR and save into your stream tracks folder. Then try a direct conection to your server, not needs to re-encode.
Let me know if this little trick solve your Sound quality troubles!


I'm using a different approach, the same one as any big, loud, commercial and famous radio station out there. So this is NOT an option.
I use equivalent equipment, and the level is normalized, the tracks probably filtered (lowpass + highpass) before going into the compressor, limiter, clipper and, finally, the transmitter and the encoder.
Maybe I'll try the latest lame, but give me optimal preset setting to start with.

Yes, that's what HE-AAC v2 is designed for: bitrates of 32 kbps or lower. It uses parametric coding, so it cannot become transparent like the "first AAC" (Low Complexity). The latter of course can't do miracles, but give it a try at 96 kbps compared to MP3 at 128. You might come to the same conclusion as Igor.

Chris

Thanks, I will test the latest LC-AAC soon.

p.s. here is what the station sounds like on the net at 128 kbps mp3 CBR. I will test some settings and codecs in a short while.

btw. an competitor is streaming at 256 kbps AAC+ v2, 96 KHz sample rate... 
The quality is good, but, the only players that can decode this stream are Winamp and VideoLAN, and only if you have a 96 KHz capable sound card.

best mp3 preset and settings for 128 kbps CBR

Reply #20
btw. an competitor is streaming at 256 kbps AAC+ v2, 96 KHz sample rate... 
The quality is good, but, the only players that can decode this stream are Winamp and VideoLAN, and only if you have a 96 KHz capable sound card.

Huh???

As I understand it, v2 downsamples the audio to half its sample rate, then replaces the lost frequencies with a simulation. That would mean in this case downsampling to 48 kHz, then replacing everything that was lost above 24 kHz with simulated audio.

What audio above 24 kHz is it simulating???

best mp3 preset and settings for 128 kbps CBR

Reply #21
96 kHz? Why?

Wait: 256 kbps and 96 kHz in AAC+ v2? What.

best mp3 preset and settings for 128 kbps CBR

Reply #22
Some stations offer multiple formats: a choice  of vorbis and mp3 and/or multiple data rates.  For some the alternate is a flash player (unknown format).  The station I listen to most on line encourages the flash player as cheaper for them, so presumably it's either a free format or more efficient than mp3.

Another issue, no doubt addressed hundreds of times: when you hit your cap, do you prevent additional stream starts, or do you lower the rate for everyone so everyone can listen?



btw. an competitor is streaming at 256 kbps AAC+ v2, 96 KHz sample rate... 
The quality is good, but, the only players that can decode this stream are Winamp and VideoLAN, and only if you have a 96 KHz capable sound card.

Huh???

As I understand it, v2 downsamples the audio to half its sample rate, then replaces the lost frequencies with a simulation. That would mean in this case downsampling to 48 kHz, then replacing everything that was lost above 24 kHz with simulated audio.

What audio above 24 kHz is it simulating???



96 kHz? Why?

Wait: 256 kbps and 96 kHz in AAC+ v2? What.



THAT!!! I took this file from their official SHOTCast Stream
Play it in Winamp. I can achieve the same "effect" in my encoder (HE-ACC High, 256 kbps), but it sounds bad for me. Vorbis at q8 outperforms it!

best mp3 preset and settings for 128 kbps CBR

Reply #23
According to Winamp, it's MPEG-2 HE-AAC (aka AAC+), not AAC+ v2.

best mp3 preset and settings for 128 kbps CBR

Reply #24
As I understand it, v2 downsamples the audio to half its sample rate, then replaces the lost frequencies with a simulation. That would mean in this case downsampling to 48 kHz, then replacing everything that was lost above 24 kHz with simulated audio.

Correct. That's the idea of dual-rate Spectral Band Replication (SBR).

Quote
What audio above 24 kHz is it simulating???

Nothing.  There is nothing above 21 kHz. I think the idea here was to avoid the core-coder (AAC-LC) downsampling but still use the bandwidth extension functionality of SBR (which starts at ~17 kHz and ends at 21 kHz here).

Not a bad idea in principle, except that with 256 kb available you can simply encode to AAC-LC with 20 kHz bandwidth or so (i.e. no need for bandwidth extension).

Chris
If I don't reply to your reply, it means I agree with you.