summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-12 17:51:19 +0200
committerwm4 <wm4@nowhere>2014-04-12 19:31:50 +0200
commit33f822b7154b8035984bd41607c0c2b1edd0c9fa (patch)
tree7392f47dd082c1eb51f29c7fac9c5a62ceda6b04 /DOCS
parent839c3ae64b184ba9d37621507d74cb6052582d0b (diff)
downloadmpv-33f822b7154b8035984bd41607c0c2b1edd0c9fa.tar.bz2
mpv-33f822b7154b8035984bd41607c0c2b1edd0c9fa.tar.xz
video: add VapourSynth filter bridge
Mainly meant to apply simple VapourSynth filters to video at runtime. This has various restrictions, which are listed in the manpage. Additionally, this actually copies video frames when converting frame references from mpv to VapourSynth, and a second time when going from VapourSynth to mpv. This is inefficient and could probably be easily improved. But for now, this is simpler, and in fact I'm not sure if we even can references VapourSynth frames after the core has been destroyed.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/en/vf.rst47
1 files changed, 47 insertions, 0 deletions
diff --git a/DOCS/man/en/vf.rst b/DOCS/man/en/vf.rst
index 6f0e48056f..5cd5d205eb 100644
--- a/DOCS/man/en/vf.rst
+++ b/DOCS/man/en/vf.rst
@@ -845,6 +845,53 @@ Available filters are:
``a3=<string>``
Specify the fourth parameter to pass to the library.
+``vapoursynth=file:maxbuffer``
+ Loads a VapourSynth filter script. This is intended for streamed
+ processing: mpv actually provides a source filter, instead of using a
+ native VapourSynth video source. The mpv source will answer frame
+ requests only within a small window of frames (the size of this window
+ is controlled with the ``maxbuffer`` parameter), and requests outside of
+ that will return errors. As such, you can't use the full power of
+ VapourSynth, but you can use certain filters.
+
+ If you just want to play video generated by a VapourSynth (i.e. using
+ a native VapourSynth video source), it's better to use ``vspipe`` and a
+ FIFO to feed the video to mpv. The same applies if the filter script
+ requires random frame access (see ``maxbuffer`` parameter).
+
+ This filter is experimental. If it turns out that it works well and is
+ used, it will be ported to libavfilter. Otherwise, it will be just removed.
+
+ ``file``
+ Filename of the script source. Currently, this is always a python
+ script. The variable ``video_in`` is set to the mpv video source,
+ and it is expected that the script reads video from it. (Otherwise,
+ mpv will decode no video, and the video packet queue will overflow,
+ eventually leading to audio being stopped.) The script is also
+ expected to pass through timestamps using the ``AbsoluteTime`` frame
+ property.
+
+ .. admonition:: Example:
+
+ ::
+
+ import vapoursynth as vs
+ core = vs.get_core()
+ core.std.AddBorders(video_in, 10, 10, 20, 20).set_output()
+
+ ``maxbuffer``
+ Maximum number of decoded video frames that should be buffered before
+ the filter (default: 5). This specifies the maximum number of frames
+ the script can requests backwards. E.g. if ``maxbuffer=5``, and the
+ script just requested frame 15, it can still request frame 10, but
+ frame 9 is not available anymore. If it requests frame 30, mpv will
+ decode 15 more frames, and keep only frames 25-30.
+
+ (Normally, VapourSynth source filters must provide random access, but
+ mpv was made for playback, and does not provide frame-exact random
+ access. The way this video filter works is a compromise to make simple
+ filters work anyway.)
+
``vavpp``
VA-AP-API video post processing. Works with ``--vo=vaapi`` and ``--vo=opengl``
only. Currently deinterlaces. This filter is automatically inserted if