PDA

View Full Version : Ugh. Command line media player



t3hi3x
March 20th, 2008, 02:45 AM
Ok. This is driving me nuts

In VB there is an ActiveX control from M$ that is essentially an API for windows media player.

Well, I'm trying to make a program that would use the same info provided by the API. You can essentially control any form of the player.

Of course Linux doesn't use OCXs, and I wouldn't half way want it to, but I'm looking for something that I can use to make the program in.

The program is to be completely command line, and I'm programming in C++. I would be perfectly fine with a program that is command line, and just do it that way.

I've tried mplayer, and VLC, but neither seem to support robust command line control.

Any ideas?

sowelie
March 20th, 2008, 02:50 AM
I know you can control Rhythmbox and XMMS via the command line. Here's an article I ran into today:

http://http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys#Rhythmbox

t3hi3x
March 20th, 2008, 03:12 AM
There are several good players on there, but will any of them support command line only operation? I'm wanting to run this on a box without an X session.

LaRoza
March 20th, 2008, 03:13 AM
There are several good players on there, but will any of them support command line only operation? I'm wanting to run this on a box without an X session.

mplayer by default has no GUI.

t3hi3x
March 20th, 2008, 03:14 AM
mplayer by default has no GUI

I've looked into that, but I can't seem to manage to control it via command line - specifically within a C++ program.

Have you had any luck doing this?

sowelie
March 20th, 2008, 03:15 AM
Ah, I see what you're going for. You should just use some sort of MP3 library instead of a media player, that way you can have complete control.

LaRoza
March 20th, 2008, 03:16 AM
I've looked into that, but I can't seem to manage to control it via command line - specifically within a C++ program.

Have you had any luck doing this?

That would not be the way to do it. To use the command line, try shell scripting, Perl, Python, or Ruby.

How about xine-lib? It would be suitable for that.

t3hi3x
March 20th, 2008, 03:34 AM
Thanks for the direction. I'm looking into xine-lib, they don't like c++, but tough patoot :)

lol. I'm going to try to find an example for this, but it looks pretty promising.

t3hi3x
March 20th, 2008, 03:44 AM
Thanks for the direction. I'm looking into xine-lib, they don't like c++, but tough patoot :)

lol. I'm going to try to find an example for this, but it looks pretty promising.

Well maybe, does xine support streaming audio?

t3hi3x
March 20th, 2008, 03:57 AM
Well maybe, does xine support streaming audio?

Yup. It does.

stylishpants
March 20th, 2008, 06:00 AM
mpd is nice for this sort of thing, it provides a very scriptable interface and no need for X.