Benutzerspezifische Werkzeuge
Sie sind hier: Startseite H. Himmelbauer Diverses NetMP3
Artikelaktionen

NetMP3

A Linux based Geek-MP3 Player

netmp3-1.jpg



The Idea

I was always somehow fond of the MP3-Technology and always looked for the "perfect" MP3-Player. My main requirements were:
  1. Absolutely no noise - I like to listen to classic music and it's so embarrassing when there is some background noise at quiet parts.
  2. High sound quality
  3. Huge MP3 collection
  4. Ease of use
  5. Sharing of MP3's with other people
  6. Cheap
  7. Geek factor
None of the available solutions looked appealing to me:
  • PC: To loud
  • Walkman-Style MP3-Player: not enough storage, no sharing
  • DVD-Player: only one DVD/CD, no geek factor, no sharing
So I decided to build a MP3 Player of my own.

System Design

My requirements led to the following specifications:
  • The player could only be completely silent if there were no moving parts at all. This ment that there must not be a Fan, Floppy, CDROM or a Harddisk.
  • For high sound quality there had to be a high quality DAC.
  • For the usability I wanted a remote control and some LCD-Display.
  • Moreover there had to be some way to access the MP3-collection on my server.
  • To make things cheap I wanted to use some old off-the-shelve parts.
  • Of course, the solution had to be Linux based
After looking around, I discovered some neat software packages that fit together:
  • Irmp3, a multimedia audio jukebox on Linux
  • LCDproc, Linux software for LCD-displays
  • LIRC, software for an easy LCD-Receiver
For the "geek factor" I decided to mount a PC motherboard on a wooden plate and hang all this to my wall.

The Noise problem

Well, if there were no moving parts, how would this thing boot Linux? The only possible and inexpensive way seemed to be setting up a netboot. This was quite a tricky part but there are some HOWTOs that explain how to do this.

Moreover absolute silence ment also no fans. I decided to use a quite low end system with a big passive CPU cooler. As a power supply I used an old but sturdy 200W model and removed the fan completely. The load would be very low, so the power supply should not get too hot.

The Hardware

I will describe my currently working hardware of my player, I exchanged some parts of the first prototype - the reason for those "exchanges" are described in the section "Problems".
  • CPU: Pentium-200, underclocked at 100Mhz with quite a large passive cooler due to heat problems.
  • Motherboard: Gigabyte.
  • Network: 3com 509c. This NIC is quite cheap and has a flash bootrom. This makes netbooting quite easy to set up.
  • On board RS232
  • Audio Excel MD-Mate Soundcard
  • 32MB RAM
netmp3-close.jpg
Here you can see the Motherboard mounted on a wooden board.


The Display

I decided to use an 20x4 display from CrystalFontz. These displays are easy to setup, have an RS232 interface, are supported by LCDproc and are available directly from CrystalFontz. The drawback was that it was quite expensive.

netmp3-display.jpg
The Display from CrystalFontz mounted in front of the player.

The IR-Receiver

On the LIRC Homepage there was a very easy description of a homebuilt IR-Receiver for the RS232. It contained only resistors, a transistor and the IR-Diode. The parts were very easy to aquire and it was assembled within an hour and fit into a small RS232 plug case. As a remote control I decided to use a programmable IR-Device from "One for all" - but this came up as a not-so-good solution as it generates IR pulses that are quite difficult to understand for the receiver circuit and LIRC. Anyway, after fiddling around and trying several remote control emulations, one worked.

netmp3-IR.jpg
Here you can see the IR receiver with the IR diode on the bottom right.


How to achieve good sound quality

Everybody you speak with will tell you that a CD has a far superior audio quality than its mp3 encoded counterpart. This is, of course, untrue. There were a lot of blindfold tests with so called "audio experts" and people could not differentiate between a CD and a good encoded mp3.

The reason why mp3 music sounds so inferior is either that it is badly encoded or the sound amplifiers are low end. I won't deal with MP3 encoding here but there are plenty of high quality encoders that can be used free of charge. The soundcard is the biggest problem. I decided to use a soundcard with digital out and feed this stream into an external DAC. I bought from Ebay a relatively cheap DAC from Audio Alchemy. Here are some more hints about soundcards/DAC's:

  • The Digital to Analog Converter (DAC) on most soundcads have a bad quality. Moreover there can emerge "humms", distortion, noise and other unwanted effects from the badly shielded PC hardware. Cards with high quality DAC's are available but are very expensive and to my mind not suitable. Therefore I would recommend to go for a soundcard with a _good_ digital output. Most modern amplifiers have a digital input anyway.
  • Don't use those Creative-Soundblaster cards, they work internally with 48khz. If you mp3 has 44.1 khz (CD quality) it will be resampled to 48khz and back-resampled to 44.1khz before the datastream leaves your soundcard. There are moreover rumours that this "conversion" is done by a combination of an DAC->ADC->DAC - it is said that the quality is intentionally reduced due to copyright issues.
    Hence I would urgently recommend you not to use a Creative card for digital out
  • Although there are some soundcards that don't do internal conversions there is something else you have to worry about: Jitter. Jitter means a displacement of your binary impulses that has a bad effect on the sound quality. To get around this issue, you have two options: 1) Use a high quality soundcard with very little jitter, or 2) use a DAC that regenerates the datastream. Both solutions are quite expensive. As I said before I currently use a souncard from AudioExcel (MD-Mate) that has quite a bad jitter but however, the sound is quite o.k. with my relatively cheap external DAC.
  • Some soundcards have optical (TOSLINK) and electrical (S/PDIF) digital outputs. Be aware that the SPDIF output has less jitter, so if you are able to choose, use the SPDIF output. Anyway there can be some problems with the SPDIF output, e.g. "humms" and other noise can get easier into your sound system as your components are not electrically decoupled with SPDIF.
We also made a blindfold test with some friends and compared the quality of our CD-Player with a high quality encoded MP3 played with my MP3-Player and the external DAC. The result was that you could easily distinguish between CD and 96khz, you could tell apart CD and 128khz but could not distinguish between 96khz and 164khz VBR. You could tell apart the CD and the MP3 player but the reason for this was the different DAC, everybody agreed that the Audio Alchemy DAC performed somehow better than the built-in DAC of my Sony CD player.

Problems I experienced

As you will expect there were a LOT of problems I had to deal with. My hint is: don't fuss around with an old 486 system. It's true that the processor power of a 486-DX4-100 is enough for decoding mp3's but you will run into a lot of problems you will not foresee. Well, here are some of my problems:
  • When I first set my player up I used an AMD 486-133 processor with a suitable motherboard. The processor power was enough, the CPU was still around 40% idle while playing MP3s. This configuration caused a LOT of problems:
    • On slow systems like this the player (mpg123 version "0.59r") caused sound quality problems. Upgrading to 0.59s solved this problem. Hence don't always blame your sondcard, also think of your player!
    • It was impossible to enable the SPDIF of my soundcard with this motherboard
    • The motherboard was not capable of PCI-2.1 but a lot of modern soundcards require PCI 2.1.
    • Moreover the Motherboard produced some noise that you could hear. Everytime you pressed the remote control you could hear this on the output. It was very weird.
    • After exchanging the 486 to a Pentium-I all these problems went magically away.
  • A Pentium-I with 200Mhz (no MMX) produces quite a lot of heat. (15W). If the CPU is not utilized it stayes quite cool. Anyway, although playing a MP3 needs 40% of the CPU on a P-I 100 and only 20% on a P-I 200 the P-I 100 stayes cooler. I would recommend you to get the biggest passive cooler you can afford. The temperature of the heat sink on my CPU gets to ~ 50°C which is quite hot. Sometimes I experience random crashes, maybe the CPU gets too hot sometimes.
    I heard that Celerons processors also produce not so much heat and there should be passive coolers available, perhaps this is also an option.
  • When playing I had dropouts at first. Every 5 secunds the sound would stutter. After a long investigation I found out that setting the NFS-rsize to 1024 solved the problem.
  • The network boot can also be very tricky. My netboot client (=mp3 player) mounts the "/" directory of my server readonly. This has the advantage that the player has every software package that's available on the server but the HUGE disadvantage that upgrading the Linux distribution on the server also means breaking the mp3 player as the upgrade process replaces some imporant files (like /etc/init.d/boot). Maybe I will set up a mini-linux dedicated only to my mp3 player.
  • The far worst problem is organizing your MP3 collection. Selecting one song out of 10000 with a remote control and a 20x4 display is quite tricky. I still have not seen a really good solution but this is another topic.

Conclusion

After all my solution works quit well, it has its drawbacks but I think it really has most of I expected. Moreover setting the whole thing up was quite a lot of fun and I also gained some knowledge during the setup.

So if you plan to create your mp3 player of your own, just do it, it means fun, is relatively cheap and works quite well after all.

netmp3-2.jpg
Here is another picture of my NetMP3 Player


Links