AVSMeter


AVSMeter is a CLI (command line interface) tool which measures the speed/efficiency of Avisynth scripts and checks if Avisynth and its plugin sub-system are set up and working correctly.

Features:







Command line usage:

AVSMeter script.avs [switches] or AVSMeter -avsinfo [switches]

Switches:
  -avsinfo            Displays extended Avisynth info
  -info   [-i]        Displays clip info
  -log    [-l]        Creates log file
  -csv                Creates csv file
  -gpu                Displays GPU/VPU usage (requires GPU-Z)
  -range=first,last   Sets frame range
  -timelimit=n        Sets time limit (seconds)
  -hp                 Sets process priority to high
  -o                  Omits script pre-scanning
  -lf                 Adds internal/external functions to the avsinfo*.log file
  -p                  Pauses the program at the end and returns after pressing a key.



"-avsinfo"
Displays extended info about the installed Avisynth version and the plugin sub-system. If a custom avisynth.dll is specified in the ini file, info about that file will be displayed. The "avsinfo" command can be combined with "-log" in order to save the info to a log file. The log file contains additional info about OS/hardware, a list of DLL dependencies for avisynth.dll and all auto-load plugins and optionally ("-lf") a list of internal/external Avisynth functions.

"-lf"
In combination with "avsinfo", this switch adds a list of internal/external functions to the log file.

"-log"
Creates a log file with various details about the installed Avisynth version, clip info, runtime results, a copy of the script and a performance data table with the measured details about each frame/frame interval.
Note: The numbering of the frames in the performance data section is not zero-based, i.e. the first frame is 1, not 0.

"-csv"
Creates a CSV file containing the performance data formatted as comma-separated values for direct import in Excel or a similar spread sheet program (OpenOffice, LibreOffice).
Note: The numbering of the frames in the .csv file is not zero-based, i.e. the first frame is 1, not 0.

"-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.

"-range=first,last"
Specify the range of frames to be processed. For example, "-range=1500,1999" processes 500 frames starting at frame 1500. Without "-range" AVSMeter processes all frames of the script.

"-timelimit=n"
Specify a time limit (in seconds) after which the program stops reading frames and terminates.

"-o"
AVSMeter runs a quick test on a few frames at the start in order to measure the frames/second that Avisynth returns for a given script. The result is used to determine a suitable interval for measuring CPU/GPU/memory usage and minimizing the overhead of these measurements.
When "-o" is used, that test will be omitted. This can be useful if, for example, AVSMeter is used with a script that writes a sequence of images where the speed test is irrelevant.
For normal operation, e.g. testing the speed of a script, this switch should not be used, otherwise the accuracy of the FPS/TPF measurements will be reduced, particularly for fast scripts.




INI file settings
AVSMeter checks if a settings file ("AVSMeter.ini" / "AVSMeter64.ini") exists in the directory from where it is started. If not, it will be created with the default settings.
Note: If applicable, command line switches override INI settings.

Supported settings for the INI file (default values in red):

"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.

"PauseBeforeExit" (0 or 1):
If set to "1", pauses the program at the end and returns after pressing a key.

"AVSDLL"
The user can specify the avisynth.dll to be used. This has to be a fully qualified path, for example "AVSDLL=d:\apps\avisynth\avisynth.dll" (without the quotes). The default is an empty string which means that AVSMeter will attempt to load avisynth.dll through the standard Windows search hierarchy.

"LogDirectory"

The user can specify a directory in which all log files are stored. This has to be a fully qualified
path, for example "LogDirectory=c:\LogFiles" (without the quotes). The default is an empty string
which means that all log files are stored in the script directory or, in case the "avsinfo"
command was used, the current (working) directory.
Note: This setting is ignored if "LogUseFileSaveDialog" is set to "1".

"LogFileDateTimeSuffix" (0 or 1):
If set to "1", adds a date/time suffix to all .log and .csv files.

"DisableFFTWDLLWarning" (0 or 1):
If set to "1", warnings about missing FFTW DLLs ("libfftw3f-3.dll" / "fftw3.dll") will be suppressed.

"AllowOnlyOneInstance" (0 or 1):

If set to "1", only one instance of AVSMeter can be started.

"InvokeDistributor" (0 or 1):
For users of SEt's Avisynth MT: If set to "1", adds the "Distributor" call internally if the script uses one of the MT Modes 1~4.

"ConUseSTDOUT" (0 or 1):
If set to "1", directs all console output to stdout. The default setting "0" uses stderr except the "command line usage" message which always goes to stdout.

"UseColor" (0 or 1):
If set to "0", coloring of the console output is disabled.