View Full Version :
Using VDub filter and getting info in avisynth
TelemachusMH
7th January 2002, 19:36
In the new beta version of avisynth it has several new features that are very usefull to me. I read on the offical site that the new version has functions like putting in VitualDub filters and getting the number of frames in the frameserved file, but none of these are documented yet. :(
I was wondering if anyone knows how to use these new fuctions?
Thanks,
TelemachusMH
ARDA
8th January 2002, 01:17
Take a look at http://www.labdv.com/en/manuals/avisynth.php#virtualdub
and try to get from download page Avisynth2001c.zip,in which you will find a file "vdfilter.avs" and if you know how to use avisynth script language you can add other filters to that file. I hope that can help you
TactX
8th January 2002, 10:34
ShowFrameNumber(clip)
and
ShowSMPTE(clip,fps) #for SMPTE time code.
Reading the Avisynth reference doc (http://www.horizon.nl/~michel/uk/default.htm) here should solve some of your problems :)
TelemachusMH
8th January 2002, 17:38
Thanks for the suggestions but I re-read the webpage and found what I wanted, but I have a different question now. Is there a way to have avisynth return a number (ie the framecount) so that another program can use it?
can I just say:
totalframes = clip.framecount
return totalframes
or is there a way to print it to the screen so it can be extracted?
FreQi
8th January 2002, 18:09
You could just open it in vdub and go to the end of the video clip. The Frame number is listed in the status bar.
TelemachusMH
17th January 2002, 20:41
Does avisynth have a log file command, or something that could let you print into a file or to the standard out? I am looking for a way to return the total framecount of a file so that another program can calculate the bitrate.
I also realized that the d2v files are just normal text, I know that you can figure out the framecount from that, but I don't know how. Does anyone know that either?
:confused:
Thanks,
TelemachusMH
daxab
26th January 2002, 06:08
You could write an Avisynth plugin that takes a clip as an argument, and the first time it has to serve a frame, it writes out the total frame count to a log file somewhere (maybe this is the second arg). The plugin need not every actually serve its child clip's frames -- it can, for example, just serve the first frame over and over. Then you load it up:
LoadPlugin("C:\myplugins\framecounter.dll")
AVISource("C:\myavi.avi")
FrameCounter(last, "C:\frames.txt")
When you "play" this it should do the trick.
On the other hand, I can't help but think that there must be an easier way to do this.
(If you look at DVD2SVCD, what it does is load up the .avs file in CCE, save the project, then read the frame count from the .ecl file. This requires some shenanigans with feeding keystrokes to CCE and so forth. Also, if you're looking to do some automated encodes, DVD2SVCD may already do what you need.)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.