Page 1 of 1

How drive vlc (interface rc) with tcl

Posted: 26 Mar 2009 13:35
by Horix
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

Re: How drive vlc (interface rc) with tcl

Posted: 26 Mar 2009 14:24
by revolunet

Re: How drive vlc (interface rc) with tcl

Posted: 10 May 2009 23:43
by rocket888
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"

Re: How drive vlc (interface rc) with tcl

Posted: 21 May 2009 11:31
by paquito
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

Re: How drive vlc (interface rc) with tcl

Posted: 27 Jun 2009 16:19
by Horix
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 ?