How drive vlc (interface rc) with tcl

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Horix
New Cone
New Cone
Posts: 2
Joined: 26 Mar 2009 13:26

How drive vlc (interface rc) with tcl

Postby Horix » 26 Mar 2009 13:35

Hello,

I want make a script in tcl to drive vlc. I'm trying to use the rc inteface.
So the first command is:

Code: Select all

set canal [open "|vlc MyVideo.avi --intf qt --extraintf rc -- rc-fake- tty" "w+"]
so MyVideo start to play in the gui windows and the rc windows is open.

The folowing commands are:

Code: Select all

puts $canal "pause" flush $canal

But nothing append, the video is always running.

Why, have anyone an idea about this ?

Horix

revolunet
Big Cone-huna
Big Cone-huna
Posts: 515
Joined: 17 Oct 2007 13:16
VLC version: 0.9.8
Operating System: Vista
Location: Paris, France
Contact:

Re: How drive vlc (interface rc) with tcl

Postby revolunet » 26 Mar 2009 14:24

VLC & web IT consulting - http://www.revolunet.com
Github : http://github.com/revolunet

rocket888
Blank Cone
Blank Cone
Posts: 47
Joined: 01 Jul 2008 10:01

Re: How drive vlc (interface rc) with tcl

Postby rocket888 » 10 May 2009 23:43

When I look at the link at http://wiki.videolan.org/VLM all it shows it how to run the telnet or http interfaces, but nothing about how to actually send commands. Is there another place that actually shows how to use the telnet or http interfaces, not just how to get them running from vlc.

I've tried sending the basic commands to telnet and all it seems to understand is help and exit. Even the commands that are mentioned in help don't work, e.g. I type "pause"<return> and nothing happens, except it complains about an unknown command.

I'm running on windows xp with 0.99 and I use the command prompt MS built in telnet program. I can connect fine and help works so I have to think I'm connected properly.

With the http interface, I am able to do basic commands, but the command set is quite limited. For example, I can't do commands such as setting the speed (faster, slower) or commands to set the aspect ratio etc.

To the OP: I do know how to pause using http, though, with this tcl command, but you have to enable the http interface, which I do in prefs, but can be done on the command line with, -I http or -extraintf http.

Code: Select all

package require http set ::playerhost <ip address or localhost for local machine> ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=pl_pause" Here are a handful of others I've figured out, ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=fullscreen" ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=volume&val=60" :http::geturl "http://$::playerhost:8080/requests/status.xml?command=seek&val=-2m" ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=seek&val=-30s" (seek forward - with encoded plus sign %2B, +2 minutes) ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=seek&val=%2B2m" ::http::geturl "http://$::playerhost:8080/requests/status.xml?command=pl_stop"

paquito
New Cone
New Cone
Posts: 1
Joined: 21 May 2009 11:27

Re: How drive vlc (interface rc) with tcl

Postby paquito » 21 May 2009 11:31

if you look in the share/http/requests folder (where the sample XML requests reside, there is a readme with more commands)

to pause and return the status: http://localhost:8080/requests/status.x ... d=pl_pause

Horix
New Cone
New Cone
Posts: 2
Joined: 26 Mar 2009 13:26

Re: How drive vlc (interface rc) with tcl

Postby Horix » 27 Jun 2009 16:19

Finaly I'm using the telnet interface to drive vlc with my script:

Code: Select all

vlc "canal_to_see" --extraintf rc --rc-host 127.0.0.1:12345
It's running well but sometimes the script can't connect on vlc, the error message is:

Code: Select all

couldn't open socket: connection refused


what the matter ?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests