Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This article rings true with me on so many points.

I spent years searching for, and coding my dream music player/manager. Going through tens of different backends, servers, etc, not limited to: - MediaMonkey: windows only - Amarok: terrible interface, slow and hard to extend - foobar2000: closed source/windows only/columns UI stopped working - MPD: Just not enough, also poor codec support (I use wavpack) - xmms2: was a baby at the time - ExFalso

I started coding my own, dubbed lomp: https://code.google.com/p/lomp/ I solved so many interesting issues that seemed to plague other music software: I got client/server working, output redirection, even ended up coding my own library management, then tagging library. Tangentaly, tagging is HARD, no one does it correctly. The best library I found on ANY platform or in ANY language was Mutagen, part of the Quodlibet https://code.google.com/p/quodlibet/ project; but even it got a few things wrong. I eventually tried to split off my efforts as 'lamt' https://github.com/daurnimator/lamt but didn't dedicate enough time. Also worked on a wide range of front ends: console, web, etc.

But as I coded this media player, I could never settle on a decoding or output library; I went through SO many: - controling mplayer/cplay/aplay via a pipe - libvlc - gstreamer - Phonon - libavcodec But none were enough, or way too buggy... After years of failing, I decided I better just do it myself, so I started again: https://github.com/daurnimator/lomp2/ This time using LuaJIT's brand new (at the time) ffi to directly talk to libao (which I found to be the best cross platform audio output solution)

I ran out of time to work on lomp when I was at university, and now I have a job that keeps me busy. I wonder how many of my pain points you guys have solved.....

Feel free to reach out to me if you want to discuss more.



I'm particularly interested in your opinions on tagging. Can you explain what most software gets wrong about tagging?

Here's the plan so far, although it's not implemented: https://github.com/andrewrk/groovebasin/issues/30

The idea is that you might edit tags for a file which doesn't even support tags, such as AAC. So it would let you do that, and the changes would then be reflected in the DB. However we would also have a UI pane for "Suggested Library Fixes" or something like that. This would be things like moving files to their canonical location, updating incorrect duration tags, duplicate file detection, etc. It would also have suggestions like this:

* These songs have tag edits that you have made but they cannot be saved. Do you accept this change? (Proposed change: wrap the file in a container format which supports tags)


> I'm particularly interested in your opinions on tagging. Can you explain what most software gets wrong about tagging?

First up, tagging is such a personal preference, from the highest level things like which fields to fill in (e.g. Album Artist), to small differences (e.g. do tracknumbers have a leading 0?), but also technical differences and compatibility choices (e.g. which tagging format? for MP3 you can have any of APE1, APE2, ID3v1 or ID3v2.{2,3,4})

Next these different tagging formats are in no way uniform: APE2 and vorbiscomments are a string map with some generally agreed upon conventions, ID3v1 has very limited fields, ID3v2 is extremely over specified with a tag for everything in practice this just seems to mean that every program gets them wrong somewhere. There are several other formats too...

Next, the tagging systems are very tricky to locate and modify: they all have various forms of headers, footers, padding, and odd storage formats. e.g. flac/vorbiscomments keep swapping back and forth betweeen little and big endien. This is made mode complex by the various fighting container formats that have their own escaping, rules etc on top e.g. Ogg, MPEG, Matroska....

To make things even harder, things aren't even correct without context. To take the duration issue from the article, VBR MP3 has no way to calculate duration without completely parsing the files: this takes too long for most files (reading the whole file into memory just to get the length???? no way!) so there's all sorts of heuristics and weird headers (e.g. Xing)


There are many issues with tags:

- multi language - id3v2 tags support having multiple title tags. Yet software will assume there is only one, and won't show alternative titles. This becomes problem when exactly same song has multiple names, one in original script, one transliterated, one English translation.

- old international tags - most software can't deal with Russian KOI8 and Polish Mazovia at the same time

- multiple artists - there are songs that are collaborations of multiple artists. For example: 'Will.I.Am & Brittney Spears' gets treated as own artist, as opposed to collaboration. Music Brainz and Discogs handles this in their data.

- alternative artist names - Some artists produce under alternative names. Most tags assume that 'Norman Cook' and 'FatBoy Slim' are two different artists. Same with 'Richard James' and 'Aphex Twin'. Discogs handles this

- hierarchical, multiple genre tags - Most software supports simple genre tags. Few applications can handle multiple genre tags. What about tag hierarchy (ie: Rock -> Symphonic Rock -> Kraut Rock?).

- Extended info tags: mood, style, bpm, key - Sometimes when I am melancholy I care for love songs, I don't care for genre, it can be jazz, or death metal (last.fm data contains enough to map mood/style/decades). When I DJ, I need info on BPM and Key (ie: A Minor), so that one song fits the next. (from Echonest / Beatport support this)

- composer vs performer - for classical music it is as important to know who composed a piece (ie: Chopin - Funeral March) as who was the perfomer (was it Rubenstein or Padarewski)

- spoken word - music listening is quite different from spoken word, like audiobooks. Most software sees just a music file and doesn't handle proper spoken word distinction, while use case is very different

- tag sources - while writting tags, there should be additional tag saying where it came from. Foobar's Foo_discogs and Foo_musicBrainz plugins will write source ID, so that at a later time songs can be updated to online db (assuming discogs/musicbrains has updated their db entry)

- song popularity - there are tags to track song popularity and ratings, yet most software ignores it, or does this badly themselves

- stand alone songs vs mixed songs - some albums / artists have stand alone songs. These can be listened to randomly. Other albums will have songs flow one into another (listen to any Jean Michelle Jarre album, or live dance music split into tracks). There is no proper handling of how these flow

- replay gain - most software is not smart to handle album vs song replay gain properly. Not to mention that there are two types of replay gain for mp3s alone. One will change quantization values, one will write tags.

- images - APIC tag adds image support, yet most software barely reads cover APIC, and ignores remaining APIC (like label logos). Not to mention that this is lost space as each song in album will contain own APIC, making a duplicate of images.

- label tags - Some people like to listen music based on the label that published it. UKF Dubstep, Monstercat, or Ninja Tune are just some labels that people keep track of.

- alternative versions - some songs will have alternative versions, I don't mean remixes or covers by someone else, but main artist will often release few copies of the song. Sometimes the difference is in swear words (explicit vs censored), othertimes it is matter of length (original 7 minute mix vs radio 3 minute mix), other times it is matter of single having vocal vs instrumental versions. Sometimes it is a matter of live recording (ie: mtv unplugged). Most software will either assume songs are different because title tag is different, or will assume they are exactly same.

- sort tag - artists have one name they are to be displayed while should be sorted differently. For example: The Beatles should be under letter 'B'. Most software sucks at this, even though we have the tags, they are not there.

- album subtitle - some albums will have CD1 and CD2 with a subname. For example two cd album 'Destination Lounge: New York City', has CD1 subtitled 'Relax' and CD2 'Revive'. Most software either will need to drop the per cd subtitle, or will split and consider CD1 as separate album from CD2. http://musicbrainz.org/release/cec1efa8-6541-4f9c-8f55-c86b1...

These are just some off top of my head.


Not sure if you are interested but I maintain an entire blog on the subject... http://www.blisshq.com/music-library-management-blog/categor... (that's just one category, see others) please note: this is my own commercial site. It'd be great to discuss with you!


Hi darnimator,

Your statement rings VERY TRUE to me as much as the original article, and there may be an opportunity here. I've spent some time (I'm sure not nearly as much as you have) hacking on this problem, but primarily from the library management aspect, and I lean on VLC plugins for play/streaming. This seems to mesh quite nicely with the sides of this that you touch; tagging and such are exactly the sort of problems I'd find most compelling, whereas I'm quite out of my league in the media aspects of it. (my biggest "pain points" were good integration of torrenting/a programmable pipeline for dealing with torrents, library organization, and various distributed features... less pain points I guess, and more things I found compelling enough to not procrastinate on hacking on.)

I also have a job that eats my time, but if you would like to trade contact info, I'd be more than happy for a chance to pick the brain of someone who's been attacking this longer than I have, as well as potentially see what could come of it.


> directly talk to libao (which I found to be the best cross platform audio output solution)

Whoops, libao was a dead end too :P

I meant OpenAL

Searching for a link just now, it looks like it died in the last couple of years :(

We can look in the wayback machine.... http://web.archive.org/web/20130729040534/http://connect.cre... The OpenAL soft project http://kcat.strangesoft.net/openal.html website is still up at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: