Hello fellow programmer, I'll be quick and simple presenting this problem for you.

What I need is to display the total amount of frames in four video files on my homepage, using a ASP page. This would be perfect:

<%
frames=function("filename.extension")
Response.Write "Amount of frames in X: "& frames
%>

The four movie files will change now and then and will be in these formats: AVI, MOV, MPEG (or MPG) and WMV.

My question is: How would you go about doing this?

I know it's possible, it can be done with PHP (and no I can't change to PHP). I was thinking about using Ffmpeg but I can't get the right command to extract the frame count. Can it be done in that way perhaps?

Good to know: Homepage will run on IIS6 (Win Server 2006). I can run programs through CMD.exe (command line) from the ASP page. I have full and total control/access to the server and can install programs on it.

Further steps in my project will be to extract movie height/width/length in seconds and FPS. It would be very good if your solution to this problem also could be used to extract these four values.

I thank you for reading through my post. Any help, ideas or points will gladly be accepted. Thank you again.