Monday, March 26, 2007

Ripping Vinyl with GNU/Linux

Recently my Dad started sending me pieces of his vinyl record collection. He has a ton of good stuff from Led Zeppelin to The Beatles and everything in between from 65'-75'. My plan is to archive all the albums to my computer and do some other fancy things with them like converting each track to an MP3, allowing for easy distribution via CD or over the Internet. Below is the process that I used after doing many hours of research on and off line.

1. The Equipment
In high school I was able to acquire some relatively decent vintage stereo equipment before the prices shot up on eBay in recent years. Here's the list of hardware I used:
  • Technics SL-20 Belt Drive Turntable
  • Technics SA-110 Stereo Receiver
  • Technics SH-8XXX Graphic Equalizer
  • 64-Bit Debian GNU/Linux Computer
All the equipment except the turntable was in excellent condition, but after taking it to Classic Audio Repair in Normal Heights they replaced the RCA cable, belt, checked the speed, and recommended a Grado Green MM cartridge for improved playback. They also showed me how to adjust the tone arm's counter balance and the correct anti-skate setting. Everything is hooked up through the record inputs/outputs on each device and the sound is excellent.

2. The Software
Noticeably I'm a huge Geek, and one of my requirements for doing this was everything application must be Free Software. The one exception is I compressed the tracks to MP3 instead of OGG, this decision was made since my parents are the final destination and it will just make things simpler on their end. Here's the software I used for ripping, analyzing, processing, and encoding:
3. The Process
Before I rip a record I clean each record with a RCA disc washer kit, clean the tip of the stylus, and check that the EQ levels on the equalizer are all set to zero.

In Audacity I play the record watch the levels when it peaks, moving the record level slider correctly so it's right around 0 since I don't want it to be too loud and end up distorted. I hit record in Audacity and start playing the record, checking the levels and making sure the sound is coming through and then sit back and listen to the wonderful sounds of 30 year old vinyl playing away. Once the side is recorded I cut off the beginning and end silence and save it as a WAV file which is usually around 190Mb or so. I do this for each record, being careful not to bump the turntable or cause any excessive disk activity on the computer that would distort the sound.

Once all the vinyl is ripped digitally I process each WAV file through normalize-audio, which will boost the sound levels up to a normal volume acceptable for playback. The command is straightforward, just pass it a filename and it will only take a few seconds to up the levels.

After the audio is normalized I re-open the WAV with Audacity and use the Edit->Split feature to find the gaps between songs and cut the WAV into individual tracks. After the tracks are found I use File->Export Multiple to export through LAME each track as a 192-kbps MP3 file, with a generic file name and no ID3v2 tags.

Using the program EasyTag I then load that directory, and use the GNUDB manual lookup to find the proper album, click apply to all tracks, then save the tags and file names. This will rename the tracks correctly and fill out all the ID3v2 tags, making it a lot easy to catalog and use with MP3 players.

The final step is to archive the original WAV file into FLAC, which is a lossless compression codec, cutting the size of the file by about 65% but maintaining the fidelity of the original WAV. The command I use to do this takes a while but as you can see the compression is impressive:
flac --lax -mep -b 8192 -l 32 -r 0,16 SideA.wav -o ../flac/SideA.flac

190M SideA.wav
116M SideA.flac
4. Results
I tested the resulting MP3s in XMMS, Winamp, iTunes, and streaming through MusixIndex, which all worked as expected:

5. Conclusions
Fortunately my Dad took great care of his record collection, and they still sound great. The packing itself is still in top condition and even better than what I'd expect it to look like after 30 years. Unfortunately no matter how much you do to improve the sound quality, through equipment, cleaning, and filters it's unrealistic to expect the records to play as well as when they were new. The sound was still amazing, but occasionally there are the pop/clicks and sometimes distortion of the sound. Each record is different, some sound flawless while others (New Riders of the Purple Sage) are actually not circular anymore which causes the tonearm to skate some, adding a sort of swishing sound every revolution.

Even with some of the sound flaws, I've come to accept that that's the way it is. If I wanted a clean error free recording I'd pick up the CD and just rip that instead, but then where's the fun in that? Plus the MP3s and FLAC sounds exactly like the original record, pops and all, which when listening on a portal MP3 player gives you the feeling of warmth you'd expect from original vinyl.


To address some comments:

The equipment is hooked up like this:
Tunrtable-> RCA-> Receiver-> RCA-> Equalizer-> RCA to 1/8 Headphone jack -> Line-In on a PCI SoundBlaster Live!
The sound card is roughly 7 years old, but has excellent Linux support and Creative was one of the first hardware companies to produce open source drivers back then. All other inputs and channels on the card are muted to avoid any noise.

The sound is through the equalizer to make sure all the levels were 0 before being send to the computer, it also gave me a visual clue to if the music was playing (occasionally I would mute the speaker volume). Plus, have you ever seen a Technics EQ from the early 1980s? The thing just looks damn cool when it's doing what it's doing.

When I recorded with Audacity I set the record level to coincide with the VU level, making sure it peaked at 0. Normalizing the audio was minimal and since each album had a different record level I don't have the annoyance of one being louder than the other.

I wanted to get the best quality I could (The new cartridge and cleaning gave the most improvement) but being that it is ~30 year vinyl I'm not going to be a huge stickler for perfection.