[FFmpeg-devel] [PATCH];avfilter/overlay_cuda:;add;runtime;command;support;for;x/y;
Hi, this patch adds runtime command support for the CUDA overlay filter overlay_cuda, so that the x/y overlay position can be changed at runtime without recreating the filter graph. In particular: - mark the "x" and "y" options as AV_OPT_FLAG_RUNTIME_PARAM, so they can be updated via process_command(); - implement overlay_cuda_process_command() to re-parse the expression for "x" or "y" when receiving a "x" or "y" command; - keep x_expr / y_expr in sync with runtime changes, so that later reconfiguration continues to use the updated expressions. If parsing of a new expression fails, the old expression is kept and an error is logged, so existing pipelines are not broken. This enables controlling overlay_cuda with sendcmd/zmq, for example: -vf "overlay_cuda@ov0=x=W/4:y=H/4,zmq" echo "overlay_cuda@ov0" x "W/2" | zmqsend echo "overlay_cuda@ov0" y "H/2" | zmqsend Tested with a simple dual-input pipeline using CUDA frames, and verified that changing x/y at runtime updates the overlay position without interrupting the stream. Patch generated against current master. Regards, Wei Minghui (??) 0001-avfilter-overlay_cuda-add-runtime-command-support-for-x-y.patch Description: Binary data ___ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
[FFmpeg-devel] [PATCH] avfilter/scale_npp: add runtime command support
Hi, this patch makes the CUDA-based scaler scale_npp react to runtime commands for width and height, so that the output size can be changed without recreating the filter graph. In particular: - mark the "w" and "h" options as AV_OPT_FLAG_RUNTIME_PARAM; - implement process_command() to re-parse the expression for "w" / "h" when receiving "width"/"w" or "height"/"h" commands; - when the new expression is successfully parsed, the filter is reconfigured on the next frame so the new size takes effect. If parsing fails, the old expression is kept and an error is logged, so existing pipelines are not broken. This enables controlling scale_npp with sendcmd/zmq, for example: -vf "scale_npp@sn0=w=iw:h=ih,zmq" echo "scale_npp@sn0" w iw/2 | zmqsend echo "scale_npp@sn0" h ih/2 | zmqsend Tested with a simple RTSP output and verified that changing width and height at runtime updates the output size without interrupting the stream. Patch generated against current master. Regards, Wei Minghui (??) 0001-avfilter-scale_npp-support-runtime-width-height-commands.patch Description: Binary data ___ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
