Here is what I want to do. Looked around but didnt find any straight answer. I have a Linux box running websites using Ubuntu/MySQL/Apache. I have my own static IP as well, i.e. not using web hosting. I would like to be able to stream the video feed from a webcam on a laptop (presumably running Windows) to my Linux server, and have users of one of my websites be able to see that video live as its being streamed. Obviously would the laptop would need to authenticate with the server somehow, but there should be no restrictions on who could view the live video on the website. Thanks.
feedback
|
migrated from stackoverflow.com Jul 8 '11 at 3:12
This question came from our site for professional and enthusiast programmers.
|
I currently develop online streaming from 3 miniDV cameras connected via FireWire, which is quite similar to your needs. Quick hint: vlc + flowplayer/jw player First of all, there are two video formats, that you can use in online streaming: FLV and h264. FLV is easier to transcode, h264 has better size/quality ratio but transcoding is much more cpu consuming. Both can be displayed by flash players in web page. Second of all, streaming infrastructure. Since your bandwith from laptop is limited (couple Mbps tops) you need to get stream to your server and there restream it to clients. So the stream will flow 1 time to server and then N times to clients from there. You haven't described your internet connection for your laptop, so the scenario is divided into two section:
Regardless on used scenario, the infrastructer will look like this
Streaming from laptop
Restreaming on server
Display stream on web Displaying the stream on web, which will work in most cases, is via flash player. I tried two products, which are free for non-commercial usage: JW Player and Flowplayer. I stayed with Flowplayer, but I don't remember the reason, maybe because of plugins (which I don't use:) ) or because of better documentation. How to display FLV stream from VLC in web page is covered here: Stream VLC to Website with asf and Flash Troubleshooting Be aware of many problems that WILL arise. First thing, as in everything, read. VLC is very chatty program, so it will tell you where the problem is. Could be problem with permissions to access the video/audio device, missing codecs, misspelled --sout parameters,... Learn to use | |||
feedback
|
|
Not really my area of expertise, but perhaps I can point you in a potential direction. The commercial implementation is to use Adobe's Flash Media Server. Of course, that can be a rather costly approach. There are however, open source alternatives - such as Red5. You will need to install the server (it has Java dependencies). Once you have the server running, you can pick your front-end (I believe Red5 comes with some samples, but you can also use JW Player with The front end will receive the streaming video from the media server, and you will upload your stream to the media server. Further information: Red5 Help & Info and Red5 Reference | |||
|
feedback
|
|
My tool of choice here would be vlc. It is not just a multi-purpose multi-format video player, it is also capable of streaming in a magnitude of file formats and streaming protocols. As a bonus, it works cross-platform among Windows and Linux hosts. We've set up something similar a couple of years ago where a customer using a narrow-bandwidth DSL line (128 K upstream) needed to have his network-connected webcams streamed to a broad audience. A VLC installation as a "reflector" host did cam signal rotation, took the main bandwidth load from the streaming clients and presented the stream in different streaming protocols and formats. | |||
|
feedback
|