WEBCAM-V4L2 is a software which allows to capture images and video from USB cameras using the V4L2 API.
In Beaglbone.
$ ./compile.sh beaglbone
In Ubuntu.
$ ./compile.sh ubuntu
$ cd src
$ ./main
Usage: ./main [options]
Options:
-d | --device name Video device name [ /dev/videoN ]
-t | --type Capture type [ video | frames ]
-f | --format Image format [ YUYV | JPEG ] (only applicable for type: frames)
-w | --width Image width
-h | --height Image height
-m | --method Capture method [ mmap | read | userp ]
-n | --number Number of frames to capture
Images can be displayed with any viewing application
MJPEG is a rare video format without a standard. I use "vlc" to display de videos.
$ vlc --demux=mjpeg --mjpeg-fps=15 result/video.mjpeg
This software has been tested is the following platforms:
- Ubuntu 16.04 - Linux kernel: 4.4.0-57
- Beaglebone - Linux kernel: 3.8.13
This software has been tested with the following cameras:
- Logitech c170
This software has been based on the example provided in the V4L2 API.