Command-line MP3 Players, cross-platform.
May 1, 2006 5:17 PM Subscribe
Programmer seeks command-line, cross-platorm MP3/Other format Player for Win32, Linux, for scripting, cuddling.
I'm trying to develop a larger application suite that needs MP3 support and while the rest of my apps are cross-platform, I'm having a devil of a time finding a command-line player that will work on both Linux AND Windows. Closest I ever came was the mostly defunct mpg123 which doesn't seem to be actively developing against Win32 and had a fair number of Windows issues when I last used it.
I'd like to keep the overhead at a minimum -- optimally the device is headless, networkless and plugs into speakers and thats it.
Barring a cross-platform approach, I'd be willing to bend to just a GUI-less win32 command-line platform.
I'm trying to develop a larger application suite that needs MP3 support and while the rest of my apps are cross-platform, I'm having a devil of a time finding a command-line player that will work on both Linux AND Windows. Closest I ever came was the mostly defunct mpg123 which doesn't seem to be actively developing against Win32 and had a fair number of Windows issues when I last used it.
I'd like to keep the overhead at a minimum -- optimally the device is headless, networkless and plugs into speakers and thats it.
Barring a cross-platform approach, I'd be willing to bend to just a GUI-less win32 command-line platform.
Libmp3123 is what you need for Linux - it's the standard. For windows, unless someone has coded a DOS mp3 player, you're out of a luck for a "pure" command line mp3 player in windows. I know winamp has command line access, but I don't know if that pops the GUI up or not (or if you can turn the GUI off).
I believe it costs money to implement a mp3 decoder, because there is a patent holder on the algorithm - this may be why there are so few.
posted by SweetJesus at 5:30 PM on May 1, 2006
I believe it costs money to implement a mp3 decoder, because there is a patent holder on the algorithm - this may be why there are so few.
posted by SweetJesus at 5:30 PM on May 1, 2006
Mplayer is available for Linux and Windows, scriptable from the command-line, and plays mp3s. It's overkill for what you need, but, well, it'll also give you the ablity to play numerous other audio formats, so it's not all bad.
posted by jellicle at 5:31 PM on May 1, 2006
posted by jellicle at 5:31 PM on May 1, 2006
Seconding mplayer. It's designed for video, but it's the most fuss-free command-line audio player I've ever used. You get source, too, so you could build restricted versions if you want.
posted by flabdablet at 5:53 PM on May 1, 2006
posted by flabdablet at 5:53 PM on May 1, 2006
Why not just write for two diffrent programs on each OS? Test to see if one is there, and if it's not, use the other.
posted by delmoi at 6:19 PM on May 1, 2006
posted by delmoi at 6:19 PM on May 1, 2006
The venerable LAME can decode MP3s as well, and there's the aforementioned MAD. Mplayer just seems like overkill to me, unless you want to support other formats like OGG, etc.
posted by zsazsa at 7:12 PM on May 1, 2006
posted by zsazsa at 7:12 PM on May 1, 2006
Response by poster: Delmoi -- I'd be more than willing to do that if I could find a windows command-line app that didn't suck. While there is stuff down to pure DOS (one I found a oldschool .WAV app that just continued to get burlier into the modern age), most of it required a mangled EMU to get it to work :(
I'll give mplayer a whirl and see how that comes out. I'd come across it when smacking google, but the documentation had bad things to say about using it as an audio player:
(I'm still open to suggestion, though)
posted by Ogre Lawless at 1:16 AM on May 2, 2006
I'll give mplayer a whirl and see how that comes out. I'd come across it when smacking google, but the documentation had bad things to say about using it as an audio player:
MPlayer is a movie and not a media player, although it can play some audio file formats (they are listed in the sections below). This is not a recommended usage of MPlayer, you better use XMMS.Which is great and all, if XMMS did command lines or cross-platform. Better to use mplayer than sit on my duff on this project, though...
(I'm still open to suggestion, though)
posted by Ogre Lawless at 1:16 AM on May 2, 2006
For a Windows command-line player, how about Jon Lech Johansen's snd123? From the page:
Dependencies: .NET runtime (Mono)
Supported Formats: MP2, MP3, AAC, Ogg Vorbis, Speex, FLAC, Apple Lossless, AC3, CDDA, WMA 1 and 2.
posted by bachelor#3 at 6:13 AM on May 2, 2006
Dependencies: .NET runtime (Mono)
Supported Formats: MP2, MP3, AAC, Ogg Vorbis, Speex, FLAC, Apple Lossless, AC3, CDDA, WMA 1 and 2.
posted by bachelor#3 at 6:13 AM on May 2, 2006
This is not a recommended usage of MPlayer, you better use XMMS.
Consider this directed at people using mplayer interactively, as their desktop audio player. Using mplayer as a format-agnostic audio decoding thing behind the scenes is probably its #2 use.
posted by mendel at 8:55 AM on May 2, 2006
Consider this directed at people using mplayer interactively, as their desktop audio player. Using mplayer as a format-agnostic audio decoding thing behind the scenes is probably its #2 use.
posted by mendel at 8:55 AM on May 2, 2006
alsaplayer - it has pluggable "UIs" so you could even hook callbacks into your app.
posted by ny_scotsman at 9:17 AM on May 2, 2006
posted by ny_scotsman at 9:17 AM on May 2, 2006
Er, the "L" in ALSA doesn't stand for "Windows"! Alsaplayer is about as not-cross-platform as you can get.
posted by mendel at 7:47 AM on May 3, 2006
posted by mendel at 7:47 AM on May 3, 2006
This thread is closed to new comments.
posted by devilsbrigade at 5:21 PM on May 1, 2006