How to setup multi-user streaming server, web interfaced?
Posted: 14 Oct 2009 23:48
Note, the original post (italicised) is now a little redundant, as I've put together a package for download which has the necessary php code to provide a browsing structure to completely automate the provision of video streams with VLC/VLM. The most updated/important parts of this post are now bolded, please only pay attention to the bolded text.
Hi all,
I've done a fair amount of looking through the forums/wiki/docs and I'm having absolutely no luck trying to find info on how to set up what I'm trying to set up. In order to get an idea for where my logic is going wrong, I'll first outlay exactly what I want and how I expect one would do that. I would like some feedback on my thought processes here.
What I want:
A web-interfaced video streaming service with the following functionality:
The web interface provides fully functional folder-browsing to search for a video file on the server, which should be streamed to the user. The user can then select this video, hit the "play/stream" button, and then watch the stream right then and there with the option to pause/play and potentially track the video file (I understand this is format-dependant). The playback would either be realised by some sort of embedded video player in the web browser, or through the vlc client.
How I think it should/could be implemented:
From what I've read up until now, the best way to implement this would be to have two seperate parts to the stream provision. The first would be a php-based interface, which the user uses to browse through the available files on the server. Once the user has selected a file which they would like to play, the control shifts from the php to VLC. The php would make a shell-call to execute vlc, with the desired switches to make the file which the user has selected start to stream via the VLC server. The php would then provide a link on the page which the user could click and which would open up the VLC client and accept the stream. By this solution, the php code is acting in the place of an actual person providing a stream for a user to watch.
If more than one user were to want to stream different files at once, then this would be no issue as multiple copies of VLC could be run simultaneously as servers, streaming out files to users.
I would be implementing the setup on a local network, so any streaming would be LAN-based, which should allow relatively high throughput allowing multiple users to stream at once.
My implementation idea doesn't cover the following aspects:
- would it be possible to have a fully-functional embedded video player in the browser, so that the user wouldn't necessarily need to have the VLC client installed.
- which file/streaming format would be the best for this type of application. I understand that .avi/.mkv files can't be seeked, so for seeking support .wmv would be preferable, I'd prefer not to have to reconvert 300+GB of movie files to .wmv's.
- any functionality which VLC provides which would aide in this type of setup.
- how to close instances of the VLC server which are no longer being streamed from, without any input from the client machine
An answer/response to any part of this post would be very welcome, as I understand that I may not have fully grasped the functionality of VLC's streaming abilities.
If I can get something like this implemented with VLC then I'd be willing to try writing some sort of howto for it as from what I've seen there's not yet been any similar implementation documented.
Thanks,
James
If you're too lazy to scroll down, here's an exact copy of what's written below:
LATEST EDIT: I noticed an error in the ajax search function the other day. It seems to have cropped up whilst I was editing the code for the manual which I wrote for it, should have it fixed soon.
Ok, so here it is!
I've put together a .pdf file with instructions and a code reference to what I've done. I know that what I've put together is essentially very basic, but I assume that it will help someone somewhere.
Unfortunately I can't attach the file here, so I've uploaded it to my server, you can get it at http://www.jamesguthrie.ch/phpint/phpintfrtspguide.zip. You'll have to excuse the ungainly name, but I couldn't think of anything better at the time. The zip contains all of the sourcecode I've used, as well as one pdf file, which contains the documentation.
Simple setup is outlined in the documentation file, basically copy all files into root web directory and go to http://127.0.0.1/index.php. If you think of any recommended updates to the documentation, please send me an e-mail, my e-mail is in the coverpage of the pdf instruction manual.
James
Hi all,
I've done a fair amount of looking through the forums/wiki/docs and I'm having absolutely no luck trying to find info on how to set up what I'm trying to set up. In order to get an idea for where my logic is going wrong, I'll first outlay exactly what I want and how I expect one would do that. I would like some feedback on my thought processes here.
What I want:
A web-interfaced video streaming service with the following functionality:
The web interface provides fully functional folder-browsing to search for a video file on the server, which should be streamed to the user. The user can then select this video, hit the "play/stream" button, and then watch the stream right then and there with the option to pause/play and potentially track the video file (I understand this is format-dependant). The playback would either be realised by some sort of embedded video player in the web browser, or through the vlc client.
How I think it should/could be implemented:
From what I've read up until now, the best way to implement this would be to have two seperate parts to the stream provision. The first would be a php-based interface, which the user uses to browse through the available files on the server. Once the user has selected a file which they would like to play, the control shifts from the php to VLC. The php would make a shell-call to execute vlc, with the desired switches to make the file which the user has selected start to stream via the VLC server. The php would then provide a link on the page which the user could click and which would open up the VLC client and accept the stream. By this solution, the php code is acting in the place of an actual person providing a stream for a user to watch.
If more than one user were to want to stream different files at once, then this would be no issue as multiple copies of VLC could be run simultaneously as servers, streaming out files to users.
I would be implementing the setup on a local network, so any streaming would be LAN-based, which should allow relatively high throughput allowing multiple users to stream at once.
My implementation idea doesn't cover the following aspects:
- would it be possible to have a fully-functional embedded video player in the browser, so that the user wouldn't necessarily need to have the VLC client installed.
- which file/streaming format would be the best for this type of application. I understand that .avi/.mkv files can't be seeked, so for seeking support .wmv would be preferable, I'd prefer not to have to reconvert 300+GB of movie files to .wmv's.
- any functionality which VLC provides which would aide in this type of setup.
- how to close instances of the VLC server which are no longer being streamed from, without any input from the client machine
An answer/response to any part of this post would be very welcome, as I understand that I may not have fully grasped the functionality of VLC's streaming abilities.
If I can get something like this implemented with VLC then I'd be willing to try writing some sort of howto for it as from what I've seen there's not yet been any similar implementation documented.
Thanks,
James
If you're too lazy to scroll down, here's an exact copy of what's written below:
LATEST EDIT: I noticed an error in the ajax search function the other day. It seems to have cropped up whilst I was editing the code for the manual which I wrote for it, should have it fixed soon.
Ok, so here it is!
I've put together a .pdf file with instructions and a code reference to what I've done. I know that what I've put together is essentially very basic, but I assume that it will help someone somewhere.
Unfortunately I can't attach the file here, so I've uploaded it to my server, you can get it at http://www.jamesguthrie.ch/phpint/phpintfrtspguide.zip. You'll have to excuse the ungainly name, but I couldn't think of anything better at the time. The zip contains all of the sourcecode I've used, as well as one pdf file, which contains the documentation.
Simple setup is outlined in the documentation file, basically copy all files into root web directory and go to http://127.0.0.1/index.php. If you think of any recommended updates to the documentation, please send me an e-mail, my e-mail is in the coverpage of the pdf instruction manual.
James