[FFmpeg-devel] [PATCH] Fixing scale2ref filter in case if reference frame is hw frame
Alex
3.14pi at ukr.net
Mon Nov 2 13:30:52 EET 2020
This path fixing scale2ref filter if reference frame is HW frame.Command for add watermark (resize it based on the main/reference video size: [watermark][scaled]scale2ref=oh*mdar:ih*0.5[watermark2][scaled2] ) on video in case of HW pipeline:>./ffmpeg -init_hw_device cuda=cuda -hwaccel cuda -hwaccel_output_format cuda -filter_hw_device cuda -i input -t 60 -filter_complex scale_npp=1920:1080:format=yuv420p[scaled],movie=/media/converter/watermark/watermark_ai.png,format=yuva420p[watermark],[watermark][scaled]scale2ref=oh*mdar:ih*0.5[watermark2][scaled2],[watermark2]hwupload[watermark_hw],[scaled2][watermark_hw]overlay_cuda=x=0:y=0 -c:v h264_nvenc -an -y out.mp4
Command for add watermark on video in case of SW pipeline:>./ffmpeg -i input.mp4 -t 60 -filter_complex scale=1920:1080,format=yuv420p[scaled],movie=/media/converter/watermark/watermark_ai.png,format=yuva420p[watermark],[watermark][scaled]scale2ref=oh*mdar:ih*0.5[watermark2][scaled2],[scaled2][watermark2]overlay=x=0:y=0 -c:v h264 -an -y out.mp4
Signed-off-by: alex_qt <3.14pi at ukr.net>
---
libavfilter/vf_scale.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixing-scale2ref-filter-in-case-if-reference-frame-i.patch
Type: application/x-patch
Size: 536 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201102/4b6c3141/attachment.bin>
More information about the ffmpeg-devel
mailing list