Fswebcam: Difference between revisions
From Leo's Notes
This page was last edited on 1 September 2019, at 05:07.
split from main webcam page |
m Text replacement - "Category:Linux" to "Category:Linux{{Navbox Linux}}" |
||
| Line 16: | Line 16: | ||
}} | }} | ||
[[Category:Linux]] | [[Category:Linux]]{{Navbox Linux}} | ||
Revision as of 05:07, 1 September 2019
fswebcam is a Linux utility that captures an image using a Video4Linux compatible webcam.
Usage
# fswebcam -r 640x480 --jpeg 85 -D 1 web-cam-shot.jpg
Dumping fswebcam images via HTTP
You can make a quick an dirty wrapper around the command above so that it can be viewed via the web.
<?php
system("fswebcam -r 640x480 --jpeg 85 -D 1 /tmp/out.jpg > /dev/null");
header("Content-Type: image/jpeg");
echo file_get_contents("/tmp/out.jpg");