Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2736  / 2 Years ago, mon, october 31, 2022, 10:12:42

I have a Trust usb webcam. I'm looking for (or creating) a script that could take a screenshot from the camera every 10 seconds and save the image to disc with a timestamp for a filename.



I've found



streamer -o 0000.jpeg -s 300x200 -j 100 -t 1 -r 10


But it only runs once and it doesn't save the filename as something unique, so when the script starts again it will override the previous files with the same name.



Any ideas on a script that can start taking timelapse photos when my machine starts up?



Thanks.


More From » scripts

 Answers
4

You have a few solutions here, perhaps the best would be to run your command like this in one line:



while true; do streamer -o `date +%Y%m%d-%H%M%S`.jpg -s 300x200 -j 100 -t 1 -r 10; sleep 10; done

[#23625] Tuesday, November 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coffekne

Total Points: 114
Total Questions: 122
Total Answers: 126

Location: Mauritania
Member since Sun, Oct 17, 2021
3 Years ago
;