description="$(sed -n '3,$p' "$meta")"
fi
-eval $(mplayer -noconsolecontrols -input file=/dev/null -slave -really-quiet -identify -frames 0 -ao null -vo null "$video" |sed -rn 's:ID_VIDEO_WIDTH=(.*):width=\1:p;s:ID_VIDEO_HEIGHT=(.*):height=\1:p;s:ID_LENGTH=(.*)(\..*)$:length=\1:p;')
-
-[ -z "$tags" ] && tags='|'
+mplayer -really-quiet -identify -frames 0 -nosound -vo null "$video" \
+| sed -rn 's:ID_VIDEO_WIDTH=(.*):\1:p;
+ s:ID_VIDEO_HEIGHT=(.*):\1:p;
+ s:ID_LENGTH=(.*)(\..*)$:\1:p;' \
+| tr '\n' ' ' \
+| read width height length
cat <<EOF >"$meta"
-$length $width $height $(basename "$video")
-$tags
-$description
+${length:-0} ${width:-0} ${height:-0} ${video##*/}
+${tags:-|}
+${description}
EOF