Controlling VLC from FoxyTunes

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
iosart
New Cone
New Cone
Posts: 4
Joined: 07 Sep 2004 22:06

Controlling VLC from FoxyTunes

Postby iosart » 07 Sep 2004 22:18

My name is Alex Sirota and I am the author of a Firefox extension called FoxyTunes, which allows the users to control their media players from Firefox.

http://www.iosart.com/foxytunes/firefox/

I received many user requests to add VLC support.

I've looked at the different VLC control interfaces and didn't find one that I can use naturally:
1. rc/command line - not very efficient for automation from C++
2. http - no way (I think) to get track info etc. without changing user's installation, need to simulate http session from C++
3. telnet - doesn't seem to have all the options.
4. corba - no windows support (?)

I need a simple way to perform basic control functions - play/pause etc, and get the basic info about the currently playing track - name/position/length etc.

Am I overlooking something? Is there a client C/C++ code somewhere that is multiplatform and does something similar?

Thanks,
Alex

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 08 Sep 2004 14:45

The HTTP interface can do this btw in the next version...
Beyond that i don't see another possibility, but as always I advise you to drop in on the IRC channel and/or join the vlc-devel mailinglist.
Don't use PMs for support questions.

iosart
New Cone
New Cone
Posts: 4
Joined: 07 Sep 2004 22:06

Postby iosart » 28 Oct 2004 07:48

The HTTP interface can do this btw in the next version...
Is the next version out already?
If so, can you please demonstrate how to get the track title through this interface?

If no, can you please tell me when it will be out?

Thanks :)

chaosfive
New Cone
New Cone
Posts: 4
Joined: 15 Nov 2004 01:57

Postby chaosfive » 15 Nov 2004 18:17

These files work with 0.8.0 of VLC, and need to be in the VLC\http directory.

To fetch information in 'name\nvalue\n' format (great for hash bindings):

Code: Select all

<vlc id="foreach" param1="cat" param2="information" /><vlc id="foreach" param1="info" param2="cat.info" /><vlc id="value" param1="info.name" /> <vlc id="value" param1="info.value" /> <vlc id="end" /><vlc id="end" />
To fetch state information (current position, status, etc):

Code: Select all

<vlc id="value" param1="stream_state" /> <vlc id="value" param1="stream_time" /> <vlc id="value" param1="stream_length" /> <vlc id="value" param1="volume" />
Save them to something like 'tags.html' and 'state.html' in the VLC\http directory, and start VLC with '--extra-intf=http' (alternatively for a headless session, '--intf=http')

I also recommend replacing the default index.html with an empty file for speed reasons: index.html is returned on every control query and a long, complicated index can be problematic.

I've been using the http interface to build a Python control structure, but it's somewhat slower than I'd like. I'm trying to get the CORBA interface to work on Windows, but I've had minimal success so far.

For controlling the player and getting playlist data, look in 'http\index.html' --- the examples are all fairly straightforward.

For example, to pause the stream, issue a request to:

Code: Select all

http://localhost:8080/?control=pause
I'm open sourcing my work on the Python bindings once they're stable: e-mail me and I'll send you what I have so far. It works reasonably well, but it's rather messy.

iosart
New Cone
New Cone
Posts: 4
Joined: 07 Sep 2004 22:06

Postby iosart » 15 Nov 2004 18:48

Thanks a lot! :)

One question - I was trying to get information out of VLC -without- modifying user's installation (like the httpd directory).

The DJ said
The HTTP interface can do this btw in the next version...


Is this indeed possible in the new version?
If so, how?

Sigmund
Big Cone-huna
Big Cone-huna
Posts: 893
Joined: 26 Nov 2003 09:38

Postby Sigmund » 15 Nov 2004 20:44

provide these files with your app, and lounch vlc with --intf http --http-src=<path to the files>

iosart
New Cone
New Cone
Posts: 4
Joined: 07 Sep 2004 22:06

Postby iosart » 15 Nov 2004 20:51

provide these files with your app, and lounch vlc with --intf http --http-src=<path to the files>
Thanks, this is a nice solution.
There is one problem - sometimes the user will launch the player and not me - I cannot really control that...

Actually I was looking for something like:

Code: Select all

http://localhost:8080/?get=current_track_name
That will just return the info without needing special additional files.

I'm not sure this can be done though...

shura
New Cone
New Cone
Posts: 3
Joined: 21 Aug 2007 11:16

Re: Controlling VLC from FoxyTunes

Postby shura » 21 Aug 2007 11:22



Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 46 guests