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
-fixed [-f] Use fixed frame interval for measurements1
-gpu Monitor GPU/VPU usage2
-range=first,last Specify frame range3
-timelimit=n Specify time (sec) after which the process will exit
-priority=n Specify process priority (1:low, 2:normal, 3:high)
-help [-h] Display command line usage
(`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. The switch "-fixed" omits the initial speed test of the script. 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.
(`2`) "-gpu" enables display of the GPU/VPU 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 graphics card sensors through a shared memory space. GPU-Z has to be running (the window can be minimized to the system tray) before running AVSMeter.
(`3`) See "FrameRange" INI setting below.
INI file settings:
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.
"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.