summaryrefslogtreecommitdiff
path: root/doc/filters.texi
diff options
context:
space:
mode:
authorXinpeng Sun <xinpeng.sun@intel.com>2021-11-22 15:53:50 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-01-17 16:32:17 +0800
commit516496069d9a0398cc760d7e6a4d17ac168045e6 (patch)
treed1d79df57bd6f7075ca0d94f8f0dbc84e6e55e49 /doc/filters.texi
parentdcc9454ab914f9532ddb7f06a2f756ed472a1a85 (diff)
avfilter: add overlay vaapi filter
Overlay one video on the top of another. It takes two inputs and has one output. The first input is the "main" video on which the second input is overlaid. This filter requires same memory layout for all the inputs. An example command to use this filter to overlay overlay.mp4 at the top-left corner of the main.mp4: ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 \ -hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i main.mp4 \ -hwaccel vaapi -hwaccel_device foo -hwaccel_output_format vaapi -c:v h264 -i overlay.mp4 \ -filter_complex "[0:v][1:v]overlay_vaapi=0:0:100:100:0.5[t1]" \ -map "[t1]" -an -c:v h264_vaapi -y out_vaapi.mp4 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com> Signed-off-by: Zachary Zhou <zachary.zhou@intel.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'doc/filters.texi')
-rw-r--r--doc/filters.texi51
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 05d4b1a56e..248c09caf8 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -24798,6 +24798,57 @@ To enable compilation of these filters you need to configure FFmpeg with
To use vaapi filters, you need to setup the vaapi device correctly. For more information, please read @url{https://trac.ffmpeg.org/wiki/Hardware/VAAPI}
+@section overlay_vaapi
+
+Overlay one video on the top of another.
+
+It takes two inputs and has one output. The first input is the "main" video on which the second input is overlaid.
+This filter requires same memory layout for all the inputs. So, format conversion may be needed.
+
+The filter accepts the following options:
+
+@table @option
+
+@item x
+Set the x coordinate of the overlaid video on the main video.
+Default value is @code{0}.
+
+@item y
+Set the y coordinate of the overlaid video on the main video.
+Default value is @code{0}.
+
+@item w
+Set the width of the overlaid video on the main video.
+Default value is the width of input overlay video.
+
+@item h
+Set the height of the overlaid video on the main video.
+Default value is the height of input overlay video.
+
+@item alpha
+Set blocking detection thresholds. Allowed range is 0.0 to 1.0, it
+requires an input video with alpha channel.
+Default value is @code{0.0}.
+
+@end table
+
+@subsection Examples
+
+@itemize
+@item
+Overlay an image LOGO at the top-left corner of the INPUT video. Both inputs for this filter are yuv420p format.
+@example
+-i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuv420p, hwupload[b], [a][b]overlay_vaapi" OUTPUT
+@end example
+@item
+Overlay an image LOGO at the offset (200, 100) from the top-left corner of the INPUT video.
+The inputs have same memory layout for color channels, the overlay has additional alpha plane, like INPUT is yuv420p, and the LOGO is yuva420p.
+@example
+-i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_vaapi=x=200:y=100:w=400:h=300:alpha=1.0, hwdownload, format=nv12" OUTPUT
+@end example
+
+@end itemize
+
@section tonemap_vaapi
Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion with tone-mapping.