diff -r -u vdrrip-0.3.0/scripts/queuehandler.sh vdrrip-0.3.0.gentoo/scripts/queuehandler.sh --- vdrrip-0.3.0/scripts/queuehandler.sh 2006-10-06 00:12:10.000000000 +0200 +++ vdrrip-0.3.0.gentoo/scripts/queuehandler.sh 2006-10-06 00:11:50.000000000 +0200 @@ -305,6 +305,12 @@ # start the preview in the middle of the movie local length=`"$mp" -identify -frames 0 "$dir/001.vdr" 2>/dev/null | grep ID_LENGTH | cut -d"=" -f2` + # repeat command if failed first time + if [ -z "$length" ] + then + length=`"$mp" -identify -frames 0 "$dir/001.vdr" 2>/dev/null | \ + grep ID_LENGTH | cut -d"=" -f2` + fi let local ss=length/2 previewval="-ss $ss -endpos $previewlength" } @@ -790,6 +796,12 @@ # detect length of splitted file and add it to $splitpos local length=`$mplayer -identify -frames 0 $tempdir/$ofile 2>/dev/null | \ grep ID_LENGTH | cut -d= -f2` + # repeat command if failed first time + if [ -z "$length" ] + then + length=`$mplayer -identify -frames 0 $tempdir/$ofile 2>/dev/null | \ + grep ID_LENGTH | cut -d= -f2` + fi let splitpos=splitpos+length-overlap let count=count+1 done