]> git.plutz.net Git - serve0/blobdiff - helpers/genthumb.sh
mplayer command line compatibility with older versions
[serve0] / helpers / genthumb.sh
index 7db84782c82165d5d8b1da48b35706c50148ed12..9eec8f358f0dab8c85ad44f8ba9d24a63e61df54 100755 (executable)
@@ -4,7 +4,7 @@ video="$1"
 thumb="$2"
 
 if [ -e "$video" -a \! -e "$thumb" ]; then
-  echo '' |mplayer --input=nodefault-bindings -nosound -vo null -frames 0 -identify "$video" \
+  echo '' |mplayer -input nodefault-bindings -nosound -vo null -frames 0 -identify "$video" \
   | sort \
   | sed -rn 's:^.*ID_LENGTH=(.*)(\..*)$:\1:p;
              s:^.*ID_VIDEO_HEIGHT=(.*)$:\1:p;
@@ -19,7 +19,7 @@ if [ -e "$video" -a \! -e "$thumb" ]; then
   
   tmp="$(mktemp -d)"
   for cnt in 1 2 3 4; do
-    echo '' |mplayer --input=nodefault-bindings -nosound -vo jpeg:outdir="$tmp" -frames 1 \
+    echo '' |mplayer -input nodefault-bindings -nosound -vo jpeg:outdir="$tmp" -frames 1 \
              --benchmark -vf framestep=I,scale="$width":-2 -ss "$(($cnt*$chunk))" "$video"
     mv "$tmp/00000001.jpg" "${tmp}/_${cnt}.jpg"
   done