View Single Post
turtle
Lord of the Rant.
Formerly turtle2472
 
Join Date: Mar 2005
Location: Upstate South Carolina
 
2020-09-22, 18:41

Well.... this just might work:
Code:
mkdir `date +%Y%m%d` ln -s `date +%Y%m%d` today
Then to get the destination of the symlink...you're gonna love this:
Code:
ls -la|grep today|cut -d"-" -f2|awk -F" " '{print $2}'
I could likely shorten this down a few pipes, but I know the "-" is going to be there so it makes a great point to be the initial delineator. It will not ever change no matter what given it is a symlink. I didn't use the ">" because it doesn't leave me another delineator to work with. the cut leave me with "> 20200922" so I can use the single " " to be the delineator for awk. None of that would be needed if I could just have `date -v-1d`.

So I can use this to set the variable to then remove the symlink and set it to "yesterday" for that date folder.

From there I should be able to run ffmpeg specifying "yesterday" for the folder to be parsed with the glob input:
Code:
ffmpeg -r 24 -pattern_type glob -i '/var/services/homes/turtle/flexImages/yesterday/*.jpg' -vcodec libx264 -pix_fmt yuv420p /volume1/video/tmp/`date +%Y%m%d`_timelapse.mp4
Or something like that anyway. I may have to "cd" to the subfolder and then execute ffmpeg rather than specifying the path. I'll figure that out as I go along on this.

Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.”
Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it.
  quote