Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The QTKit/QuickTime Player mystery



Yo, list,


I'm working on getting the bitrate of a simple CBR (constant bit rate) MP3.


I figured I needed the size in bytes (to be xformed in kilobits), and the duration in seconds

I'm always using QuickTime Player.app's Movie Info window as a reference:

It says:
------
Filename.mp3
DataSize: 3.48 MB = 28508 kbits (http://www.google.com/search? hl=en&lr=&c2coff=1&biw=1024&q=3.48+megabytes+in+kilobits&btnG=Search)
BitRate: 160.2 Kbits/sec
Duration: 00:03:02.23
------


Now, logically

Bitrate should = total number of kilobits / duration in second
= 28508 bits / ((3 * 60) + 2.23)
= 156.638242 kbps.

Bah, it's off less than 4 kbits. not so bad. But still, there's a first mystery going on here. I suspect 3.48 isn't the right size? Whatever.

So I try to do it in QTKit.

QTStringFromTime([myMovie duration]) gives me "0:00:03:17.322/600", so now there's a time diff of approx. 15 seconds between QTKit and Qt Player.app
the size property gives me exactly 3.48 MB, though.


Without the proper time, i cannot calc. the bit rate...

Please, someone explain what's going on here..

Thanks,



-- Olivier

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.