add webp-convert.sh, fix quotes in lastframe.sh
[scripts.git] / lastframe.sh
index 45dd9950317bdc69d21c668a3a005c08a1624114..611c862d8f98f94485311b51122444ea95218ae5 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
 
-input_fn='input.mov'
+input_fn="input.mov"
 
 image_fn='output.png'
 
-frame_count=`ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 $input_fn`
+frame_count=`ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 "$input_fn"`
 
-ffmpeg -i $input_fn -vf "select='eq(n,$frame_count-1)'" -vframes 1 "$image_fn" 2> /dev/null
+ffmpeg -i "$input_fn" -vf "select='eq(n,$frame_count-1)'" -vframes 1 "$image_fn" 2> /dev/null