BlogCadre users see no ads!  Popular topics: humor, video, links, cool, wtf.  Go create an account!




Gapless MP3 & FLAC in Linux with MPD

Kill your media player (part I).

When it comes to digital formats quality is all but lost.

I enjoy listening to CD quality (uncompressed) audio streams and have been known to bring a CD to work on occasion to do so. However most media players geared towards playing file streams (like MP3s) have broken implementations for CD playback. So I'll stick to encoded files for media players -- and why not FLAC? Lossless, yes, gapless, maybe. Let me restate that if several tracks from the same CD bleed into each other across the track marker, surely our 21st century computers should be able to reproduce the 'gapless' 1980's technology known as the 'compact disc' (even if they're in separate, adjacent files). Tracks should play back with no interruption AS GOD INTENDED IT.

This is what leads me to want to kill my media player. There are *incomplete* implementations of gapless playback in xmms, amarok (xine), et. al., and it is driving me crazy. Amarok is good for gapless MP3s, but recent versions are broken for gapless FLAC playback. Ubuntu has some patches to fix FLAC track changes (for an older version of xine). Also amarok/xine still occasionally have audio device contention issues (especially after playing a flash video in mozilla) which I thought shouldn't be an issue when using alsa.

The best I've found so far is mpd/mpc for both MP3 and FLAC gapless playback. However, IMO it is a goofy combination of a client/server and frankly most of the clients aren't very user friendly (try moving tracks around in your current playlist using mpc on the command line). The *better* UIs are sonata, kmp & glurp:

  • kmp (v 0.5) has a decent track position slider and a system tray icon.
  • sonata (v 0.9) looks the best, but seeking within a track kinda sucks & can't minimize to the tray.
  • glurp (v 0.11) is very usable, but also has no system tray feature.

For KDE users, you may opt for KMP, and glurp for the Gnome/GTK crowd. Give them a try, frustration may come out of working with the (strange IMO) client-server relationship, but I guarantee they will not disappoint in the playback category.

Trackback URL for this post:

http://www.blogcadre.com/trackback/2892
from BlogCadre on April 6, 2007 - 3:34pm

Kill your iPod (part II).
When it comes to audiophiles all is but lost.
With the advent of MP3, the idea of lossless audio seemed to have fallen upon deaf ears. Enter: FLAC, the Free Lossless Audio Codec, it compresses waveforms by finding similarities (

interesting

Jason Striegel's picture

it's strange that this isn't a standard feature.

iTunes does a fade transition between songs, but it would be preferable to just flow directly from one song to the next on in the playlist, without a pause.

isn't this just a matter of buffering the audio from the next track before the first has completed playback?

MP3 has a fixed frame size

isn't this just a matter of buffering the audio from the next track before the first has completed playback?

It is, but the MP3 standard apparently has fixed frame sizes so the player has to be smart about dealing with the last frame of the current song and throw away any empty data before moving onto the next song. I've been *very* pleased with MPD in this respect (hence the post).

Now if I could only build one of these to get rid of the extra noise -- electromagnetic interference (EMI) that you hear during mouse movement, screen redraws, hard drive scratching -- that come out of virtually every computer sound card's headphone/speaker out.

Someone want to help me build this: DIY Portable DAC?