User Tools

Site Tools


doc:howto:webcam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:webcam [2012/09/25 18:22]
lizby
doc:howto:webcam [2014/08/18 20:17] (current)
jodaille YUV mjpeg-streamer
Line 1: Line 1:
-==== Webcam with the Linux UVC driver ====+===== Webcam with the Linux UVC driver ====
 +See [[usb.video|USB Video Support]] 
 [[wp>USB video device class]] [[wp>USB video device class]]
  
Line 11: Line 13:
 | mjpg-streamer ​  | libpthread, libjpeg |  33738 | Streaming application for Linux-UVC compatible webcams ​ | | mjpg-streamer ​  | libpthread, libjpeg |  33738 | Streaming application for Linux-UVC compatible webcams ​ |
  
-The package [[man>​motion]] is not available in the OpenWrt repositories. http://​www.lavrsen.dk/​foswiki/​bin/​view/​Motion/​WebHome+The package [[man>​motion]] is <del>not</​del>​ now available in the OpenWrt repositories. http://​www.lavrsen.dk/​foswiki/​bin/​view/​Motion/​WebHome
  
  
Line 30: Line 32:
 </​code>​ </​code>​
  
-Now open the URL http://​192.168.1.1:​8080/​ in the Firefox browser or VLC and watch the MJPEG stream. In other browsers, scripts, etc., you can use http://​192.168.1.1:​8080?​action=snapshot for taking one image or http://​192.168.1.1:​8080?​action=stream for stream of images.+**NOTE:** You will need to edit the mjpeg config to enable the mjpeg streamer. Manually edit the /​etc/​config/​mjpeg-streamer file. 
 + 
 +Now open the URL http://​192.168.1.1:​8080/​ in the Firefox browser or VLC and watch the MJPEG stream ​(the default username/​password is "​openwrt"/"​openwrt"​). In other browsers, scripts, etc., you can use http://​192.168.1.1:​8080?​action=snapshot for taking one image or http://​192.168.1.1:​8080?​action=stream for stream of images.
  
-[This command needed after my installation of trunk onto a WR703n as of 2012/09/24: 
-<​code>​mjpg_streamer -i "​input_uvc.so -d /dev/video0 -r 640x480"​ -o "​output_http.so -p 8080 -w /​www/​webcam"&</​code>​ 
-] 
  
 ===== Embedding video stream into simple webpages ===== ===== Embedding video stream into simple webpages =====
Line 47: Line 48:
 </​code> ​ </​code> ​
   * Now restart mjpg-streamer and open the URL http://​192.168.1.1:​8080/​ in your web browser.   * Now restart mjpg-streamer and open the URL http://​192.168.1.1:​8080/​ in your web browser.
 +===== Webcam Pan and Tilt Example with Microprocessor =====
 +Here is a writeup of using openWrt for a pan and tilt camera. ​ The devices were NSLU2 for openWrt and Picaxe for microcontroller,​ but the idea is the same with arduino as micro and other openWrt devices:
 +
 +http://​www.picaxeforum.co.uk/​showthread.php?​13705
 +
 +Grey day today here in Nova Scotia, you can see at http://​www.lyzby.com/​cam.html
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
 +
 +If the control page doesn'​t contain any of the controls, edit the file /​etc/​init.d/​mjpg-streamer and replace these lines
 +
 +<​code>​
 +service_start /​usr/​bin/​mjpg_streamer --input "​input_uvc.so \
 +                --device $device --fps $fps --resolution $resolution"​ \           
 +                --output "​output_http.so --www $www --port $port"
 +</​code>​
 +          ​
 +by (on a single line )
 +
 +<​code>​
 +service_start /​usr/​bin/​mjpg_streamer --input "​input_uvc.so --device $device --fps $fps --resolution $resolution"​ --output "​output_http.so --www $www --port $port"
 +</​code>​
  
 The command ''​mjpg_streamer -h''​ give you usage information and examples. The command ''​mjpg_streamer -h''​ give you usage information and examples.
 +
 +If your webcam is an uvc supported by V4L but you cannot get an image (white page),
 +you may check that webcam output is not YUV only like output below:
 +
 +<​code>​
 +root@OpenWrt:​~#​ v4l2-ctl -V
 +Format Video Capture:
 +        Width/​Height ​ : 320/240
 +        Pixel Format ​ : '​YUYV'​
 +        Field         : None
 +        Bytes per Line: 640
 +        Size Image    : 153600
 +        Colorspace ​   : SRGB
 +</​code>​
 +
  
 The package ''​uvc-streamer''​ is no longer in the OpenWrt repositories. The package ''​uvc-streamer''​ is no longer in the OpenWrt repositories.
Line 58: Line 94:
 ===== Link Dump ===== ===== Link Dump =====
   * [[http://​wiki.leipzig.freifunk.net/​Diskussion:​Backfire#​quickcam_pro_5000]]   * [[http://​wiki.leipzig.freifunk.net/​Diskussion:​Backfire#​quickcam_pro_5000]]
 +
 +
 +===== Tags =====
 +{{tag>​ip_camera}}
doc/howto/webcam.1348590166.txt.bz2 · Last modified: 2012/09/25 18:22 by lizby