Page 1 of 1

run vlc in php on local server-client

Posted: 28 Dec 2011 08:34
by wimvan
Hi all,
Sorry for this probably recurrent question but I can't find nowhere a working answer, neither a clear explanation ...

I have a web-application using PHP as language to maintain all my images (120.000) and all my avi's, mov, mwv ...
Now, I want to play an avi, mov, ...them when I hit the link in the web I created.

So, to be clear, I do not need a download because the server is my desktop and the goal is just a local, yes local utility.
I want to use or a plugin or ... without the need having internet-connection to the outside world. All is running local

In php I can use the exec()-function, but I'm not sure at all how I have to write the commandline. I need a full-screen-interface with of course the control-buttons from VLC.

Can some-one help me in these ?
The goal is really having a player who is independent from a internet to the outside-world. I use Apache, Mysql and php.
If the plugin works offline, why not, but how must I write the needed code ?

thanks in advance

Re: run vlc in php on local server-client

Posted: 17 Jan 2012 09:37
by Sourcery
Hello Wiman,

(edit I forgot the port number in ipadress)

I am also working on something similar and here is a simple solution for web scripting:

The simplest way is to start vlc with the http-protocol, and from your PHP page just send commands to the status.xml file.

EG. like this: http://your.ip.address.123:8080/request ... d=pl_pause
This command will pause/play the current file in the VLC playlist.

To start playback of a file you simply do a <a href="" for the file to the UNC and or local path if it is a local file like so:
<a href="http://your.ip.address.123:8080/request ... .mp3">Play musicfile</a>

to ADD a file to an already playing playlist you change the command from in_play to in_enqueue.

A simple way to solve it. You have to use iFrames though since AJAX requests isnt possible because of the access-control-allow-origin header, which is where I got stuck at the moment... :)

Hope this helps... and let me know if you need more help/info/ideas.
/Kristian

Re: run vlc in php on local server-client

Posted: 29 Jan 2012 09:41
by wimvan
Thanks.
But, vlc starting up with http-protocol ?
Can you furnish me some small code because I'm completly lost
Everyone is speaking about FLV, but I just want showing video on a local client that is also the server and converting to FLV has in this case no sense

Wim

Re: run vlc in php on local server-client

Posted: 20 Feb 2012 21:53
by mysoogal
you need

php5,apache2, vlc 0.9.9 - full install including Mozilla plug-in

you need to upload files to your htdoc or www from this zip file http://www.mediafire.com/?dx6dsvqj638zc4v

you need to open index.php and find http://site.com and replace with your IP


move all your files to uploads , now you can stream them on vlc

plugin does not work with vlc 2.0

Re: run vlc in php on local server-client

Posted: 11 Mar 2012 14:01
by tittbit
your are working on local right?
u might me using a xampp or wampp.
in this case you do not need to write a php command.
you can use blue voda website builder and there is a inbuilt command that inserts a plugin in the page in which u can insert any type of video.

it is as easy as drag and drop, but if u need to customize it then u can just first create the page then copy the source code and then customize it according to your needs