[Octolapse] Snapshot Directory Name


#1

Looking for some help with the way snapshots are saved.

I am turning off the removal of the snapshots in Octolapse in the Snapshot settings so that I can download the images after and play with them in Premiere or After Effects.

It is working, but the location where they are being saved to is strange to me and I see no way of setting it with the Octolapse GUI. Inside of my .octoprint/data/octolapse/snapshots/ I end up having a directory named something like "79e1027e-5fba-4deb-89c0-a337f53549ec" with another directory inside it named "556c8835-e13a-49a7-a76f-8507f86bcbff". Then the snapshot files are in there named perfectly.

Is there a way to change this behavior? Is if there's a way to make the directory naming follow the gcode filename instead of what is happening.

I'm using Octoprint 1.3.10 with Octopi v 0.16.0, running on Raspberry Pi 3 Model B Plus Rev 1.3

Thanks.


#2

That directory structure was used for convenience to ensure that I never overwrite any timelapse images accidentally. The first strange string (79e1027e-5fba-4deb-89c0-a337f53549ec in your case) is a GUID (globally unique identifier) that represents the current print. I assign one at the beginning of the print. The second one identifies the camera used, since users can create and use as many cameras as they like.

I'll think about ways of making the process of grabbing new images easier (maybe from a zip downlaod?), but for now you could use a Before Render Script script (available within the camera settings) to copy your images to any directory you like. It takes a little doing, and you might want to skim the wiki guide for creating custom DSLR camera scripts for pointers, though most of it doesn't apply to your case. I'll think about adding a guide for copying images before rendering.


#3

Thank you. I had a feeling it was gonna take a script.
A zip download would definitely be useful. Personally though I don't mind transferring the whole directory over to my local HD.

Wish I could configure my camera to run an external script, but alas it is too old. Need an upgrade desperately to take better photos.


#4

The script would be pretty simple depending on how you are transferring the files. Maybe I'll add another script section specifically for this purpose in the future, and provide some more useful arguments. I still haven't gotten around to creating a file browser either, which I had wanted for the initial release over a year ago :slight_smile:

Your best bet to get better photos on a webcam is to increase your lighting and decrease your exposure. You'll get better details and less blur. Check out this guide if you haven't seen it already. Mileage may vary, but spending an hour adjusting your lighting (search for three point lighting on google if you don't know what that is) and your camera settings. Unfortunately the camera settings are kind of clunky on the current release of Octolapse. It will improve dramatically in the next release.


#5

That new UI looks great!

I tried this...
mkdir -p "${SNAPSHOT_DIRECTORY}"/"${TIMELAPSE_OUTPUT_FILENAME}"
but it didn't work. I get an error that the process does not exist.

I put my file into the scripts folders and put /home/pi/scripts/mvsnaps.sh into the After Render Script section of my camera. I also made sure to run the chmod +x on the file as well.

Maybe my syntax is wrong as I'm pretty new to this OS. Any help is greatly appreciated.

Also, I'm wondering if this command might work...
Basically trying to rename the directory to one with the filename from the gcode.
mv "${SNAPSHOT_FULLPATH_TEMPLATE}" ${SNAPSHOT_DIRECTORY}"/"${TIMELAPSE_OUTPUT_FILENAME}"


#6

I'm going to be working on the camera scripts soon, and will see if I can come up with a script for you. Eventually I want to develop a library of scripts from which users can choose, including a copy script.