Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #GET CROPVALUE
- if [ ! $fflag ]; then
- #cropdetect runs 10 passes at X seconds intervals. it will fail if
- #interval secs x passes exceeds video duration so set short interval
- #for videos shorter than 30 mins & set long interval for others.
- ffmpeg -i "$i" 2>$FINFO
- DUR=$(grep -m 1 -e Duration $FINFO|awk -F ": " '{print $2}'|\
- awk -F ", " '{print $1}' |awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] }')
- DUR=$(printf %.0f\\n $DUR)
- if [ $DUR -lt 1800 ]; then
- SECS=15
- else
- SECS=180
- fi
- cropdetect
- else CROP=""
- ffprobe -show_streams "$i" &>$FINFO
- #WIDTH is needed if picture is to be scaled
- WIDTH=$(grep width $FINFO|awk -F "=" '{print $2}')
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement