webcam
|
A program which captures video frames from a V4L2 device (e.g. USB camera), converts them to JPEG with minimal effort, and serves the resulting stream of video data as multipart/x-mixed-replace MIME type:
Alternatively, it can save each JPEG image to a separate file, or pass them to stdout.
"Minimal effort" means the following:
Program can also be compiled without YUV support, what allows linking without jpeglib.
Serving video with built-in HTTP server on TCP port 44444, with just 5 FPS, using no more than 16 MB of buffers:
Video can be seen in a web browser at http://localhost:44444 provided you have a supported webcam plugged in and permissions of its /dev/videoX node include rw for the user running this program.
Video can also be embedded inside a web page like this:
CGI output is enabled by default so the program can be directly used as a CGI script (nph-webcam.cgi
), for example with lighttpd configured this way:
Parameters can be passed by a helper script nph-webcam.sh
like this:
See documentation.
webcam
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.