master
Holger Wirtz 5 years ago
parent 647cd408b6
commit ff7dd0c253
  1. 1
      bin/timelapse_garbage_collector.sh
  2. 2
      bin/timelapse_video.sh
  3. 2
      bin/timelapse_weekly.sh

@ -6,6 +6,7 @@ DATA="${MOUNT_PATH}/timelapse"
CLIENT="timelapse@192.168.111.2" CLIENT="timelapse@192.168.111.2"
CLIENT_FOLDER="/timelapse" CLIENT_FOLDER="/timelapse"
mkdir -p "${DATA}/trash"
for i in `find ${DATA}/data/ -name "*.jpg"` for i in `find ${DATA}/data/ -name "*.jpg"`
do do
NUM_HARDLINKS=`stat --format="%h" ${i}` NUM_HARDLINKS=`stat --format="%h" ${i}`

@ -51,4 +51,4 @@ then
fi fi
# create video # create video
ffmpeg -y -loglevel quiet -framerate 30 -pattern_type glob -i "${DATA}/${DATA_FOLDER}/*.jpg" -vcodec libx265 -crf 20 -vf scale=1920:1080 "${DATA}/video/${FILE_NAME}.mp4" ffmpeg -y -loglevel quiet -framerate 30 -pattern_type glob -i "${DATA}/${DATA_FOLDER}/*.jpg" -vcodec libx265 -crf 20 -preset slower -vf scale=1920:1080 "${DATA}/video/${FILE_NAME}.mp4"

@ -13,7 +13,7 @@ else
WEEK=`date --date="last monday" +%V` WEEK=`date --date="last monday" +%V`
fi fi
current_week=`date +'%V'` current_week=`date +'%V'`
current_week_diff=$((${current_week}-${WEEK})) current_week_diff=$((${current_week}-${WEEK}-1))
DATE_WEEK=`date --date="last monday - ${current_week_diff} weeks" +%Y%m%d` DATE_WEEK=`date --date="last monday - ${current_week_diff} weeks" +%Y%m%d`
DATE_START=`date --date="${DATE_WEEK}" +%s` DATE_START=`date --date="${DATE_WEEK}" +%s`
DATE_STOP=$(($DATE_START+7*86400)) DATE_STOP=$(($DATE_START+7*86400))

Loading…
Cancel
Save