Go Down

Topic: Guide to Setup Streaming Web Cam on the Yun (Read 82810 times) previous topic - next topic

muhkuh

Hi,

i use a microsoft lifecam 3000 and the yun can stream 1280*720 @ 15fps without problems over wifi.
over internet i am limited by my 5Mbit upload speed to less (960*580 @ 5fps is doable) but it works.
Watching my fishtank at work :D

Greetings

sonique

Thanks muh,

At this point, I believe is a WebCam problem.

Can you use your lifecam whit arduino-YUN at 960*580 @ 5fps ?

TNX



muhkuh

yes, it will crop out whatever resolution you set with the
Code: [Select]
-r ###x### parameter.
Aslong as its smaller then what the webcam can supply.

AllSystemGO

Hey muhkuh,

   I currently have a microsoft 3000 too and I was wondering in what browser are you streaming? Cause for me IE downloads the stream same as chrome and FF streams it the right way but the browser crashes at some point. If I try it on a Android tablet I have the same problem. Can you help me.

Thanks

muhkuh

Hi,

for me it works fine in FF and Chrome. not in IE 10.
but if you look in your www/webcam folder, there are some different ways of getting an image (jquery examples...)

easiest if you put
Code: [Select]
-w /www/webcam
as output parameter, and then you get the demo page for mjpg-streamer which shows all the different possibilities if you browse to your yun on port 8080.

AllSystemGO

Ok I saw what you were saying muh and it helped me with my project thank you. One last think where do you have the information of what parameters to pass and what they mean??? I'm trying to find info on that.

By the way is there a easy way to save a snapshot, programmatically, on the YUN SD ? Cause if I go http://yunip:8080/?action=snapshot it takes a snapshot in my browser but it's not saved on my SD card.

Thank you again

lucadentella

Hi

for capturing a single image, I suggest the use of fswebcam:
http://www.lucadentella.it/2013/11/15/yun-colleghiamo-una-webcam-1/
www.lucadentella.it

ProfePaco

Hi there:

Can anybody recommend me a webcam, with infrared leds, suitable for streaming with Arduino yun in the darkness?

Thanks

cristiansaavedra

Hi a couple of things:

1.  The comand opkg has a mistake in ffmpeg. If copy and paste give an error:
It is easy to know the error but please correct in the first post.

root@Arduino:/mnt/sda1# opgk install ffmpeg
-ash: opgk: not found

2. I dont know if I have a new version but the v4l2 package is not anymore:

root@Arduino:/mnt/sda1# opkg install v4l2
Unknown package 'v4l2'.
Collected errors:
* opkg_install_cmd: Cannot install package v4l2.
root@Arduino:/mnt/sda1#

I found in http://download.linino.org/dogstick/all-in-one/latest/packages/ this two similar libraries: libv4l_0.8.6-2_ar71xx.ipk and v4l-utils_0.8.6-2_ar71xx.ipk. Are They the same?

Thanks for the post and help

thomas-c

Thank you for everyone's work on this subject!
Has anyone attempted to use a web cam that has built-in hardware encoding in order to reduce the workload on the AR9331?  I also wonder if H.264 compression would allow for better results for any given Internet upload bandwidth constraints, as compared to MJPEG.  Unfortunately my new Yun is still under the Christmas tree.

This is the info I have come across so far, for utilizing hardware-based H.264 compression:
http://www.logitech.com/en-us/product/hd-pro-webcam-c920
http://www.oz9aec.net/index.php/gstreamer/473-using-the-logitech-c920-webcam-with-gstreamer
http://kakaroto.homelinux.net/2012/09/uvc-h264-encoding-cameras-support-in-gstreamer/
http://wiki.matthiasbock.net/index.php/Logitech_C920,_streaming_H.264

As a side note, I don't know if the problem mentioned in the comments section for the 2nd url above has been sorted out, regarding the Logitech C920's variable frame rate issue in low light conditions.  In the same comments section, "Ricky" mentions the good results he achieved for his robot car project (I realize his board may have been a 1 GHz ARM as compared to the AR9331's 400 MHz MIPS, but still).  Cheers.

cristiansaavedra

Thanks,  with the mjpg_streamer is working well. I have a Logitech HD Webcam C310.

The http://192.168.0.4:8080/?action=stream is only working on Firefox browser by now.

thomas-c

In the future, would it be better for me to create a separate topic regarding hardware-based encoding/streaming attempts or continue to post info in this topic?  Thank you.

The previous urls I mentioned culminated into this interesting project/writeup - full credits to Alexandru Csete:
http://www.oz9aec.net/index.php/beaglebone/476-turning-the-beaglebone-into-a-high-definition-ip-camera

In the above page's comments section "Joris Pragt" describes his attempt to use a TP-Link router running OpenWrt but he ran into problems due to the router only having 32 MB RAM.  Here's hoping the Yun's 64 MB is sufficient to allow for 1920x1080 @ 30 fps.

noblepepper

I haven't seen any discussion of using the H.264 protocol in the forum, once you unwrap your Yun and start to play with it a new thread about H.264 would probably be a good idea. If you get it working yourself someone else would appreciate your experience, if not someone will probably help.

While I used info from this thread to get my webcam going, it is getting long with separate discussions going on and it can be hard to pick out the parts that apply. When to start a new discussion is not an easy decision but if what you ask is answered in another someone will usually post a link to the answer.

nounjog


Tested and working a charm. Video streaming smoothly at 5fps 640x480 resolution.
Well done mate.

If anyone else is interested. I would suggest using this build of mjpg-streamer over ffmpeg and ffserver as the throughput is much faster.

Instructions are below. Credit to fibasile for the binary upload of mjpg-streamer:
Join your Yun to your WLAN
- SSH into OpenWRT via the IP or via arduino.local hostname
- Check your camera's compatibility (some are UVC, some are GSPCA, some not supported at all). I would suggest taking a look here: http://wiki.openwrt.org/doc/howto/usb.video. At this time only UVC driver camera's are supported
- Install either the UVC driver (if not already installed) e.g. opkg install kmod-video-uvc
- Plug your camera into usb slot (type dmesg to see if your camera is detected and drivers working correctly). I used a Microsoft LifeCam HD-3000
- add your micro sd card (it should appear as /dev/sda1 by default)
- Create a folder or mount point /mnt/sda1 (mkdir /mnt/sda1)
- mount your sd card - mount /dev/sda1 /mnt/sda1
- use wget to download the mjpg-streamer binary ( you cant use it with drop box as it redirects to https. This module is not installed by default). I have uploaded it here for convenience : http://www.custommobileapps.com.au/downloads/mjpg-streamer.ipk
- install the package (I installed it in my root folder ~) - opkg install mjpg-streamer.ipk
- View the config options here - http://wiki.openwrt.org/doc/howto/webcam. I just ran it with the following command
Code: [Select]
mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480" -o "output_http.so -p 8080 -w /mnt/share" (/mnt/share is my sd card). You can also set it to start upon boot
- Open your web browser to: http://arduino.local:8080/?action=stream for a stream or http://192.168.1.1:8080?action=snapshot for a single snappy
- Enjoy



Hi,
first of all thank you very much for your explanation, it worked very well, with the same camera as you.
But i don't  really understand what utility of the sd card? Is it something like a temporary memory in order to store a little bit of the stream ?

Thanks in advance !

federicofissore


1.  The comand opkg has a mistake in ffmpeg. If copy and paste give an error:
It is easy to know the error but please correct in the first post.

root@Arduino:/mnt/sda1# opgk install ffmpeg
-ash: opgk: not found

You have written "opgk" instead of "opkg" and the error message is expected

Go Up