Time Capturing Photos From Multiple Cameras And Archiving Script
This is pretty basic and I like it that way.
Using ffmpeg to capture the integrated web cam on my laptop and my USB webcam plugged in and then creating an archive to store subsequent photos in.
Part of a bigger project.
#!/bin/bash
# Set date for file naming
date=$(date +"%Y-%m-%d_%H%M%S")
# Take photo using Integrated Webcam
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video0 -frames 1 int.$date.jpg
# Take photo using USB Webcam
ffmpeg -f v4l2 -video_size 1280x720 -i /dev/video1 -frames 1 usb.$date.jpg
# Add all .jpg files to payload.zip
zip payload.zip *.jpg
# Remove all .jpg files now
rm *.jpg
# Set time between photos
sleep 10
# Exit and start over
./$(basename $0) && exit