MetaChat is an informal place for MeFites to touch base and post, discuss and
chatter about topics that may not belong on MetaFilter. Questions? Check the FAQ. Please note: This is important.
10 February 2006
Ask Mecha: How can I convert an MP3 from stereo to mono? →[More:]
What you want, obviously, is a way to do this without transcoding.
But assuming you can stand transcoding, then I'd pipe the mp3 through a filter that decodes to whatever rez the mp3 originally was, and then through a good mp3 encoder with a "mono" bit set. Trivial shell script or command line. You just the right tools, of which there are certainly a great many. I'd just use Lame. If it's possible to set a mono bit without transcoding, I would be suprised if Lame or similiar doesn't have a command line switch that does exactly that.
Foobar2000 has a mono downmix output filter, but that won't alter the file unless you use it's wav-to-disk output device, and then you'd be transcoding.
Ok, I used Winamp to convert the mp3 to a wav (which involves switching it to output to a file and then switching it back to normal paly), then lame with the -m m switch to convert the wav to a mono mp3.
Then I copied over the ID3 tags with Mp3BookHelper.
Then (because iTunes already knew about the file, and it's a podcast in a series and I didn't want iTunes to treat it like music), I used mv to copy the new file over the old.
To take out a step or two, if you open it in Audacity, you can split the left and right channels of the stereo MP3 source to separate mono tracks, by right-clicking on the track title and selecting "Split Stereo Tracks".
You can then bounce the two channels down into one mono track, by shift-clicking to select both tracks and choosing the Project -> Quick Mix menu. Export your mono MP3 file (you've already got the LAME library somewhere, sounds like).
You may still need to re-export your ID3 tags, but if you're using Cygwin you can use Perl or any other scripting language to automate this.
Lame can decode, downmix, and encode in one command. Use "-a" for mono.
Here's what I would do, either with win32's command.exe or (preferably!) with a shell script like ksh. First, I'd find a command-line ID3 utility that has import and export functionality.
Use some kind of foreach to utilize a directory listing of MP3s.
Read the input file's ID3 tags.
Export the ID3 tags to a temporary file using the MP3 filename.
Use lame to decode, downmix and encode all in one command, writing to something like _MONO_%filename%.
Use the ID3 app to import the stored ID3 values from the temp file and write them to _MONO_%filename%.
Delete the tempfile.
...and whatever else, like redirect sdout and sderr.