You are not logged in.
Short question:
Would somebody please point me to a GStreamer-like library that can play MP3, Ogg, and AAC files? It must have gapless playback, the sole reason GStreamer won't do. Python bindings and good documentation are preferred. Tagging support is optional, I'm planning to use Mutagen anyway.
Long, unnecessary explanation:
I was taking a break from my trusty MPD to evaluate Quod Libet. At first I mainly used the album list view (a habit from browsing in Sonata), but then I read the docs and fell in love with the search view. It's a simple, quick, powerful way to browse music by any combination of tags and metadata you like. I was happy with it for around a day, but then I listened to a live album and remembered why I didn't like GStreamer-based players. The lack of gapless playback is unforgivable these days.
The obvious next step was to try to write an MPD client with my dream UI (best of both worlds, right?), so I looked up the protocol documentation. First came a pleasant surprise: the protocol is line-based and as simple as I've seen. This was immediately followed by some less pleasant surprises. First, MPD only supports searching by a few select tags. That might have been workable if it also supported complex queries. It doesn't. The 'find' command is case-sensitive and requires an exact match. 'search' is case-insensitive and does not. Both of them allow you to search either a single tag (of those mpd indexes) or all of them. Obviously not enough for even moderately complex queries.
At this point, I was looking at building my own SQLite index of the songs in mpd's index. If you factor in the connection to the server, this would be slightly more complex than a standalone player, assuming a reasonably simple playback library.
So that's where I am now. I looked at a few of the popular options, but wasn't impressed:
* xine:
Pros: Gapless playback, code proven in similar contexts (used in Amarok), an actual library
Cons: Python bindings are dubious at best, complex, documentation seems to consist of "read the header files"
* Helix:
Pros: Semi-commercial (so it's polished, right? Right?), seems well-documented
Cons: No Python bindings, complex, the commercial partner is Real
* MPlayer:
Pros: Good engine, gapless playback (I'm fairly sure)
Cons: Not a library (parsing stdout for display in a GUI is UGLY!)
* mpg321, ogg123:
See MPlayer
Offline
Short question:
Would somebody please point me to a GStreamer-like library that can play MP3, Ogg, and AAC files? It must have gapless playback, the sole reason GStreamer won't do.
I guess that it is possible to implement gapless playback using GStreamer (Rhythmbox and Flumotion's jukebox do).
So you just may go and read some code there to see how they do it.
Offline
Thanks, gummibaerchen. After some more Googling, it does look like GStreamer can support gapless playback. It's just up to the developer, which is kind of a pain. Still, it looks like the least of the available evils.
Offline
If you were going to write an MPD client anyway, maybe you could take a look at XMMS2? It has a similar approach as MPD but their entire collections approach lets you use some fairly complex queries. It also has python bindings. The only thing i'm not sure of is if it supports gapless playback yet.
I was actually contemplating trying to write my own XMMS2 client so I would have my own preferred UI, but I just found gmusicbrowser and i'm starting to really dig it. It gives you a lot of flexibility when it comes to UI layouts.
Offline
For your information, QuodLibet can - as of svn changeset 4129 - use xine as a backend instead of gstreamer.
06/18/07, 07:00
Changeset [4129] by piman
Xine backend. (Lukáš Lalinský)
I tested it back then, and it handled gapless playback flawlessly. I remember having to ask around about how to enable it, but I think it involved editing a .py file.
Anyhow, an MPD or xmms2 client similar to QL would be awesome - I'm too used to quit X and still have music to go back to QL now
Last edited by delaril (2007-12-11 16:37:34)
Offline
Most Linux music players / clients are severely limited by their foundations (gStreamer, MPD, etc.) as you noted. Are there any better replacement libraries than the most common ones used? You would hope / think someone would have used them by now if there were. I'll be interested in the responses.
Also, most of the clients are deficient in tagging and metadata display due to either development using the "wrong" tools / libraries to begin with or not fully implementing the power of the ones they do utilize. In regard to the latter, mutagen is a very nice tool used by several players including Quod Libet and Exaile, yet only Quod Libet (and its tagger, Ex Falso) allows for arbitrary tagging and utilization of those tags within the player. Quod Libet is very good in this respect by comparison to its Linux brethren, but as noted, it suffers in another respect from being based on gStreamer. As an aside, why is everything being written in Python? And another aside: what's up with Linux developers believing that pausing a track is the same thing as stopping playback (i.e., many players eschew a "Stop" button in favor of only a "Play/Pause" toggle button ... not good; even the otherwise-mostly-thoughtful Quod Libet doesn't have a Stop button)?
The MPD clients are probably most limited, especially regarding metadata, and thus RobbeR49's comment. One thing that I can't really figure from XMMS2 documentation (and MPD2 comparisons) is how it does (or is planning to) handle arbitrary (user-defined) metadata. "Powerfully" searching your metadata using "collections" does not mean much if XMMS2 can't read / map all of the data contained in the files. Perhaps I missed something or maybe the functionality will be available but was not explicitly mentioned. I'm hoping.
By the way, gStreamer, as far as I am aware, cannot do gapless (just corroborating what was stated here in this thread), and as a result, players based on it cannot either. To put a finer point on the issue, the "gapless" that Rhythmbox implemented is done via DSP (a crossfader to be exact). It does play more seamlessly than it does without the crossfade-module enabled (and of course, more seamlessly than the players that don't have any similar DSP), but there is a distinct, audible transition between tracks which can be described as either pops, clicks, or other annoyances that vary in frequency and volume depending on the source at the time of the transition from one track to another. True gapless does not rely on external DSP and when done correctly, transitions are not audible. I suspect that Flumotion's jukebox applies some similar technique as Rhythmbox. Anyone know for sure?
The link below contains a set a files for testing gapless playback:
http://wiki.hydrogenaudio.org/index.php?title=Gapless
Listen to them in Rhythmbox with the crossfader enabled (see note below) and then listen in something that really supports gaplesss like Foobar2000. RB will disappoint.
I have been on the same search as Skymt for as long as I have been using Linux, and we are not alone. I have tried lots of the players including (but not limited to) a multitude of MPD clients, Banshee, Exaile, Listen, Rhythmbox, Quod Libet, etc., etc.
- I have broken out Eclipse and PyDev to dig through source code and attempted to change things that I didn't like (adding a Stop button to Quod Libet, for example);
- I wrote a script that allowed playback of CD Audio in gMPC with artist, album and track # / title visible;
- I attempted writing a mutagen-based script to create custom playlists based on my user-defined tags, but if the players won't import the lists properly, what's the point?;
- so, I dug through the players' SQLite databases as Skymt has contemplated (try Sqliteman ... it's a nice tool);
- etc.
but the required hacking goes much deeper than that or is impossible when considering gStreamer and MPD as the clients' foundations, so I have given up for now.
Finally, anything and everything I've written stands open to correction, so feel free. I really would like a native solution, now or in the future.
----
Note1:
When playing the test files in Rhythmbox with the crossfader enabled, you may have to transcode the *.wv to something else like Lame MP3 or OGG. Rhythmbox played the *.wv files without the crossfader enabled, but would not play them with it enabled. I did not bother to understand why, I just transcoded.
Last edited by MrWeatherbee (2007-12-23 00:20:08)
Offline
For your information, QuodLibet can - as of svn changeset 4129 - use xine as a backend instead of gstreamer.
06/18/07, 07:00
Changeset [4129] by piman
Xine backend. (Lukáš Lalinský)I tested it back then, and it handled gapless playback flawlessly. I remember having to ask around about how to enable it, but I think it involved editing a .py file.
Anyhow, an MPD or xmms2 client similar to QL would be awesome - I'm too used to quit X and still have music to go back to QL now
Excellent. At least in regard to one particular issue. I'll have a look later. I've already been messing around with the snapshots anyway.
But are you sure Xine is doing true gapless? My playback tests indicate it is not (it produces the same transition artifacts that Rhythmbox does with its DSP / crossfade technique).
Last edited by MrWeatherbee (2007-12-11 17:34:09)
Offline
But are you sure Xine is doing true gapless?
Yes it does, but only for gapless formats such as flac, ogg and some others. And it has deplorable bug with seeking and playing flac files. So at now, it almost useless for playing music.
Last edited by eDio (2009-12-09 20:07:16)
Offline