From 7a3a72b7dc44b8e9acd847f50883e63cfbe23a7a Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 30 Jun 2016 23:51:44 +0200 Subject: [PATCH] fixed time for pict-converter --- www/pict-converter.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/www/pict-converter.sh b/www/pict-converter.sh index b1bde93..cf456e6 100755 --- a/www/pict-converter.sh +++ b/www/pict-converter.sh @@ -8,15 +8,15 @@ function convert { now=$(date +"%Y-%m-%d--%T") echo "Timelaps conversion | $now" - mkdir ~/hehe-rover/www/tmp_videos - mkdir ~/hehe-rover/www/tmp_metadata - mkdir ~/hehe-rover/www/tmp_pictures + mkdir tmp_videos + mkdir tmp_metadata + mkdir tmp_pictures rm -f tmp_pictures/* x=1 for i in public_html/pictures/*.jpg; do - counter=$(printf %03d $x) + counter=$(printf %06d $x) ln "$i" tmp_pictures/img"$counter".jpg x=$(($x+1)) done @@ -30,7 +30,7 @@ function convert { echo "creating raw timelaps" ffmpeg -y \ -framerate $pf \ - -i tmp_pictures/img%03d.jpg \ + -i tmp_pictures/img%06d.jpg \ -r $vf -pix_fmt yuv420p -vcodec libx264 \ tmp_videos/timelaps-raw.mp4 @@ -53,9 +53,9 @@ function convert { # SRC src="${pict/public_html\/pictures\//}" # TIME - # time="${pict/pictures\/hehe-/}" - # time="${time/.jpg/}" - time=`exiftool 2>/dev/null -S --DateTimeOriginal -p '$DateTimeOriginal' -d %Y/%m/%d-%T "$pict"` + time="${pict/public_html\/pictures\/hehe-/}" + time="${time/.jpg/}" + # time=`exiftool 2>/dev/null -S --DateTimeOriginal -p '$DateTimeOriginal' -d %Y/%m/%d-%T "$pict"` # GPS gps=`exiftool 2>/dev/null -n -p '$GPSLatitude,$GPSLongitude' $pict`