Page 1 of 1

Control VLC from php

Posted: 04 Apr 2010 14:39
by renaud
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

Re: Control VLC from php

Posted: 06 Apr 2010 07:38
by zozizozu
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

Re: Control VLC from php

Posted: 06 Apr 2010 14:01
by renaud
Thanks, I'll dig that way...