views:

18

answers:

1

Are there any good libraries (preferably free) for working with video files and their timecodes? I especially need two kinds of functionality:

  • Get information about video files in as many formats as possible, but most importantly QuickTime. For example duration, bit rate, frame rate, format, dimensions, display aspect ratio, pixel aspect ratio, audio channels, audio frequency, audio format, et cetera.
  • Ways of doing math with exact video time codes. For example being able to sum up the durations of several clips and get their total length with frames and all. So sort of like working with regular times, except that it takes frames and frame rates into account as well.

Does anyone have experience with this? Anything you can recommend?

+1  A: 

I've used ffmpeg successfully in the past to convert QuickTime (and other videos), and the ffmpeg-php project's ffmpeg_movie class seems to have methods to get the information that you want. Whether or not ffmpeg is actually able to reliably extract all that information for various formats I'm not sure, since I haven't really used it at the level of detail you're working with.

Tim Stone