diff options
author | exwm <thighsman@protonmail.com> | 2020-06-19 15:58:41 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-06-25 10:27:07 +0200 |
commit | 32d6fe23b66075565894a5432278c95ab479584a (patch) | |
tree | e15f431e1e6ace3688380b64794a5078a293ecd4 /libavutil/color_utils.c | |
parent | bd6ae462f85a6254d38bb8a66452eedd360ce26f (diff) | |
download | ffmpeg-32d6fe23b66075565894a5432278c95ab479584a.tar.gz |
avfilter/zoompan: add in_time variable
Currently, the zoompan filter exposes a 'time' variable (missing from docs) for use in
the 'zoom', 'x', and 'y' expressions. This variable is perhaps better named
'out_time' as it represents the timestamp in seconds of each output frame
produced by zoompan. This patch adds aliases 'out_time' and 'ot' for 'time'.
This patch also adds an 'in_time' (alias 'it') variable that provides access
to the timestamp in seconds of each input frame to the zoompan filter.
This helps to design zoompan filters that depend on the input video timestamps.
For example, it makes it easy to zoom in instantly for only some portion of a video.
Both the 'out_time' and 'in_time' variables have been added in the documentation
for zoompan.
Example usage of 'in_time' in the zoompan filter to zoom in 2x for the
first second of the input video and 1x for the rest:
zoompan=z='if(between(in_time,0,1),2,1):d=1'
V2: Fix zoompan filter documentation stating that the time variable
would be NAN if the input timestamp is unknown.
V3: Add 'it' alias for 'in_time. Add 'out_time' and 'ot' aliases for 'time'.
Minor corrections to zoompan docs.
Signed-off-by: exwm <thighsman@protonmail.com>
Diffstat (limited to 'libavutil/color_utils.c')
0 files changed, 0 insertions, 0 deletions