X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=helpers%2Fgenmeta.sh;h=ceeebe307bdcf8abbc78ae8f58d1dc1cc5fbf843;hb=81a8c73b13df086c10128621766dda6ae2380528;hp=4fa28e4b4427ebef56126135e841156d78098005;hpb=06af2f639193f9e2de0bae67125b66665c327e8f;p=serve0 diff --git a/helpers/genmeta.sh b/helpers/genmeta.sh index 4fa28e4..ceeebe3 100755 --- a/helpers/genmeta.sh +++ b/helpers/genmeta.sh @@ -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 <"$meta" ${length:-0} ${width:-0} ${height:-0} ${video##*/}