Guide to Setup Streaming Web Cam on the Yun

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"

to

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.

Cheers.

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.

http://forum.arduino.cc/index.php?topic=187766.msg1711221#msg1711221

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 output_file.so 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:
http://www.lucadentella.it/en/2013/11/15/yun-colleghiamo-una-webcam-1/

Best of luck with it

ProfePaco:
And what about the audio?

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

Francisco

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.

Thanks,

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)

Hi Federico,
I tried again. OPKG update works fine. Although I am unable to installed the v4l2 libraries. Here are the console logs:

root@Arduino:~#
root@Arduino:~#
root@Arduino:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check passed.
root@Arduino:~#
root@Arduino:~#
root@Arduino:~# opkg list v4l2
root@Arduino:~# opkg install http://download.linino.org/dogstick/all-in-one/latest/packages/libv4l_0.8.6-2_ar71xx.ipk
Downloading http://download.linino.org/dogstick/all-in-one/latest/packages/libv4l_0.8.6-2_ar71xx.ipk.
Installing libv4l (0.8.6-2) to root...
Collected errors:

I did not find the v4l2 library for video4linux2. Hence tried installing v4l-utils and libv4l (I read somewhere that libv4l contains libv4l2).

I am not sure whether I am installing the right libraries. Are the libraries correct? Also, I will appreciate if you could advice if there are any steps that I am missing or doing incorrectly.

Best Regards,
Manoj Rathod.

Why are you manually installing files from download.linino.org?
Didn't opkg install libv4l v4l-utils just work?

Hi Federico,
Many Thanks for your help and advice. I was able to download the v4l2 libraries successfully.

I am still struggling with the setup, but thought I will let you know that installation went successful.

Best Regards,
Manoj Rathod.