From f569d245ba37898a79e853cb6fbd906dd992b531 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 18 May 2013 11:44:17 +0200 Subject: core: allow changing filter filters at runtime Add the "vf" command, which allows changing the video filter chain at runtime. For example, the 'y' key could be bound to toggle deinterlacing by adding 'y vf toggle yadif' to the input.conf. Reconfiguring the video filter chain normally resets the VO, so that it will be "stuck" until a new video frame is rendered. To mitigate this, a seek to the current position is issued when the filter chain is changed. This is done only if playback is paused, because normal playback will show an actual new frame quickly enough. If vdpau hardware decoding is used, filter insertion (whether it fails or not) will break the video for a while. This is because vo_vdpau resets decoding related things on vo_config(). --- DOCS/man/en/input.rst | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'DOCS') diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst index bd62e65cd6..4acba49169 100644 --- a/DOCS/man/en/input.rst +++ b/DOCS/man/en/input.rst @@ -236,6 +236,37 @@ af_clr Remove all audio filters. (Conversion filters will be re-added automatically if needed.) +vf set|add|toggle|del "filter1=params,filter2,..." + Change video filter chain. + + The first argument decides what happens: + + set + Overwrite the previous filter chain with the new one. + + add + Append the new filter chain to the previous one. + + toggle + Check if the given filter (with the exact parameters) is already + in the video chain. If yes, remove the filter. If no, add the filter. + (If several filters are passed to the command, this is done for + each filter.) + + del + Remove the given filters from the video chain. Unlike in the other + cases, the second parameter is a comma separated list of filter names + or integer indexes. ``0`` would denote the first filter. Negative + indexes start from the last filter, and ``-1`` denotes the last + filter. + + *EXAMPLE for input.conf*: + + - ``a vf set flip`` turn video upside-down on the ``a`` key + - ``b vf set ""`` remove all video filters on ``b`` + - ``c vf toggle lavfi=gradfun`` toggle debanding on ``c`` + + Undocumented commands: tv_start_scan, tv_step_channel, tv_step_norm, tv_step_chanlist, tv_set_channel, tv_last_channel, tv_set_freq, tv_step_freq, tv_set_norm, dvb_set_channel, radio_step_channel, radio_set_channel, -- cgit v1.2.3