Link to home
Start Free TrialLog in
Avatar of mediaproxy
mediaproxy

asked on

get .wmv video file duration

Hi,

Can anyone show me how to get .wmv video files duration (length of the movie) programmatically?
Windows Explorer can display duration of video/audio file, so I think there should be Win32 api dll that do the job.  It's even better if you can suggest how to do that using .Net class library without using Win32 api.  

Is it even possible to read the duration info using javascript? And if anyone already knew a solution. Please let me know too. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Razzie_
Razzie_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This may help
http://www.dotnet247.com/247reference/msgs/45/228037.aspx


>>Is it even possible to read the duration info using javascript?
I dont think so it could be done with javascript
I found another solution, would like to share here
if you are using Window Media Player SDK

IWMPMedia media = axPlayer.newMedia(mediaFilePath);
endTime = (int)Math.Floor(media.duration);

these lines can help find the duration of of any media being played in media player