headless mp3 player
Can somebody recommend a good backend to play audio files? This would have to be something that can be run without X, and that can be controlled from stdin or from a socket or something (just play/pause/stop a single file, no playlist management needed). It would also be nice if it printed out it's progress every second, but that's not really necessary.
So far I've been using mpg123, and that does exactly what I need it to do, but looks like it ONLY plays mp3s. Although that's mostly what I have, I'd like to be able to also play wma, ogg, etc.
I'm not certain but does mpg321 support the other formats? It is an ALSA app meant to replace the OSS only mpg123. That may be a stumbling block for you depending on your audio hw physical configuration and/or if you haven't moved to ALSA yet.
Also look at XMP and ogg123 (vorbis-tools). Dunno if it does everything you want though or if they are OSS/ALSA/whatever.
Have you looked at mplayer?
If you're using arts you can use artsdsp to wrap mpg123 to use arts calls instead of directly openning /dev/dsp. It works okay for me. I know arts is a pig but it has some handy features.
well, the only problem I have with mpg123 is that it only plays mp3s. mpg321 looks pretty cool, I didn't even know that mpg123 was not gpl. I might switch to 321 if it really is a drop-in replacement.
I (briefly) tried mplayer and it didn't behave well for me - it played a file just fine, but when I tried rewinding/fast forwarding through it I got a ton of frame errors and then it crashed. But I'll try it again with a different file sometime, maybe that one was just flakey...
Has anybody tried using the gstreamer API? Looks like it could be really cool... it even supports LADSPA filters, so theoretically it could do surround processing, etc. Problem is, I have no idea where to start. It looks pretty massive.
mpg321 isn't a _complete_ drop-in replacement. The socket connection ability isn't there, something I use in mine. But you're right it would be nice to be able to play other formats.
Have you looked at mpd?
It is headless, but can support many different types of frontends, from cli, kde, gnome or web. It can also play mp3, ogg, flac. I don't know if it can play wma, because I stay away from closed type formats.
Decided to use mplayer. At first glance it didn't seem to do quite what I wanted, but then I discovered the -slave option - makes it listen for commands through stdin. It can also output to JACK or stdout (as well as ALSA, etc.) and you can insert LADSPA filters as command-line options. I think it actually might use the gstreamer API? Dunno.
Also, it also looks like it can duplicate audio channels (to play a stereo mp3 through a 4/6 channel sound card and hear it on all speakers. Just what I needed.
Anyone interested in mplayer slave mode, here's the command list I found: http://www.mplayerhq.hu/DOCS/tech/slave.txt
Thanks for the input everyone..
try some other..
hi.. looks like i'm reading this quite late... try amacdys for a change. that is if you only want backend of course. but it only for some legacy hardware. have fun!!