Guide to Setup Streaming Web Cam on the Yun

Good question, I didn't try to do that. Should be possible.

Vadorequest: Good question, I didn't try to do that. Should be possible.

when you have a IP web Cam. It is possible. I had one.

However, I think that the audio only worked with one browser, MS explorer, I think... not sure.

I have been using Microsoft HD-3000 webcam with success.

Now I want to use another UVC webcam. However, it does not work.

Must I do something different if I want to use another cam? Should I indicate to the driver that the new cam has to be used now?

BTW, no ideas on audio streaming?

Merry Christmas,


I have the streaming setup to my Yun and can view in browser.

So how do I get this stream to a website streaming service?

I have searched around and cannot make heads or tails on how to do this.

demolishun: ... So how do I get this stream to a website streaming service? ...

What do you mean?

I think he was asking how he could view the stream remotely, when not on the local network. Poking a hole through the firewall and mapping to the Yun would be one answer, I suppose. But I have not yet tried it myself.

Has anyone had problems with mjpg_streamer crashing after running for awhile? If so, do you know how to prevent this?

Use top and free to monitor memory and cpu usage.

if high then change

option fps      "30"


option fps      "15"

I have mjpg_streamer working ok with my Yun and camera but I'm interested in customizing it for my video monitoring project. I have searched and haven't found instructions for how to do something like this on the Yun (i.e. build the package after customizing the source). Any pointers would be appreciated. The hacks I have in mind would likely be useful to others.

Alternately or in addition I'm thinking of some hacks to fswebcam that should be useful for monitoring too.


Video application is very CPU-Intensive, Yun CPU might be suffer for speed . if high resolution and high fps is needed by use high speed CPU board or router.

I understand the CPU limitations but that's not the issue I'm trying to address. E.g. mjpg_streamer takes forever to take a first photo when you have it writing to a file. fswebcam does it very quickly. So it is an issues with the mjpg_streamer could I believe.

if high resolution and high fps is needed by use high speed CPU board or router.

high resolution could be >= 4K high fps could be >=60 fps

Some time high speed CPU is not even enough. We need GPU ( Graphics processing unit) and Multi-core one.

I guess I'm not explaining it well. I am not concerned with the frame rate, that's fine.

When I start fswebcam it can take a first picture very quickly. However when I start mjpg_streamer it takes it up to 8 seconds to capture an initial image (using the module). I'd like to optimize the time to capture the first image in mjpg_streamer.

My video knowledge is rusty - almost 20 years old. I will try my best. The mjpg_streamer use M-JPEG under hook.

M-JPEG is an intraframe-only compression scheme (compared with the more computationally intensive technique of interframe prediction). Whereas modern interframe video formats, such as MPEG1, MPEG2 and H.264/MPEG-4 AVC, achieve real-world compression-ratios of 1:50 or better, M-JPEG's lack of interframe prediction limits its efficiency to 1:20 or lower. But since it is an intraframe-only compression scheme the capture frame become very easy.

Plan A. drop a line to mjpg_streamer team.

Plan B. test more robust ffmpeg-server which also provides M-JPEG streaming support.

Hi everyone

I have following this guide and have some problem with install the video4linux2

I try the command: opkg install v4l2 and this is what I get: """"" Unknown package 'v4l2'. Collected errors: * opkg_install_cmd: Cannot install package v4l2. root@arduino:~# """""

Please tell me where to get the package smiley-cry

My computer science class group is working on an Arduino project and hope that it can stream video

Thanks in advance smiley

Wow so many replies here since I started this thread some time back. Apologies I have not replied to anyone, literally flat out with work here so I haven't actually checked this threat much since then. Actually I am still building my robot slowly... It now also had a Wi-Fi operated claw to pick up/move objects remotely and a self charge mechanism. Will post some pics/movie when I get a chance to finish it one day.

A PM from someone prompted me to check this thread, I hope everyone was able to rectify their issues and have their questions answered.

If the instructions are followed correctly from the first page, you should have no issues. If not then please factory reset your unit and start again. Note I only tested this with a particular camera (HD-3000). Some cameras may use different drivers which may require additional or different steps to set it up.

Please note, there is a continuation of my original guide (1st post of this thread) on the 8th post of the first page for faster streaming using mjpg-streamer. Please take note of that as well.

Also there may be an easier way of setting this up now since the Yun has been out for some time. Not sure as I haven't tinkered with it for some time..

Also this may be of use to some:

Best of luck with it

ProfePaco: And what about the [u]audio[/u]?

Many cams have mic. So, can we streaming the audio at the same time?


The heart of Yun AR9331 does have I2S (Inter-IC Sound, Integrated Interchip Sound) bus build in. However Yun mask it among all other 29 GPIO pins.

Answer is No.

I am facing the same problem as vanillaCoke...

I am unable to install 'v4l2' package. It seems it is missing...

Is it renamed to a new package? Can anyone suggest any alternative package?

I have come to a complete stop in testing my web camera. Any help would be highly appreciated.


Have you tried the guide linked by MadScience?

Hi Federico, I installed kmod-video-uvc, ffmpeg and ffserver without any problems.

However when I try using following command opkg install v4l2

I get following error message:

Unknown package 'v4l2'. Collected errors: * opkg_install_cmd: Cannot install package v4l2.

Also I found following packages in the libraries (link by madscience): v4l-utils_0.8.6-2_ar71xx.ipk libv4l_0.8.6-2_ar71xx.ipk

However, when I try to install, I get error message that the package index is corrupted:

Installing v4l-utils (0.8.6-2) to root... Collected errors: * opkg_install_pkg: Package v4l-utils md5sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'. * opkg_install_cmd: Cannot install package v4l-utils.

I can run successfully 'opkg update' and hence assuming that the packages are corrupted.

Am I referring to wrong libraries?

Please help!

Regards, Manoj Rathod.

I must ask you to try again, redoing a opkg update. Today we updated the package list: maybe you've tried during the update (it should be blazing fast but it sadly takes a couple of minutes anyway)