I needed a way to use my webcam to trap jpg images at intervals and accumulate them in a storage directory for later inspection. I also wanted to be able to put the script onto a usb stick and have it operate as a portable "security" camera script.

The script creates a "jpgstore" subdirectory in the same directory where you place the script. This is where the trapped images are stored.

You specify how many images you want to trap and whether you want the script to loop around and overwrite the oldest files once that image limit is reached - or whether you want it to stop recording once that number of images has been reached. (The default setting is 10 images - so the user can do a quick test to see if they like how it works). Set the number of images to cover 24 hours or longer if you have adequate space.

*** If you have multiple web cameras it will be necessary to decide if you want to trap /dev/video0 or /dev/video1 etc (change "camera name" parameter in script as required).

Attached are both .pet and .sfs versions.

Notes:
- The pet (or sfs) installs itself initially to /root. You will see a directory called jpglooprecorder_portable. If you don't like it being in /root you can simply move it somewhere else - including onto a fresh usb stick acquired for the purpose.

- in the looprecorder directory you will find a ReadFirst.txt (please read it for fine-tuning and webcam selection etc).

- you will also find 4 scripts:
- jpglrp is the script that does the work. (This is where you can alter parameters)
- jpglooprecorderportable_START is what you click to start the image trapping
- jpglooprecorderportable_STOP is what you click to stop the image trapping
- jpglooprecroderportable_TERMINATE is used for immediate termination of the script if required (use this if you experience any runaway or script errors that need debugging).

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum