Jeffrey McManus

The New Thing

Jeffrey McManus header image 2

Detemining the Dimensions of a Video Programmatically

September 7th, 2007 · 1 Comment · Web/Tech

I know a guy who runs a web site that wants to enable users to upload video files of arbitrary sizes. We won’t be converting video, at least not at first, just letting people upload files they’ve created. The trick is, we want to let users preview the video in the browser, which means we’ll need to create an EMBED tag programmatically based on the true height and width of the video.

This problem must have come up before, but I can’t find a solution for Flash Video (.FLV). How can you determine the dimensions of a Flash Video file programmatically?

Apple provides a COM interface to QuickTime that let you do this, although it’s clunky (the interface was only intended to support the use case of creating custom clients that play QuickTime video — doing something to a video file without playing it requires some contortions). Fortunately you can run Windows Forms on the server side so it’s not impossible to get around this. But I can’t even figure out where to start with Flash Video.

Related posts:

  1. Comcast Blocks Most Bittorrent Traffic
  2. NBC To Launch Loathsome, Defective Video Download Service
  3. Our Kids’ Video Player is an “Open Platform”

Tags:

One Comment so far ↓

Leave a Comment