|
|
@ -8,19 +8,23 @@ DATA_FOLDER="" |
|
|
|
|
|
|
|
|
|
|
|
case ${1} in |
|
|
|
case ${1} in |
|
|
|
daily) |
|
|
|
daily) |
|
|
|
DATA_FOLDER="${1}" |
|
|
|
DATA_FOLDER="daily" |
|
|
|
|
|
|
|
FILE_NAME="${DATA_FOLDER}_`date +%Y%m%d`" |
|
|
|
DATE=`date --date="1 day ago" +%Y%m%d` |
|
|
|
DATE=`date --date="1 day ago" +%Y%m%d` |
|
|
|
;; |
|
|
|
;; |
|
|
|
weekly) |
|
|
|
weekly) |
|
|
|
DATA_FOLDER="${1}" |
|
|
|
DATA_FOLDER="weekly" |
|
|
|
|
|
|
|
FILE_NAME="${DATA_FOLDER}_`date +%Y_%V`" |
|
|
|
DATE=`date --date="1 week ago" +%Y%m%d` |
|
|
|
DATE=`date --date="1 week ago" +%Y%m%d` |
|
|
|
;; |
|
|
|
;; |
|
|
|
monthly) |
|
|
|
monthly) |
|
|
|
DATA_FOLDER="${1}" |
|
|
|
DATA_FOLDER="monthly" |
|
|
|
|
|
|
|
FILE_NAME="${DATA_FOLDER}_`date +%Y_%m`" |
|
|
|
DATE=`date --date="1 month ago" +%Y%m%d` |
|
|
|
DATE=`date --date="1 month ago" +%Y%m%d` |
|
|
|
;; |
|
|
|
;; |
|
|
|
*) |
|
|
|
*) |
|
|
|
DATA_FOLDER="yearly" |
|
|
|
DATA_FOLDER="yearly" |
|
|
|
|
|
|
|
FILE_NAME="${DATA_FOLDER}_`date +%Y`" |
|
|
|
DATE=`date +%Y%m%d` |
|
|
|
DATE=`date +%Y%m%d` |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
@ -44,4 +48,4 @@ then |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# sort files |
|
|
|
# sort files |
|
|
|
ffmpeg -y -loglevel quiet -framerate 30 -pattern_type glob -i "${DATA}/${DATA_FOLDER}/*.jpg" -vcodec libx265 -crf 20 -vf scale=1920:1080 "${DATA}/video/${DATA_FOLDER}_${DATE}.mp4" |
|
|
|
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" |
|
|
|