You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DirectShow filters that put AviSynth or VapourSynth into video playing, by loading a script and feed the generated frames to video player.
Each filter takes video samples from upstream, feeds them to the frame server in compatible format, and delivers the transformed output frames to downstream.
If you used ffdshow's AviSynth plugin before, you may find these filters similar in many ways. On top of that, our filters are actively adding new features.
In case you have to stay at VapourSynth version R43 (API version 3.5) through R55, use v1.2.1.
Note: It is highly recommended to use open sourced video demuxers and decoders such as LAV Filters in your player of choice.
Install
Before anything, install AviSynth+ or VapourSynth. Make sure the frame server's dll files are reachable either in the directory of the video player, system directories or directories from the PATH environment variable.
Unpack the archive.
Run install.cmd to register the filter .ax files.
Enable AviSynth Filter or VapourSynth Filter in video player.
Uninstall
Run uninstall.cmd to unregister the filters and clean up user data.
An Zhuang
Shou Xian An Zhuang AviSynth+ Huo Zhe VapourSynth. Que Bao Ta Men Dong Tai Lian Jie Ku Zhi Yu Bo Fang Qi De Mu Lu Xia ,Xi Tong Mu Lu Xia ,Huo Zhe PATH Huan Jing Bian Liang Zhong .
Jie Kai Xia Zai De Ya Suo Bao .
Yun Xing install.cmd Zhu Ce Guo Lu Qi .
Zai Bo Fang Qi Zhong Qi Yong AviSynth Filter Huo Zhe VapourSynth Filter Guo Lu Qi .
Xie Zai
Yun Xing uninstall.cmd Shan Chu Zhu Ce Xin Xi He Yong Hu Xin Xi .
Example scripts
Add a line of text to videos with less than 20 FPS. Otherwise disconnect the filter.
AviSynth
AvsFilterSource()
fps = Round(FrameRate()) if (fps < 20) { Subtitle("This video has low FPS") Prefetch(4) } else { AvsFilterDisconnect() }
VapourSynth
from vapoursynth import core import math
fps = round(VpsFilterSource.fps) if fps < 20: core.text.Text(VpsFilterSource, 'This video has low FPS').set_output() else: VpsFilterDisconnect = True
Usage
Common
By default, 10-bit and 16-bit input formats are enabled for best video quality. However, not all video renderers are capable of processing these data. If you do not have such a video renderer installed, leaving these options on might cause compatibility issues. In that case, you should open the settings page of the filter and untick the relevant checkboxes.
The filter exposes the following functions to the AviSynth script:
AvsFilterSource()
The source function which returns an IClip object. Similar to other source functions like AviSource().
This function takes no argument.
AvsFilterDisconnect()
This function serves as a heuristic to disconnect the filter itself from DirectShow filter graph. Put at the end of the script file.
It can be used to avoid unnecessary processing and improve performance if the script does not modify the source. Avoid to use it during live reloading.
A good example is if your script applies modifications based on video metadata (e.g. FPS < 30), without using this function, even if the condition does not hold the filter still needs to copy every frame. At best, it wastes both CPU and memory resource for nothing. At worst, it breaks hardware acceleration chain for certain filters. For instance, when LAV Filters connects directly to madVR in D3D11 mode, the GPU decoded frames are not copied to memory. If any filter goes between them, the frame needs to be copied.
This function takes no argument.
AvsFilterGetSourcePath()
Returns the path to the source video file.
This function takes no argument.
VapourSynth
The filter exposes the following variables to the VapourSynth Python script:
VpsFilterSource
This variable has the type of VideoNode. It serves as the source clip.
Note that the fps property of the video node is set to the average framerate instead of 0 / 1, regardless if frames have variable frame durations. It is equivalent to mpv's container_fps variable.
VpsFilterDisconnect
This variable does not exist at the entry of the script. Upon return, if this variable exists and has an non-zero value, it disconnects the filter itself from DirectShow filter graph.
VpsFilterSourcePath
Represents the path to the source video file.
API and Remote Control
Since version 0.6.0, these filters allow other programs to remotely control it via API. By default the functionality is disabled and can be activated from settings (requires restarting the video player after changing).
For details of the API, please refer to the comments in source file api.h.
Build
A script build.ps1 is included to automate the build process. It obtains dependencies and starts compilation. Before running build.ps1, make sure you have the latest Visual Studio and git installed. When running the script, pass the target configuration and platform as arguments, e.g. build.ps1 -configuration Debug -platform x64 or build.ps1 -configuration Release -platform x86.