Seconds into time format

Discussion in 'Mac Programming' started by i.yalovecky, Apr 26, 2010.

  1. i.yalovecky macrumors member

    Feb 24, 2010
    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?
  2. kainjow Moderator emeritus


    Jun 15, 2000
    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).

    What kind of info?
  3. i.yalovecky thread starter macrumors member

    Feb 24, 2010
    When iTunes firstly opened audio-cd, it downloads data for it from internet. Where it stores it and how i can access to this data?

Share This Page