mirror of
https://github.com/JanJastrow/ViThumbs.git
synced 2024-11-23 15:49:55 +01:00
Simplified thumbnail naming
This commit is contained in:
parent
5649a8f367
commit
c5d7de9568
14
vithumbs.sh
14
vithumbs.sh
@ -39,22 +39,10 @@ for (( VARIABLE=0; VARIABLE<NFRAMES; VARIABLE++ ))
|
|||||||
do
|
do
|
||||||
OFFSET=$(echo "scale=2;$VARIABLE*$DURATION/$NFRAMES+$DURATION/$NFRAMES/2" | bc)
|
OFFSET=$(echo "scale=2;$VARIABLE*$DURATION/$NFRAMES+$DURATION/$NFRAMES/2" | bc)
|
||||||
|
|
||||||
if [ $VARIABLE -gt 9 ];then
|
|
||||||
ZEROS="00"
|
|
||||||
if [ $VARIABLE -gt 99 ];then
|
|
||||||
ZEROS="0"
|
|
||||||
if [ $VARIABLE -gt 999 ];then
|
|
||||||
ZEROS=""
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
ZEROS="000"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create thumbnails
|
# Create thumbnails
|
||||||
ffmpeg -start_at_zero -copyts -ss $OFFSET -i "$INPUT" \
|
ffmpeg -start_at_zero -copyts -ss $OFFSET -i "$INPUT" \
|
||||||
-vf "drawtext=$FONT:fontsize=60:fontcolor=0xEEEEEE::shadowcolor=0x111111:shadowx=2:shadowy=2:x=(W-tw)/40:y=H-th-20:text='%{pts\:gmtime\:0\:%H\\\\\\:%M\\\\\:%S}'" \
|
-vf "drawtext=$FONT:fontsize=60:fontcolor=0xEEEEEE::shadowcolor=0x111111:shadowx=2:shadowy=2:x=(W-tw)/40:y=H-th-20:text='%{pts\:gmtime\:0\:%H\\\\\\:%M\\\\\:%S}'" \
|
||||||
-vframes 1 ${TMPDIR}$ZEROS$VARIABLE.png
|
-vframes 1 ${TMPDIR}$(printf "%04d" $VARIABLE).png
|
||||||
done
|
done
|
||||||
|
|
||||||
# Merge thumbnails into tile image
|
# Merge thumbnails into tile image
|
||||||
|
Loading…
Reference in New Issue
Block a user