View Full Version : length of an ac3 file ?


Typoon
5th May 2003, 14:30
Hi all

I don't know if this is the good place to ask but I haven't found any others around this forum.

Well, I would like to know if someone knows about a small command line oriented utility which could give me the total length (hh:mm:ss) of a given ac3 file ?

I've tried some math using the file size & bitrate but I never have obtained the correct length, due to the ac3 overhead I think.

any help would be appreciate.

Thank you

Jean-Fabrice

gabest
5th May 2003, 22:25
Try harder, it is really filesize/bitrate.

Typoon
6th May 2003, 09:20
Well,

Given a 448 Kbps ac3 file which size is 257_655_552 Bytes.

Calcultating size / bitrate gives a length of 1h, 14mn, 53s
SmartRipper claims that the movie to be 1h, 16mn, 41s. And I think it's true.

How do you explain this ?

Jean-Fabrice

fu2k
6th May 2003, 11:32
I do believe that 257655552 * 8 / 448000 = 4600.992, which is 1:16:40.992

Typoon
6th May 2003, 14:39
Well, I do not know that 448 kilo bits was 448000 bits

As far as I know it is 458752 bits, no ? (448*1024)

Jean-Fabrice

gabest
6th May 2003, 14:58
Should be, but for most audio formats it is x1000 by definition.

dvd2svcd
6th May 2003, 15:24
It is confusing, but I believe that it is only regarding to bytes that a complement of 2 is used (1 kilo = 1024). In all other instances 1 kilo = 1000 and that goes for bits as well.

Typoon
6th May 2003, 21:27
Ok,

Thank you very much guys. I will use then use 1K = 1000 for my audio calc and assume that - as I learned at school - 1KB is still 1024 Bytes :-)

Thanx a lot.

Jean-Fabrice