ok
i wont write a step by step tuto but some ways to do that :
in this example we'll use HTTP to control our VLC process and VLM instances. you can use telnet too
First, launch a VLC process with http admin interface :
Code: Select all
vlc --intf=http --http-host=127.0.0.1:8080
check on the machine if on
http://localhost:8080 you have the vlc admin interface running
then, from PHP, you can do something like :
Code: Select all
<?php
$http_admin_uri = "http://127.0.0.1:8080";
$url = $http_admin_uri.'/requests/vlm_cmd.xml?command=new test1 broadcast enabled input "D:\strip.mpeg" output #transcode{vcodec=mp1v,vb=512,scale=1,acodec=mpga,ab=128}:std{access=http,mux=ps,dst=0.0.0.0:9000}';
echo file_get_contents($url);
$url2 = $http_admin_uri."/requests/vlm_cmd.xml?command=control test1 play";
echo file_get_contents($url2);
?>
this will first prepare the VLM broadcast (file=d:\strip.mpeg, dst=http on port 9000)
and then launch this stream
a little bonus : with apache, mod_rewrite and mod_proxy, you can proxify the resulting stream, this way, no need to open port 9000
in VLC, do dst=127.0.0.1:9000
in Apache, do the transparent proxy in a .htaccess :
RewriteRule vlcproxy/(.*) http://127.0.0.1:$1 [P]
last step is to affect one port by user
to know other VLM commands, checks the Wiki or sniff http with FireBug when you play with the http "VLM admin interface"
let us know and... ENJOY