views:

185

answers:

2

Hello, I am trying to get the duration of a video taken with the camera using UIImagePickerController on the iphone, has anyone found a solution to this?

Thanks

Daniel

A: 

I don't know of any framework function to do so, so I'm afraid you'll have to parse the video container yourself (which by the way, is QuickTime/.mov) to extract this info. It's not like it's not documented. Luckily since the provider is known, you can trust all info to be truthful, which you can't assume of random videos found on the web.

Pierre Lebeaupin
A: 

You can now do this using AVFoundation you can make your movie into an AVAsset and then check the duration property

Daniel