HowTo stream webcam video to the net?

I wonder if anyone here has succeeded in streaming the video of a local webcam to the internet?

Some research has turned up webcam_server Project Home Page but unfortunately it only supports v4l, not v4l2 and is no longer maintained.

It seems to be possible with VLC server, but I’m a bit reluctant, because their repo is said to break other things. I still have 11.1 here. Anyone who has done it? And how?

Found ‘flumotion’, don’t know if that suits your needs.

Thanks. I installed flumotion from packman, tried it. It went to the point when it says ‘Probing the webcam. This may take a while …’ and then it eats all available CPU and is stuck. It’s a pity.

In the meantime I found another interesting project to stream video from the webcam: it’s mjpg-streamer SVN repository on Sourceforge which I checked out. It compiles well, but so far I had no success to get it working (well, its supposed to work, as it did before for many others; maybe I am just too stupid). Anyway, if you try it out and have some success please let me know.

Finally: I can report that mjpg-streamer works fine. It is small and lightweight, uses only minimal CPU. It needs an UVC compliant webcam able to produce output in MJPEG format.

Using mjpg-streamer is great fun. Invocation is like:

mjpg_streamer -i " -d /dev/video0 -r 640x480 -f 15" -o " -w /usr/local/www -p 8080"

and then you point your browser at http://localhost:8080/ for local viewing or open the firewall and view from anywhere in the world. Other ports can be selected (I wonder which one is best). Very recommended.

Hi Vodoo,

Have installed mjpg-streamer using your package. When I try to run it, I get "Unable to set format 1196444237 res: 640x480.

Any clue as to why?

Cheers - AK

Hi again,

The cam’s driver is pwc and I am unsure if this fits with the so I tried the one instead.

This time, I got “Couldn’t get videodevice capability”. I’ve tried the "LD_PRELOAD of but result is the same.

VLC can capture the cam using video for linux 2.

A quick FYI -
I haven’t done it recently, but in the past found that setting up VLC to stream video was very easy and perhaps most importantly is a highly configurable solution supporting may options like bitrate, screen sizes, protocols, hardware acceleration (was experimental then but worked nicely for me) and some pretty cool auto-discovery for simple LAN broadcasting.

Doesn’t require anything more minimally than the standard VLC client, but the viewers must also be running VLC.

I have VLC already installed because it’s so powerful as a universal multimedia client, so it wasn’t any issue for me to also use it as a server.

Remember than on the fly encoding is extremely resource-intensive, you can throw a ton of expensive processing power and it’ll probably still be lacking if you’re expecting quality streaming.


pwc is NOT uvc, and support for pwc driver has been degrading until very recently, when someone started working on it again. Take a look at this thread:

tsu, oldcpu

I tried also VLC and, although it was able to capture the camera, downstream VLCs could not display them. Something to do with decoding the stream judging from the error messages.

We got hold of some modern cameras that are driven by the uvc driver and used mjpg_streamer with total success. It would seem that mjpg_streamer ifnores the parameter that is supposed to tell it where its www files are. Only way I could get it to use these was to locate them at /www. Not good and have posted a comment to their site.

Using VLC as a server also worked fine but, as tsu mentions, it used a lot of resource.

My recommendation would be to go with mjpg_streamer. It’s very lightweight and can easily be started during the boot process so an unattended server can be used.

Am now looking into Zone Minder hoping to use mjpg_streamer to capture the streams to monitor.

Thanks for your replies.

Cheers - VP