Welcome to WebmasterWorld Guest from 34.236.145.124

Forum Moderators: ocean10000

Message Too Old, No Replies

width x height of a wmv and avi file

can i determine it via vbscript?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 17, 2002
posts:2251
votes: 0


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. :)
8:02 pm on Aug 23, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month

joined:Jan 14, 2004
posts:864
votes: 3


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.

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 17, 2002
posts:2251
votes: 0


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.
6:39 am on Aug 29, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 13, 2005
posts:1078
votes: 0


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.