Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

i.yalovecky

macrumors member
Original poster
Feb 24, 2010
67
0
I'm getting info about file duration by kMDItemDurationSeconds of MDItem, so i want to expose its to user in readable format. How i can do it? Thanks.

And may be somebody already has any code what grab info from audio-video files?
 
I'm getting info about file duration by kMDItemDurationSeconds of MDItem, so i want to expose its to user in readable format. How i can do it? Thanks.

According to the docs, kMDItemDurationSeconds is stored as a CFNumber (NSNumber if in Cocoa). Once you pull out the primitive value, it's just a few math operations to format it. But you need to choose a format option first (for example HH:MM:SS).

And may be somebody already has any code what grab info from audio-video files?

What kind of info?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.