?

Log in

No account? Create an account
Fun with Audacity and LAME for different MP3 sampling rates (i.e. how NOT to sound like a chipmunk!) - Blog.DanYork.com
Personal journal of Dan York - for my VoIP blog, see www.disruptivetelephony.com
dyork
dyork
Fun with Audacity and LAME for different MP3 sampling rates (i.e. how NOT to sound like a chipmunk!)
Had a bit of trouble today when I went to upload a new Blue Box episode.  It sounded fine when you downloaded and played it, but when you used the flash-based player I have on the site, it sounded like we were a bunch of chipmunks!

It turns out in reading through the LibSyn support forums (because I was thinking of switching to using the LibSyn flash player instead of the one I use now) that the issue is with the sampling rate in the MP3 export rate out of Audacity and LAME.  Sure enough, I looked in iTunes and my freshly-exported MP3 file had a sample rate of 24Khz versus the standard 44.1Khz.  What happened?

Well, it turns out that Audacity lets the LAME encoder control the sampling rate! You can set the bit rate in Audacity, but Audacity lets LAME adjust the sampling rate.  I never had this issue before because I've always used the default bit rate of 128Kbps, which must just use the default sampling rate. However, as I wrote earlier, I'm looking to use a bit rate of 56 to get much smaller file sizes.  This was my first upload at the new bit rate.

Only way I could work around this right now was to go to the command line to force an output sampling rate of 44.1:
lame.exe -b 56 --resample 44.1 inputfile.wav outputfile.mp3
Ta da... an MP3 file that plays well in the flash MP3 player!  Just had to delete the old one on LibSyn and upload a new one... hopefully I didn't delete the old one while someone was in the middle of downloading (but I probably did).

Ah, the fun of all these different audio issues... :-(

Tags: , , , ,

6 comments or Leave a commentPermanent Link
Comments
(Deleted comment)
dyork From: dyork Date: November 18th, 2006 09:39 am (UTC) (Permanent Link)
You are welcome!
From: (Anonymous) Date: November 29th, 2006 08:51 am (UTC) (Permanent Link)
Only way I could work around this right now was to go to the command line to force an output sampling rate of 44.1:
lame.exe -b 56 --resample 44.1 inputfile.wav outputfile.mp3


How did you get this into Audacity?

I've been trying to control certain parameters for audiobooks but have been stuck with just controlling the sampling rate for lame_enc.dll rather than being able to use lame.exe.
dyork From: dyork Date: November 29th, 2006 10:49 am (UTC) (Permanent Link)
How did you get this into Audacity?

I don't do this in Audacity. It has now become yet another step in my post-production process. My process used to be:

1. Do all editing in Audacity, export to MP3 and configure ID3 tags.
2. Load MP3 file into iTunes to check ID3 display and add image, "Podcast" genre, etc.

My process now is:

1. Do all editing in Audacit, export to WAV.
2. Run batch file that calls lame.exe to do appropriate conversion to MP3.
3. Load MP3 file into iTunes to configure ID3 tags.

So it's just one more step. Not really a big deal in the grand scheme of things, although it would certainly be easier if I could collapse 1 and 2 again.

I've not played with the DLL at all.
From: (Anonymous) Date: January 18th, 2007 02:44 am (UTC) (Permanent Link)

Thanks!

This helped out a lot!
From: (Anonymous) Date: January 18th, 2007 05:05 am (UTC) (Permanent Link)

Why ID3 in iTunes

Why use iTunes to modify ID3 tags when you can do it from within Windows Explorer?
From: (Anonymous) Date: October 26th, 2007 01:28 am (UTC) (Permanent Link)

A variation

Thanks Dan, this page helped me immensely.

One variation worked better for me. I'm geekish enough to understand what you explained but not so geekish that I enjoy playing around with the command line, particularly for a task that I'm going to be doing regularly. I downloaded LameFE from sourceforge - it is essentially a GUI frontend for LAME - and used that instead. This product also allows the editing of the ID3 tags as part of the encoding, going some way towards recombining your steps 2 and 3.

Thanks again
Steve
6 comments or Leave a commentPermanent Link