Differences

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

doc:howto:webcam [2012/12/04 16:07]
lizby Add pan and tilt example
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 55: Line 56:
===== 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 64: 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}}

Back to top

doc/howto/webcam.1354633645.txt.bz2 · Last modified: 2012/12/04 16:07 by lizby