summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-05 23:19:56 +0100
committerwm4 <wm4@nowhere>2016-02-05 23:19:56 +0100
commitc0de087ba191a4daf3a152e0ab09b5687fab8449 (patch)
treeb00043c5e4055ef777a0afdba6b4a321e87864de /DOCS/man
parent45345d9c41f1491e9809153dc3b3950fba560d89 (diff)
downloadmpv-c0de087ba191a4daf3a152e0ab09b5687fab8449.tar.bz2
mpv-c0de087ba191a4daf3a152e0ab09b5687fab8449.tar.xz
player: add complex filter graph support
See --lavfi-complex option. This is still quite rough. There's no support for dynamic configuration of any kind. There are probably corner cases where playback might freeze or burn 100% CPU (due to dataflow problems when interaction with libavfilter). Future possible plans might include: - freely switch tracks by providing some sort of default track graph label - automatically enabling audio visualization - automatically mix audio or stack video when multiple tracks are selected at once (similar to how multiple sub tracks can be selected)
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/options.rst44
1 files changed, 43 insertions, 1 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index dc4d6ed3e0..97f84c6219 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -1396,7 +1396,7 @@ Subtitles
.. admonition:: Warning
Enabling hinting can lead to mispositioned text (in situations it's
- supposed to match up with video background), or reduce the smoothness
+ supposed to match up video background), or reduce the smoothness
of animations with some badly authored ASS scripts. It is recommended
to not use this option, unless really needed.
@@ -3553,3 +3553,45 @@ Miscellaneous
Force the contents of the ``media-title`` property to this value. Useful
for scripts which want to set a title, without overriding the user's
setting in ``--title``.
+
+``--lavfi-complex=<string>``
+ Set a "complex" libavfilter filter, which means a single filter graph can
+ take input from multiple source audio and video tracks. The graph can result
+ in a single audio or video output (or both).
+
+ Currently, the filter graph labels are used to select the participating
+ input tracks and audio/video output. The following rules apply:
+
+ - A label of the form ``aidN`` selects audio track N as input (e.g.
+ ``aid1``).
+ - A label of the form ``vidN`` selects video track N as input.
+ - A label named ``ao`` will be connected to the audio input.
+ - A label named ``vo`` will be connected to the video output.
+
+ Each label can be used only once. If you want to use e.g. an audio stream
+ for multiple filters, you need to use the ``asplit`` filter. Multiple
+ video or audio outputs are not possible, but you can use filters to merge
+ them into one.
+
+ The complex filter can not be changed yet during playback. It's also not
+ possible to change the tracks connected to the filter at runtime. Other
+ tracks, as long as they're not connected to the filter, and the
+ corresponding output is not connected to the filter, can still be freely
+ changed.
+
+ .. admonition:: Examples
+
+ - ``--lavfi-complex='[aid1] asplit [ao] [t] ; [t] aphasemeter [vo]'``
+ Play audio track 1, and visualize it as video using the ``aphasemeter``
+ filter.
+ - ``--lavfi-complex='[vid1] [vid2] vstack [vo]'``
+ Stack video track 1 and 2 and play them at the same time. Note that
+ both tracks need to have the same width, or filter initialization
+ will fail (you can add ``scale`` filters before the ``vstack`` filter
+ to fix the size).
+ - ``--lavfi-complex='[aid1] asplit [ao] [t] ; [t] aphasemeter [t2] ; [vid1] [t2] overlay [vo]'``
+ Play audio track 1, and overlay its visualization over video track 1.
+
+ See the Ffmpeg libavfilter documentation for details on the filter.
+
+