first jenkins run
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
#!/bin/bash
|
||||
# create timelapse
|
||||
|
||||
# end the loop
|
||||
rm $WORKING_DIR/run
|
||||
sleep 5
|
||||
|
||||
# create timelapse
|
||||
ffmpeg -r 30 -pattern_type glob -i "$WORKING_DIR/*.jpg" \
|
||||
-vf "scale=1920x1080" -vcodec libx264 /$WORKING_DIR/00-timelapse.mp4
|
||||
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
#!/bin/bash
|
||||
# no need to do this math forever
|
||||
input_width=1920
|
||||
input_height=1080
|
||||
output_width=1340
|
||||
output_height=580
|
||||
# Calculate the ratio for trimming the top part
|
||||
trim_ratio=$(echo "scale=4; $output_height / $output_width * $input_width" | bc)
|
||||
|
||||
# this saves a snapshot of the camera every second or so depending on how long all the other crap takes
|
||||
# let's hope the vars make it otherwise imma need to parse a bollocksing file
|
||||
@ -26,12 +33,6 @@ do
|
||||
# I have 1340x580. i think i will truncate the top
|
||||
# Calculate the height to trim based on the aspect ratios of the input and output images
|
||||
if (( $i % 5 == 0 )); then
|
||||
input_width=1920
|
||||
input_height=1080
|
||||
output_width=1340
|
||||
output_height=580
|
||||
# Calculate the ratio for trimming the top part
|
||||
trim_ratio=$(echo "scale=4; $output_height / $output_width * $input_width" | bc)
|
||||
NOW=$(date +%Y%m%d%H%M%S)
|
||||
convert $WORKING_DIR/$FILENAME.jpg -gravity North -crop x$trim_ratio +repage -resize 1340x580 {{ working_folder }}/small_thumbs/$NOW.jpg
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user