Fswebcam: Difference between revisions

From Leo's Notes
This page was last edited on 14 June 2020, at 22:01.
m Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux"
mNo edit summary
 
Line 17: Line 17:


{{Navbox Linux}}[[Category:Linux]]
{{Navbox Linux}}[[Category:Linux]]
[[Category:LinuxUtilities]]

Latest revision as of 22:01, 14 June 2020

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");