How to compute length of a recording?

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

 



Hello,

how do I get the duration in a shell script?
The following code does not always compute the correct value:

sumlen=0
for i in "$recdir"/0*.vdr ; do
    # length in sec. in ID_LENGTH
    ergebnis=$(/usr/local/bin/midentify "$i")
    eval $ergebnis
    sumlen=$(echo "scale=3 ; $sumlen + $ID_LENGTH" | bc)
done
echo $sumlen

(midentify is mplayer -vo null -ao null -frames 0 -identify "$@")

Can you tell me a correct way?

Thank you,



Dirk


_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux