mp4 video dimension code

dburckh

Joined: 2008-07-02
Posts: 1
Posted: Wed, 2008-07-02 15:53

Seemed like the most appropriate place to post this. I've been loading a lot of Nero Digital video into Gallery. By forcing the player to QuickTime (small code change) this works pretty well with one exception. My host doesn't all me to install binaries (e.g. ffmpeg), so it can't auto detect the image dimensions. I have written a couple functions in PHP that parse the mp4 header to get the video size(width & height) and duration. I would like to integrate that with gallery, so I don't have to set them all the time.

I'm willing to donate the code, but there's a couple of things I would like to ask.

  1. Has somebody else already done this?
  2. I'm pretty good with video parsing, but I've never done PHP. A code review would be nice.
  3. What's the best way to integrate the code? I looked at the ffmpeg module. Is there a module template?

Thanks!