From b6d914a4ee1b64a318b17207b92d791af5c8d658 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 7 Aug 2015 16:47:41 +0000 Subject: [PATCH] cleaned up meta gnerator svn path=/trunk/; revision=79 --- helpers/genmeta.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/helpers/genmeta.sh b/helpers/genmeta.sh index 805bde1..c41c491 100755 --- a/helpers/genmeta.sh +++ b/helpers/genmeta.sh @@ -8,12 +8,15 @@ if [ -r "$meta" ]; then 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 <"$meta" -$length $width $height $(basename "$video") -$tags -$description +${length:-0} ${width:-0} ${height:-0} ${video##*/} +${tags:-|} +${description} EOF -- 2.39.2