Log in

View Full Version : get basic info from an AviSynth script


Doom9
12th January 2005, 20:49
Does anybody know an easy way to get framesize, framerate and number of frames from an AviSynth script in a .NET language?

I have both stderr and stdout from a batchfile with an avs2yuv | mencoder pipe redirected to my program, but for the life of it, I never get the line that would give me that info:

D:\killbill2-1.avs: 640x272, 23976/1000 fps, 1000 frames

Moitah
13th January 2005, 22:16
Originally posted by Doom9
Does anybody know an easy way to get framesize, framerate and number of frames from an AviSynth script in a .NET language?

I have both stderr and stdout from a batchfile with an avs2yuv | mencoder pipe redirected to my program, but for the life of it, I never get the line that would give me that info:
I wrote a class in C# to read an AVI using the windows AVIFile API. It has properties for width/height/frame count, and can even read a frame into a Bitmap object so it can be displayed in a picturebox. It was for a Manual IVTC program I was working on (it generated an override file for use with Decomb) which I never released.

AVI.cs (http://www.moitah.net/CSAVI.zip) - It's GPL, I hope you can use it or get some ideas.

Doom9
15th January 2005, 16:18
neat, just what I needed. Thanks a bunch.