run vlc in php on local server-client

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
wimvan
New Cone
New Cone
Posts: 3
Joined: 28 Dec 2011 08:17

run vlc in php on local server-client

Postby wimvan » 28 Dec 2011 08:34

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

Sourcery
New Cone
New Cone
Posts: 1
Joined: 16 Jan 2012 16:19

Re: run vlc in php on local server-client

Postby Sourcery » 17 Jan 2012 09:37

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

wimvan
New Cone
New Cone
Posts: 3
Joined: 28 Dec 2011 08:17

Re: run vlc in php on local server-client

Postby wimvan » 29 Jan 2012 09:41

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

mysoogal
Blank Cone
Blank Cone
Posts: 82
Joined: 28 Oct 2008 12:39

Re: run vlc in php on local server-client

Postby mysoogal » 20 Feb 2012 21:53

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

tittbit
Blank Cone
Blank Cone
Posts: 17
Joined: 10 Mar 2012 19:40

Re: run vlc in php on local server-client

Postby tittbit » 11 Mar 2012 14:01

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
Life is not finding yourself, it is discovering yourself.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 5 guests