Go Down

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

sonnyyu

#45
May 06, 2014, 07:36 pm Last Edit: May 06, 2014, 07:40 pm by sonnyyu Reason: 1
Quote
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.

roadfun

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.

sonnyyu

#47
May 06, 2014, 08:13 pm Last Edit: May 06, 2014, 08:15 pm by sonnyyu Reason: 1
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.



vanillaCoke

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

PrinceDaniel

#49
May 16, 2014, 09:02 am Last Edit: May 16, 2014, 09:04 am by MadScience Reason: 1
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

sonnyyu


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.

rathodmanoj

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,

federicofissore

Have you tried the guide linked by MadScience?

rathodmanoj

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:
Quote

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:
Quote
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.

federicofissore

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)

rathodmanoj

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

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:
* opkg_install_pkg: Package libv4l md5sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'.
* opkg_install_cmd: Cannot install package libv4l.
root@Arduino:~# opkg install http://download.linino.org/dogstick/all-in-one/latest/packages/v4l-utils_0.8.6-2_ar71xx.ipk
Downloading http://download.linino.org/dogstick/all-in-one/latest/packages/v4l-utils_0.8.6-2_ar71xx.ipk.
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.
root@Arduino:~#


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.

federicofissore

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

rathodmanoj

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.


bolatu

Hi guys,

I have a problem about taking picture from my Logitech HD Webcam C270. I have installed everything properly. However, I have this error when I want to take a picture:

Code: [Select]
root@Arduino:~# cd /mnt/sda1
root@Arduino:/mnt/sda1# fswebcam test.png
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 352x288.
--- Capturing frame...
VIDIOC_DQBUF: No such device
No frames captured.
root@Arduino:/mnt/sda1#
root@Arduino:/mnt/sda1# cd
root@Arduino:~# fswebcam --no-banner --save photo.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Unable to find a compatible palette format.
root@Arduino:~# fswebcam --no-banner --save photo.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Unable to find a compatible palette format.


I have checked my systemlog and it didnt recognize my webcam:

Code: [Select]
Jul  4 00:56:16 Arduino kern.info kernel: [ 1211.550000] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
Jul  4 00:56:16 Arduino kern.info kernel: [ 1211.650000] input: UVC Camera (046d:0825) as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.0/input/input131
Jul  4 00:56:25 Arduino kern.info kernel: [ 1220.940000] usb 1-1.1: USB disconnect, device number 25
Jul  4 00:56:25 Arduino kern.info kernel: [ 1221.190000] usb 1-1.1: new high-speed USB device number 26 using ehci-platform
Jul  4 00:56:25 Arduino kern.info kernel: [ 1221.530000] usb 1-1.1: New USB device found, idVendor=046d, idProduct=0825
Jul  4 00:56:25 Arduino kern.info kernel: [ 1221.530000] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
Jul  4 00:56:25 Arduino kern.info kernel: [ 1221.540000] usb 1-1.1: SerialNumber: F4C44090
Jul  4 00:56:26 Arduino kern.info kernel: [ 1221.550000] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
Jul  4 00:56:26 Arduino kern.info kernel: [ 1221.650000] input: UVC Camera (046d:0825) as /devices/platform/ehci-platform/usb1/1-1/1-1.1/1-1.1:1.0/input/input132
Jul  4 00:56:30 Arduino kern.info kernel: [ 1225.550000] usb 1-1.1: USB disconnect, device number 26


Go Up