- chunk="$((${l:-10} / 11))"
-
- tmp="$(mktemp -d)"
- for cnt in 1 2 3 4 5 6 7 8 9 10; do
- printf '' \
- | mplayer -input nodefault-bindings -nosound -benchmark \
- -noconfig all -really-quiet \
- -frames 1 -ss "$((cnt * chunk))" \
- -vf framestep=I \
- -vo jpeg:quality=100:outdir="${tmp}" \
- "$file" 2>&-
- mv "${tmp}/00000001.jpg" "${tmp}/_${cnt}.jpg"
+ # ffmpeg -nostdin -y -i "$file" -vf fps=11/$length,scale=320:-2 -frames 10 "$tmp/thumb_%02d.jpg" 2>&-
+
+ for n in 1 2 3 4 5 6 7 8 9 10; do
+ ffmpeg -nostdin -y -ss "$((n * length / 11))" -i "$file" -frames 1 "$tmp/thumb_$((n - 1)).jpg" 2>&-