Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th May 2006, 07:28   #1  |  Link
ChrisBensch
Registered User
 
Join Date: Oct 2001
Posts: 169
Detect AVS Script Number of frames

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?
ChrisBensch is offline   Reply With Quote
Old 19th May 2006, 07:39   #2  |  Link
alfixdvd
Registered User
 
Join Date: Mar 2004
Posts: 243
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
alfixdvd is offline   Reply With Quote
Old 21st May 2006, 19:32   #3  |  Link
ChrisBensch
Registered User
 
Join Date: Oct 2001
Posts: 169
All I can say is...WOW, Thanks!
ChrisBensch is offline   Reply With Quote
Old 14th December 2020, 17:57   #4  |  Link
frencher
French Love
 
Join Date: Oct 2008
Location: France
Posts: 446
Hello all,

Or...

Code:
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)
__________________
2013-11-29 MVC Player Free v0.0.2.6 BD & 3D BD's Player, Demuxer v0.0.0.8b, Recoder. Tutorial
Demo for MVC Player Free: Trailer 3D

3DBD's Free - v0.0.0.0005.exe Old

Programing free for all.
frencher is offline   Reply With Quote
Old 14th December 2020, 20:02   #5  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,042
Quote:
Originally Posted by ChrisBensch View Post
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
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 14th December 2020, 20:15   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 9,497
Somehow I dont think ChrisBensch will be saying thankyou.

So, "Thankyou", for him and for everybody else too
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th December 2020 at 20:30.
StainlessS is offline   Reply With Quote
Old 14th December 2020, 21:54   #7  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,270
How? How does a topic get dredged up from over 300 pages down?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th December 2020, 22:49   #8  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,737
Groucho2004 wins this battle.

Side note:

Don't seem to be possible with ffmpeg.
__________________
mpv.net - StaxRip - MediaInfo.NET - Get-MediaInfo - More
stax76 is offline   Reply With Quote
Old 15th December 2020, 14:32   #9  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,042
I didn't realise that this thread was re-animated from a mummyfied state.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 15th December 2020 at 15:32.
Groucho2004 is offline   Reply With Quote
Old 16th December 2020, 03:38   #10  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,456
Quote:
Originally Posted by Groucho2004 View Post
I didn't realise that this thread was re-animated from a mummyfied state.
Yeah, this is a major-league necro.
johnmeyer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.