Log in

View Full Version : Detect AVS Script Number of frames


ChrisBensch
19th May 2006, 07:28
I'm looking for a way to figure out how many frames an AVS contains, then output that to a file. I can't seem to get the avisynth script commands correct. Has anyone done this before that might be able to steer me in the right direction?

alfixdvd
19th May 2006, 07:39
This script can help

LoadPlugin("C:\DvdTools\DgDecode145\DGDecode.dll")
MPEG2Source("D:\ProgramasDelphi\EclBatch\Hostage.d2v",idct=3)
Logfile="D:\ProgramasDelphi\EclBatch\test.log"
WriteFile(Logfile, """ "Width : " """, "Width()")
WriteFile(Logfile, """ "Height : " """, "Height()")
WriteFile(Logfile, """ "FrameCount : " """, "Framecount()")
WriteFile(Logfile, """ "FrameRate : " """, "Framerate()")
WriteFile(Logfile, """ "FramerateNumerator : " """, "FramerateNumerator()")
WriteFile(Logfile, """ "FramerateDenominator : " """, "FramerateDenominator()")
WriteFile(Logfile, """ "Audiorate : " """, "Audiorate()")
WriteFile(Logfile, """ "Audiolength : " """, "Audiolength()")
WriteFile(Logfile, """ "AudiolengthF : " """, "AudiolengthF()")
WriteFile(Logfile, """ "Audiochannels : " """, "Audiochannels()")
WriteFile(Logfile, """ "Audiobits : " """, "Audiobits()")
WriteFile(Logfile, """ "IsAudioFloat : " """, "IsAudioFloat()")
WriteFile(Logfile, """ "IsAudioInt : " """, "IsAudioInt()")
WriteFile(Logfile, """ "IsRGB : " """, "IsRGB()")
WriteFile(Logfile, """ "IsRGB24 : " """, "IsRGB24()")
WriteFile(Logfile, """ "IsRGB32 : " """, "IsRGB32()")
WriteFile(Logfile, """ "IsYUY2 : " """, "IsYUY2()")
WriteFile(Logfile, """ "IsYV12 : " """, "IsYV12()")
WriteFile(Logfile, """ "IsYUV : " """, "IsYUV()")
WriteFile(Logfile, """ "IsPlanar : " """, "IsPlanar()")
WriteFile(Logfile, """ "IsInterleaved : " """, "IsInterleaved()")
WriteFile(Logfile, """ "IsFieldBased : " """, "IsFieldBased()")
WriteFile(Logfile, """ "IsFrameBased : " """, "IsFrameBased()")
WriteFile(Logfile, """ "GetParity : " """, "GetParity()")
Trim(0,-1)

After some frames you can stop it

ChrisBensch
21st May 2006, 19:32
All I can say is...WOW, Thanks!

frencher
14th December 2020, 17:57
Hello all,

Or...

Src = ".\Video.mp4"
Logfile = ".\Log.txt"

V = DirectShowSource(Src)

V = V.WriteFile(Logfile,"Framecount")
V = V.WriteFile(Logfile,"Framerate")
V = V.WriteFile(Logfile,"AudioRate")
V = V.WriteFile(Logfile,"AudioChannels")
V = V.WriteFile(Logfile,"AudioLength")
V = V.WriteFile(Logfile,"Width")
V = V.WriteFile(Logfile,"Height")
V = V.WriteFile(Logfile,"PixelType")

Last = V

Trim(0,-1)

Groucho2004
14th December 2020, 20:02
I'm looking for a way to figure out how many frames an AVS contains, then output that to a file. I can't seem to get the avisynth script commands correct. Has anyone done this before that might be able to steer me in the right direction?
AVSMeter yourscript.avs -i -l

StainlessS
14th December 2020, 20:15
Somehow I dont think ChrisBensch will be saying thankyou.

So, "Thankyou", for him and for everybody else too :)

wonkey_monkey
14th December 2020, 21:54
How? How does a topic get dredged up from over 300 pages down?

stax76
14th December 2020, 22:49
Groucho2004 wins this battle.

Side note:

Don't seem to be possible with ffmpeg.

Groucho2004
15th December 2020, 14:32
I didn't realise that this thread was re-animated from a mummyfied state.

johnmeyer
16th December 2020, 03:38
I didn't realise that this thread was re-animated from a mummyfied state.Yeah, this is a major-league necro.