6 eval $(mplayer -really-quiet -identify -frames 0 -ao null -vo null "$video" 2>/dev/null |sed -rn 's:ID_VIDEO_WIDTH=(.*):width=\1:p;s:ID_VIDEO_HEIGHT=(.*):height=\1:p;s:ID_LENGTH=(.*)(\..*)$:length=\1:p;')
8 [ -z "$length" -o -z "$width" -o -z "$height" ] && exit 0
10 if [ "$(($height*1000/$width))" -gt "750" ]; then
11 width="$((75*$width/$height))"
14 height="$((100*$height/$width))"
17 [ -z $width ] && width=100
18 [ -z $height ] && height=100
19 chunk="$(($length / 5))"
21 for cnt in 1 2 3 4; do
22 debug mplayer -nosound -vo jpeg -frames 10 -vf "scale=$width:$height" -ss "$(($cnt*$chunk))" "$video"
23 mplayer -nosound -vo jpeg -frames 10 -vf "scale=$width:$height" -ss "$(($cnt*$chunk))" "$video" >/dev/null 2>/dev/null &
25 while (ps -p "$mpid" >/dev/null 2>/dev/null); do
26 [ "$watch" -gt 10 ] && kill -9 "$mpid" || sleep 1
29 cp -f 00000009.jpg "${thumb}-${cnt}.jpg" 2>/dev/null
31 montage "${thumb}-"[1234]".jpg" -tile 2x2+0+0 -geometry 100x75+3+3 -background "#000000" "${thumb}" 2>/dev/null
32 rm 000000[01][0-9].jpg "${thumb}-"[1234]".jpg" 2>/dev/null