]> git.plutz.net Git - serve0/blobdiff - helpers/genmeta.sh
mplayer command line compatibility with older versions
[serve0] / helpers / genmeta.sh
index 4fa28e4b4427ebef56126135e841156d78098005..ceeebe307bdcf8abbc78ae8f58d1dc1cc5fbf843 100755 (executable)
@@ -8,13 +8,13 @@ if [ -r "$meta" ]; then
   description="$(sed -n '3,$p' "$meta")"
 fi
 
-mplayer --input=nodefault-bindings:conf=/dev/null -nosound -vo null -identify -frames 0 "$video" \
+echo '' |mplayer -input nodefault-bindings -nosound -vo null -identify -frames 0 "$video" \
 | sort \
 | sed -rn 's:ID_LENGTH=(.*)(\..*)$:\1:p;
            s:ID_VIDEO_HEIGHT=(.*):\1:p;
            s:ID_VIDEO_WIDTH=(.*):\1:p;' \
 | tr '\n' ' ' \
-| read length height width
+| read length height width 2>/dev/null
 
 cat <<EOF >"$meta"
 ${length:-0}   ${width:-0}     ${height:-0}    ${video##*/}