Forum Moderators: open

Message Too Old, No Replies

width x height of a wmv and avi file

can i determine it via vbscript?

         

GaryK

6:46 pm on Aug 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a way to determine the width and height of both a wmv and avi (DivX) video using VBScript on an .asp page? Thanks in advance. :)

Ocean10000

8:02 pm on Aug 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Are you looking at editing/reencoding it on the server or just trying to find out what the original height and width were?

One might look into Microsoft Media Server related controls. I never looked into it myself but it would be a start.

GaryK

8:09 pm on Aug 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm offering video tutorials for one of my sites. The player is embedded in a web page. In order to get the right aspect ratio for the player I need to know the width and height of each video at run-time. I was hoping there was some way to pull this from the .wmv or .avi file directly. There is a SDK for WMS, but I can't find a way to interact with it on a web page. I'm hoping to avoid adding width and height columns to the database for each video, but if that turns out to be the only way then I'll do it.

carguy84

6:39 am on Aug 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Typically this is something I'd store in the DB, but you can use FFMpeg to get the width and height. There's also some commercial .NET wrappers you can buy that make it really easy to load a video as an object and get all sorts of data about it.

We use it to encode uploaded video and embed parameters, but it reads info too.