So do I, but this utility is not necessary.greengeek wrote:Most of the answers I have seen seem to require v4l2-ctl utility but I don't have it in my system
This lists the attached cameras :
Code: Select all
# cat /sys/class/video4linux/*/name
ELECOM UCAM-DLK130T
HP Webcam-50
This should do. Takes a single shot with my webcam:
Code: Select all
#!/bin/bash
CAMERA=ELECOM
VIDEOx=$(grep -rH "$CAMERA" /sys/class/video4linux/*/name | cut -d/ -f5)
ffmpeg -f video4linux2 -s 640x480 -i /dev/$VIDEOx -vframes 1 /tmp/$(date +%T)_$CAMERA.jpg