summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-01-19 13:54:44 +0100
committerAnton Khirnov <anton@khirnov.net>2023-02-12 10:34:45 +0100
commit78f46065d861eb8487124e92ab46a459426eb89c (patch)
treeb2c6c65d74599675d9de58316161f6c998f565a0 /doc
parentf17051eaae278c6683492c037e5a1658ace64bec (diff)
downloadffmpeg-78f46065d861eb8487124e92ab46a459426eb89c.tar.gz
fftools/ffmpeg: add special syntax for loading filter options from files
Many filters accept user-provided data that is cumbersome to provide as text strings - e.g. binary files or very long text. For that reason such filters typically provide a option whose value is the path from which the filter loads the actual data. However, filters doing their own IO internally is a layering violation that the callers may not expect, and is thus best avoided. With the recently introduced graph segment parsing API, loading option values from files can now be handled by the caller. This commit makes use of the new API in ffmpeg CLI. Any option name in the filtergraph syntax can now be prefixed with a slash '/'. This will cause ffmpeg to interpret the value as the path to load the actual value from.
Diffstat (limited to 'doc')
-rw-r--r--doc/filters.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 4d1eae73a6..a4e235d2af 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -171,6 +171,17 @@ within the quoted text; otherwise the argument string is considered
terminated when the next special character (belonging to the set
@samp{[]=;,}) is encountered.
+A special syntax implemented in the @command{ffmpeg} CLI tool allows loading
+option values from files. This is done be prepending a slash '/' to the option
+name, then the supplied value is interpreted as a path from which the actual
+value is loaded. E.g.
+@example
+ffmpeg -i <INPUT> -vf drawtext=/text=/tmp/some_text <OUTPUT>
+@end example
+will load the text to be drawn from @file{/tmp/some_text}. API users wishing to
+implement a similar feature should use the @code{avfilter_graph_segment_*()}
+functions together with custom IO code.
+
The name and arguments of the filter are optionally preceded and
followed by a list of link labels.
A link label allows one to name a link and associate it to a filter output