AVSMeter is a CLI (command line interface) tool that "runs" an Avisynth script with virtually no overhead, displays clip info, CPU and memory usage and the minimum, maximum and average frames processed per second. It measures how fast Avisynth can serve frames to a client application (x264, for example) and comes in handy when testing filters/plugins to evaluate their performance and memory requirements.
`Usage: AVSMeter script.avs [switches]``
` `Switches:``
` `-info [-i] Display clip info only``
` `-log [-l] Create log file````
-f Use fixed frame interval for measurements` ``(See also "UseFixedFrameInterval" INI setting)
` -gpu Monitor GPU usage``
` `-range=first,last Specify frame range (See also "FrameRange" INI setting)``
` `-timeout=n Specify timeout (seconds) (See also "ReadTimeout" INI setting)``
` `-help [-h] Display command line usage``
` ``
AVSMeter checks if a settings file ("AVSMeter.ini") exists in the directory from where it is started. If not, it will be created with the default settings.
Supported settings for the INI file (default values in red):
"CreateLog" (0 or 1):
Determines if a log will be created or not.
Note: The command line switch "-log" or "-l" overrides the INI setting.
"UseFixedFrameInterval" (0 or 1):
AVSMeter runs a short speed test at the start to determine a suitable frame interval for measurements which increases the accuracy of the results in a number of scenarios. If "UseFixedFrameInterval" is set to "1", the initial speed test of the script is omitted. This can be useful if, for example, AVSMeter is used with a script that produces files like logs, audio files, etc and accurate measurements are not needed.
Note: The command line switch "-f" overrides the INI setting.
"PauseBeforeExit" (0 or 1):
If set to "1", pauses the program at the end and returns to the console prompt only after pressing "ESC".
"FrameRange" (first,last):
Specify the range of frames to be processed. "FrameRange=0,-1" processes all frames in the script. "FrameRange=1500,1999" processes 500 frames starting at frame 1500.
Note: The command line switch "-range" overrides the INI setting.
"InvokeDistributor" (0 or 1):
For users of SEt's Avisynth MT: If set to "1", adds the "Distributor" call internally if the script uses MT Mode 1~4 (via "SetMTMode"). Note: Setting this value to "1" and adding the Distributor call in the script will unnecessarily increase the number of threads which leads to increased memory usage and suboptimal performance. The "InvokeDistributor" setting is ignored when using non-MT versions of Avisynth.
"AllowOnlyOneInstance" (0 or 1):
When set to "1", only one instance of AVSMeter can run at the same time.
"UseColor" (0 or 1):
When set to "0", coloring of the console output is disabled.
"MonitorGPULoad" (0 or 1):
When set to "1", enables display of the GPU usage which of course is only useful if a filter that uses the GPU is in the chain. AVSMeter uses GPU-Z to access the GPU sensors through a shared memory space. GPU-Z has to be running (the window can be minimized to the system tray) before running AVSMeter.
Note: The command line switch "-gpu" overrides the INI setting.
"ReadTimeout" (10 to 3600):
In some rare cases, Avisynth gets stuck on reading a single frame, mostly the first frame due to an extremely slow script, buggy plugin, etc. There is now a configurable timeout for these cases in AVSMeter.ini:
"ReadTimeout=120" sets the timeout to 120 seconds which is also the default. Once the configured time has expired, AVSMeter will terminate. Values from 10 to 3600 seconds are allowed.
Note: The command line switch "-timeout" overrides the INI setting.