Taperssection.com

Gear / Technical Help => Ask The Tapers => Topic started by: DSatz on March 30, 2012, 10:34:27 PM

Title: Getting the best MP3 sound quality when file size is limited
Post by: DSatz on March 30, 2012, 10:34:27 PM
Hi. A non-profit recording client of mine recently needed a set of MP3 sound clips to apply for a grant. The rules said that the maximum file size was 5 MB per sound clip, and the client wanted me to fit from 5-1/2 to 8-1/2 minutes of music into the various clips. That meant that I had to limit the bit rate to 80 kbps or, in the case of the one 8-1/2 minute clip, 64 kbps, which is distinctly low-fi. I'm used to 96 kbps as the basic rate for spoken word material, for example, and to my mind listenable music starts at maybe 128 kbps.

In a desire to squeeze better audio quality out of the available bandwidth, I decided to try VBR (variable bit rate) encoding, which adjusts itself to the complexity of the waveform at any given moment and reserves the most bits for the most complex musical passages. That approach sounds as if it should give higher sound quality than a constant bit rate (CBR) for any given file size, and various on-line references seemed to support this.

But at least the way I was using Adobe Audition 3.0, I sure didn't find that to be true. I could set the quality percentage to any value that I wanted between 1 and 100 and that way, generate files that were almost exactly 5 MB, but the sound really stank, even compared to 64 kbps (CBR) files that were less than 4 MB.

Can anyone explain to me why that is? And what advice would you give me if this comes up again and I have to stuff too much music into too small an MP3 file--how can I get the best (or the least bad) sound quality into a low bit rate MP3?

--best regards



Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: page on March 30, 2012, 10:52:13 PM
A couple things that I've tried before (in Wav files which get fed to the encoder, not in the encoder directly):

- Drop it to 32khz
- Aggressively use LPF/HPF to minimize unnecessary information taking up bits in the encoding process (or throwing it a curve and generating audible errors). I don't know the content so maybe it uses stuff on the extremes, maybe not.
- Condense the stereo image just a touch if you have the original tracks, not much, but just a touch (unless it's critical).

This is like soapbox car racing; you're spending a lot of effort on low lo-fi returns, but people do it and there is a valid challenge.

Have you tried using the LAME MP3 (http://lame.sourceforge.net/) encoder? That's been the shining star of mp3 encoding for a while now (still has a development crew working on optimizations IIRC). It's optimized for mid-high bitrate stuff, but since it's open source, I went hunting and found GXLame (http://www.hydrogenaudio.org/forums/index.php?showtopic=80510) which has been modified to target low-bitrate stuff with as much retention to quality as possible. That looks worth trying.
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: dorrcoq on March 30, 2012, 10:54:47 PM
No idea why this is the case, but I'm wondering why, since everyone applying for the grant would have the same restrictions, your guy thought it better to have longer clips rather than higher quality.
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: page on March 30, 2012, 11:02:54 PM
So some more digging, it evidently turned up over at Hydrogen Audio that it's a known issue trying to use VBR at ultra low rates and they recommend ABR instead (http://wiki.hydrogenaudio.org/index.php?title=LAME#Very_low_bitrate.2C_small_sizes:_eg._for_voice.2C_radio.2C_mono_encoding_etc.).
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: rastasean on March 30, 2012, 11:21:20 PM
Is the recording of music or spoken audio? if its spoken audio only, maybe you could do mono.
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: F.O.Bean on March 31, 2012, 03:01:11 AM
Hmmm, weird!

I personally record ALL of my mp3s to 320[CBR] aqnd I can def live with that when im on the move
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: live2496 on March 31, 2012, 10:42:53 AM
DSatz, one thing I would try is to limit the bandwidth of the recording. Maybe cut anything below 300 and anything above 6K or 7K and see what difference that makes. Mp3's are based upon psychoacoustics and therefore filtering some of the frequencies might help a lot. Just a guess though, I haven't experimented with that myself.
 
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: live2496 on March 31, 2012, 10:43:51 AM
As suggested, also try lame and you could use Sox for filtering.
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: runonce on March 31, 2012, 07:05:48 PM
So - the grant spec is 5MB...ok.

But the client wants to squeeze more time than is practical from the format. (this seems to be the problem)

You might have to explain to client that they are going to get much shorter clips due to the file size restriction...just to assure any semblance of quality.

Or - check with the folks running the grant just to clarify - there might be some techno-misunderstanding here...
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: DSatz on March 31, 2012, 11:29:28 PM
runonce, that about sums it up. Originally the client wanted even longer sound clips, and I said that they should be 5 minutes or less. Getting them to scale down to 5-1/2 - 8-1/2 minutes was a victory in itself ...

Sincere thanks to everyone who replied. I'll try some careful low-pass filtering (say at 12 kHz) next time. I'll also try to learn something about the way MP3 encodes stereo information.

--best regards
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: DigiGal on April 01, 2012, 10:41:10 AM
DSatz,

I've not used it myself but was recently reading about a fairly new and unique plug-in that looks ideal to help with this type of work.  They do offer a 15 day demo and it's expensive to purchase but looks worth the price of admission if you end up doing lots of this work especially if they are paying clients...

Sonnox Fraunhofer Pro-Codec - Multiple Codec Encode/Decode Plug-In

http://www.sonnoxplugins.com/pub/plugins/products/pro-codec.htm
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: rhinowing on April 01, 2012, 02:00:19 PM
Hmmm, weird!

I personally record ALL of my mp3s to 320[CBR] aqnd I can def live with that when im on the move
v0 is where it's at, imo. better file size, indistinguishable quality from 320
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: F.O.Bean on April 07, 2012, 03:40:02 AM
Hmmm, weird!

I personally record ALL of my mp3s to 320[CBR] aqnd I can def live with that when im on the move
v0 is where it's at, imo. better file size, indistinguishable quality from 320

What is v0 ???
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: DSatz on April 07, 2012, 01:13:18 PM
V0 is apparently a kind of MP3 encoding as generated by the "LAME" MP3 encoder using a variable bit rate. In general, whenever you use variable bit-rate (VBR) MP3 compression and encoding, you don't specify a particular bit rate (since that varies with the complexity of the program material from frame to frame) but instead, you specify a desired quality level on a scale from 1 to 100, with 100 being the highest available quality. "v0" (a term that seems to be used only in connection with the "LAME" encoder) seems to mean "VBR encoding with a quality level setting of 100."

It's designed to give as much compression as the MP3 VBR approach allows without (ostensibly) injuring the sonic qualities of the recording. It is claimed to be audibly indistinguishable from the original, although of course that's an inherently unprovable assertion. It doesn't allow bit-accurate recreation of the original recording, however, so it is still a type of "lossy" encoding. And it requires much larger files than I was permitted to use in the situation I was describing, so it's kind of a side note to the thread.

--best regards
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: scb on April 07, 2012, 04:12:17 PM
use AAC instead
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: F.O.Bean on April 07, 2012, 05:02:45 PM
Thanks alot DSatz :)
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: adrianf74 on April 07, 2012, 05:42:57 PM
Indeed... if file size is the main issue, go with AAC.   I always run V0 LAME files for my MP3 player/car but seeing that the criteria requires small file size, AAC may yield better results.
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: scb on April 07, 2012, 08:05:40 PM
AAC also sounds better
Title: Re: Getting the best MP3 sound quality when file size is limited
Post by: earmonger on April 09, 2012, 02:15:58 AM
Depends on whether the audition people specified format (mp3) as well as size. Some people do not have iPods, believe it or not.