Control VLC from php

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
renaud
New Cone
New Cone
Posts: 4
Joined: 01 Apr 2010 06:10

Control VLC from php

Postby renaud » 04 Apr 2010 14:39

Hi

I've installed wamp on my laptop and would like to control VLC from a php script.
I've tried with shell_exec or system without success
system("C\\VideoLan\\VLC\\VLC\\vlc.exe");
This make the browser keeping loading his page without stopping...

I would like to control VLC on a server with php and perform this kind of call:
system("C:\\VideoLan\\VLC\\VLC\\vlc.exe --start-time=120 --stop-time=600 C:\\VideoLan\\myfile.avi");

Does anyone have a link to an example or some documentation?

Thanks for any help!
Renaud

zozizozu
Blank Cone
Blank Cone
Posts: 62
Joined: 26 Jul 2009 18:18

Re: Control VLC from php

Postby zozizozu » 06 Apr 2010 07:38

Hi,
I didn't really found a way to fork a process under windows, so I've download pstools from sysinternals (http://download.sysinternals.com/Files/PsTools.zip) that have an executable that can run processe "in the background" :

system("psexec.exe -d \"C:\\PROGRA~1\\VideoLAN\\VLC\\vlc.exe\"");

This works fine, but i don't use it, i prefer starting vlc "by the hand" with "-I dummy --extraintf=rc --rc-host=...", and then control it with little scripts than can be started in php because it's really fast ( connect to vlc + send a command + get the result is about 1or 2 sec)

Regards

renaud
New Cone
New Cone
Posts: 4
Joined: 01 Apr 2010 06:10

Re: Control VLC from php

Postby renaud » 06 Apr 2010 14:01

Thanks, I'll dig that way...


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests