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?
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.
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.
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..
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)
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.
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:
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:
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