From 7a879cce3793a1314ce50cef4b75671f5e0c0219 Mon Sep 17 00:00:00 2001 From: Ting Fu Date: Fri, 14 May 2021 16:47:02 +0800 Subject: libavfilter: vf_drawtext filter support draw text with detection bounding boxes in side_data This feature can be used with dnn detection by setting vf_drawtext's option text_source=side_data_detection_bboxes, for example: ./ffmpeg -i face.jpeg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:\ input=data:output=detection_out:labels=face-detection-adas-0001.label,drawbox=box_source= side_data_detection_bboxes,drawtext=text_source=side_data_detection_bboxes:fontcolor=green:\ fontsize=40, -y face_detect.jpeg Please note, the default fontsize of vf_drawtext is 12, which may be too small to be seen clearly. Signed-off-by: Ting Fu --- doc/filters.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/filters.texi b/doc/filters.texi index adb9d068e9..78faf767cf 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -10788,6 +10788,14 @@ parameter @var{text}. If both @var{text} and @var{textfile} are specified, an error is thrown. +@item text_source +Text source should be set as side_data_detection_bboxes if you want to use text data in +detection bboxes of side data. + +If text source is set, @var{text} and @var{textfile} will be ignored and still use +text data in detection bboxes of side data. So please do not use this parameter +if you are not sure about the text source. + @item reload If set to 1, the @var{textfile} will be reloaded before each frame. Be sure to update it atomically, or it may be read partially, or even fail. -- cgit v1.2.3