From bc6959c35d4a421c920e1d7ce22fb9f339a9a8fb Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 14 May 2014 20:41:31 +0200 Subject: vf_vapoursynth: allow parallel processing VapourSynth won't just filter multiple frames at once on its own. You have to request multiple frames at once manually. This is what this commit introduces: a sub-option controls how many frames will be requested at once. This also changes the semantics of the maxbuffer sub- option, now renamed to buffered-frames. --- DOCS/man/en/vf.rst | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'DOCS/man') diff --git a/DOCS/man/en/vf.rst b/DOCS/man/en/vf.rst index f3701f04f9..7c5c3a0893 100644 --- a/DOCS/man/en/vf.rst +++ b/DOCS/man/en/vf.rst @@ -840,19 +840,19 @@ Available filters are: ``a3=`` Specify the fourth parameter to pass to the library. -``vapoursynth=file:maxbuffer`` +``vapoursynth=file:buffered-frames:concurrent-frames`` 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 + is controlled with the ``buffered-frames`` 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). + requires random frame access (see ``buffered-frames`` 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. @@ -879,19 +879,31 @@ Available filters are: The script will be reloaded on every seek. This is done to reset the filter properly on discontinuities. - ``maxbuffer`` + ``buffered-frames`` 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 + the filter (default: 4). This specifies the maximum number of frames + the script can requests backwards. E.g. if ``buffered-frames=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. + The actual number of buffered frames also depends on the value of the + ``concurrent-frames`` option. Currently, both option values are + multiplied to get the final buffer size. + (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.) + ``concurrent-frames`` + Number of frames that should be requested in parallel (default: 2). The + level of concurrency depends on the filter and how quickly mpv can + decode video to feed the filter. This value should probably be + proportional to the number of cores on your machine. Most time, + making it higher than the number of cores can actually make it + slower. + ``vavpp`` VA-AP-API video post processing. Works with ``--vo=vaapi`` and ``--vo=opengl`` only. Currently deinterlaces. This filter is automatically inserted if -- cgit v1.2.3