Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: shell script for data rate calculation



Uwe Freese wrote:
> 
> Hello,
> 
> I  wrote  a  little  script  that calculates the average datarate of the
> recordings.  It  uses  the fact that the index.vdr is 8 bytes per  frame
> recording (hope that's correct).

That's correct.

> Maybe  someone with really much recordings could run the script and then
> Klaus  could change the assumed datarate to that value. I think, the "30
> MB per Minute" is a little bit high.

Your script prints quite a lot of informatione - but the one that VDR would
need (i.e. MegabytePerMinute) isn't amoung them - or did I miss it?
I know, I could calculate that from the data given, but I'm too lazy... ;-)

Klaus

> My recordings have a datarate of 27 MB / min = 28.560.000 byte / min.
> 
> Klaus: Maybe you could add the script to your ftp directory.
> 
> --------------------------sample output---------------------------------
> Ixos:/usr/local/bin # ./datarate-calc.sh
> Datarate calculator for VDR - 02/2002 by Uwe Freese, mail@uwe-freese.de
> Counting VDR file sizes...
> Counting index file sizes...
> Overall VDR files size:     34286 * 1000000 bytes
> Overall index files size:   14619664 bytes
> Overall video playing time: 20 h
> Average data rate:          1714 * 1000000 bytes / h
> Average data rate:          3809 kbps
> 
> ------------------------datarate-calc.sh--------------------------------
> #!/bin/sh
> 
> # calculate data rate for all recordings
> 
> echo Datarate calculator for VDR - 02/2002 by Uwe Freese, mail@uwe-freese.de
> 
> SOURCE=/video
> 
> echo Counting VDR file sizes...
> 
> FILES=`find /video -name ???.vdr`
> VDRSIZE=0
> 
> for FILE in $FILES
> do
>   SIZE=`filesize "$FILE"`
>   SIZE=`expr $SIZE / 10000`
>   VDRSIZE=`expr $SIZE + $VDRSIZE`
> done
> 
> echo Counting index file sizes...
> 
> FILES=`find /video -name index.vdr`
> INDEXSIZE=0
> 
> for FILE in $FILES
> do
>   SIZE=`filesize "$FILE"`
>   INDEXSIZE=`expr $SIZE + $INDEXSIZE`
> done
> 
> PLAYINGTIME=`expr $INDEXSIZE / 720000`
> DATARATE=`expr $VDRSIZE / $PLAYINGTIME / 100`
> KBPS=`expr $VDRSIZE / $PLAYINGTIME / 45`
> VDRSIZE=`expr $VDRSIZE / 100`
> 
> echo "Overall VDR files size:     $VDRSIZE * 1000000 bytes"
> echo "Overall index files size:   $INDEXSIZE bytes"
> echo "Overall video playing time: $PLAYINGTIME h"
> echo "Average data rate:          $DATARATE * 1000000 bytes / h"
> echo "Average data rate:          $KBPS kbps"
> ------------------------------EOF---------------------------------------
> 
> Bye, Uwe.

-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index