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 12th February 2019, 18:09   #161  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Sorry, missed your length parameter.

Maybe BlankClip is just so fast that even a very large length won't matter.

Groucho2004 can probably enlighten us further.
videoh is offline   Reply With Quote
Old 12th February 2019, 19:12   #162  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
blankclip constructs a single blank frame on startup and just returns a pointer to it each time. It doesn't actually do anything per frame - not even calling env->NewVideoFrame() - so it's super fast. Same with colorbars, although that has a parameter to disable the framestore:

Code:
colorbars(staticframes = false)
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 12th February 2019, 19:33   #163  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by wonkey_monkey View Post
blankclip constructs a single blank frame on startup and just returns a pointer to it each time. It doesn't actually do anything per frame - not even calling env->NewVideoFrame() - so it's super fast. Same with colorbars, although that has a parameter to disable the framestore:

Code:
colorbars(staticframes = false)
Quite the difference:

Code:
colorbars(staticframes = x, pixel_type = "yv12").loop(10000).trim(0, 99999999)
staticframes = true
Code:
Frames processed:               314750000 (0 - 314749999)
FPS (min | max | average):      5811893 | 32190153 | 30993818
Process memory usage (max):     23 MiB
Thread count:                   9
CPU usage (average):            23.6%

Time (elapsed):                 00:00:10.155
staticframes = false
Code:
Frames processed:               287810 (0 - 287809)
FPS (min | max | average):      7370 | 28961 | 28340
Process memory usage (max):     23 MiB
Thread count:                   9
CPU usage (average):            23.5%

Time (elapsed):                 00:00:10.156
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 23rd February 2019, 03:14   #164  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
v2.9.0
  • Added Veselin Georgiev's libcpuid (again) for better detection of some CPU features (such as number of physical/logical cores of contemporary CPUs)
  • Minor other fixes
  • Refactoring
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 6th March 2019, 18:50   #165  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
If it doesn't exist already, would it be possible to add a switch to output seconds per frame instead of frames per second? It feels like it might be more useful, or at least differently useful, for benchmarking.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 6th March 2019, 19:39   #166  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by wonkey_monkey View Post
If it doesn't exist already, would it be possible to add a switch to output seconds per frame instead of frames per second? It feels like it might be more useful, or at least differently useful, for benchmarking.
There are two INI file options:

DisplayFPS=1
DisplayTPF=0

from the included documentation:

Quote:
"DisplayFPS" (0 or 1)
If set to "1", frames/second is printed to the console.

"DisplayTPF" (0 or 1):
If set to "1", time/frame (in milliseconds) is printed to the console.

Edit: These two options are not mutually exclusive.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 6th March 2019 at 19:45.
Groucho2004 is offline   Reply With Quote
Old 6th March 2019, 19:48   #167  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
I should never have doubted you. And I should have read the manual.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 8th May 2019, 10:14   #168  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
v2.9.1
  • Fixed an error reporting bug
  • More accurate memory usage measurements
  • Limit performance data section in log/csv files to 10000 entries
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 31st May 2019, 21:34   #169  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
v2.9.2
  • Fixed wrong AVISYNTH_INTERFACE_VERSION
  • Updated dates in some messages
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 13th June 2019, 13:48   #170  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
Thanks again for AVSMeter, Groucho2004 and I've a question (which will most likely highlight my ignorance ). Under "Features" it states '"Running" scripts with virtually no overhead...', which I kinda-sorta understand. What I wonder is if "running" multiple scripts simultaneously with AVSMeter would change the output statistics, like running multiple non-multithreaded real scripts simultaneously does? Let me try again: If I "ran" three scripts in a row with AVSMeter--Script A, Script B, and ScriptC--then ran the three scripts simultaneously with AVSMeter, would the statistics for the three pairs of log files--Script A alone and Script A simultaneously, Script B alone and Script B simultaneously, Script C alone an Script C simultaneously--be the same? I need more coffee...
LouieChuckyMerry is offline   Reply With Quote
Old 13th June 2019, 18:09   #171  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LouieChuckyMerry View Post
What I wonder is if "running" multiple scripts simultaneously with AVSMeter would change the output statistics, like running multiple non-multithreaded real scripts simultaneously does? Let me try again: If I "ran" three scripts in a row with AVSMeter--Script A, Script B, and ScriptC--then ran the three scripts simultaneously with AVSMeter, would the statistics for the three pairs of log files--Script A alone and Script A simultaneously, Script B alone and Script B simultaneously, Script C alone an Script C simultaneously--be the same? I need more coffee...
First of all, AVSMeter only allows a single instance by default. If you want to run multiple instances you have to enable that in avsmeter.ini.

How much multiple instances of AVSMeter affect the statistics for each instance depends on how demanding each instance is. If one instance already eats up most of the CPU cycles then the other instances will of course be heavily affected. It also depends on the process priority for each instance. Also, if you mess around with thread affinity, things get even more complicated.

Lastly, if the Windows thread scheduler has a bad day, the CPU cycles may go wild and do silly things.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 13th June 2019 at 19:18. Reason: typo
Groucho2004 is offline   Reply With Quote
Old 13th June 2019, 18:59   #172  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Not just depend upon CPU, hard drive usage (seeking etc) would likely also play a significant part, probably other stuff too.
Not a good idea anyway (assuming you want reasonable results).
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 14th June 2019, 12:29   #173  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
There's now a 45 minute (!) tutorial for AVSMeter on youtube.
https://www.youtube.com/watch?v=RxXP0oNJh4Q

Thanks Andrew Swan!
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 16th June 2019 at 17:50.
Groucho2004 is offline   Reply With Quote
Old 15th June 2019, 14:35   #174  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
Groucho2004 and Bender, er, StainlessS: Thanks very much for the answers (and Happy Saturday!). I'll stick with one instance at a time so that I'm the only silly thing in the room.
LouieChuckyMerry is offline   Reply With Quote
Old 15th June 2019, 23:33   #175  |  Link
LouieChuckyMerry
Registered User
 
LouieChuckyMerry's Avatar
 
Join Date: Feb 2014
Posts: 355
Back for more answers--still Happy Saturday!--and thank you for your patience . I'm trying to understand just how to use AVSMeter to, hopefully, improve encoding speed in AviSynth+ x86 on a Windows 7 x64 quad-core setup. I'm testing different "SetMemoryMax()" and "PreFetch()" combinations with the script:

Code:
SOURCE INFORMATION HERE
SetMemoryMax(xxxx)
SetFilterMTMode("Default_MT_Mode",2)
SMDegrain(TR=3,ThSAD=600,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True)
FastLineDarkenMod4()
ConvertToDoubleWidth()
F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0,Input_Mode=2,Output_Mode=2)
ConvertFromDoubleWidth()
PreFetch(x)
and I'm unclear what to make of the fact that a trim test with "SetMemoryMax(0)", which I think results in the default memory amount (a number I can't discern from the Wiki), and "PreFetch(5)" (which gave better results than 6, 7, or 8 in earlier tests without any "SetMemoryMax()" line) "run" with AVSMeter results in:

Code:
[Runtime info]
Frames processed:               1130 (0 - 1129)
FPS (min | max | average):      0.392 | 272826 | 9.702
Process memory usage (max):     1157 MiB
Thread count:                   21
CPU usage (average):            61.6%
but only achieves 2.99 fps and appears to use 100% of the CPU when viewed in Windows Task Manager when actually run in AviSynth+. Any elucidation is much appreciated.
LouieChuckyMerry is offline   Reply With Quote
Old 16th June 2019, 00:06   #176  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LouieChuckyMerry View Post
but only achieves 2.99 fps and appears to use 100% of the CPU when viewed in Windows Task Manager when actually run in AviSynth+.
I do not understand this part -> "when actually run in AviSynth+".
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 16th June 2019, 02:18   #177  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Posts: 1,213
Quote:
Originally Posted by LouieChuckyMerry View Post
Back for more answers--still Happy Saturday!--and thank you for your patience . I'm trying to understand just how to use AVSMeter to, hopefully, improve encoding speed in AviSynth+ x86 on a Windows 7 x64 quad-core setup. I'm testing different "SetMemoryMax()" and "PreFetch()" combinations with the script:

Code:
SOURCE INFORMATION HERE
SetMemoryMax(xxxx)
SetFilterMTMode("Default_MT_Mode",2)
SMDegrain(TR=3,ThSAD=600,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True)
FastLineDarkenMod4()
ConvertToDoubleWidth()
F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0,Input_Mode=2,Output_Mode=2)
ConvertFromDoubleWidth()
PreFetch(x)
and I'm unclear what to make of the fact that a trim test with "SetMemoryMax(0)", which I think results in the default memory amount (a number I can't discern from the Wiki), and "PreFetch(5)" (which gave better results than 6, 7, or 8 in earlier tests without any "SetMemoryMax()" line) "run" with AVSMeter results in:

Code:
[Runtime info]
Frames processed:               1130 (0 - 1129)
FPS (min | max | average):      0.392 | 272826 | 9.702
Process memory usage (max):     1157 MiB
Thread count:                   21
CPU usage (average):            61.6%
but only achieves 2.99 fps and appears to use 100% of the CPU when viewed in Windows Task Manager when actually run in AviSynth+. Any elucidation is much appreciated.
You do realize that the effects of an encoder are not factored in.
The 2.99 fps when run in windows is probably the result of the encoder.
gonca is offline   Reply With Quote
Old 16th June 2019, 03:21   #178  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by gonca View Post
The 2.99 fps when run in windows
"when run in windows"???

I kinda understand now that Chucky is comparing apples and oranges but the terminology you guys are using makes no sense.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 16th June 2019 at 10:54.
Groucho2004 is offline   Reply With Quote
Old 16th June 2019, 07:01   #179  |  Link
Natty
Noob
 
Join Date: Mar 2017
Posts: 221
Quote:
Originally Posted by Groucho2004 View Post
I do not understand this part -> "when actually run in AviSynth+".
maybe - when actually encoding
Natty is offline   Reply With Quote
Old 16th June 2019, 11:24   #180  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Posts: 1,213
Quote:
Originally Posted by Groucho2004 View Post
"when run in windows"???

I kinda understand now that Chucky is comparing apples and oranges but the terminology you guys are using makes no sense.
Sorry
I should have written "run in Windows", with quotes, indicating that it really is being run in an encode workflow.
I was just trying to figure out what the op was referring to.
Apologies for confusing the issue
gonca 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 22:46.


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