[FFmpeg-user] Change filters in runtime

Alexander Strasser eclipse7 at gmx.net
Mon Aug 12 01:20:18 EEST 2019


Hi,

On 2019-08-07 15:07 -0300, Music Br wrote:
> I need to change an overlay image on the video and resize the video while
> running ffmpeg. It is possible? If so, how to proceed?

while ffmpeg doesn't support changing the filter graph, the
behaviour of some filters can be changed at runtime. If you
look at the documentation of the filters some have a section
named commands.

There are basically 3 ways to send commands when running ffmpeg:

1. interactively (press ? while ffmpeg is running, you should
   spot the two entries related to sending commands to filters)
2. sendcmd filter
3. zeromq (see documentation of the zmq filter)

Number 3 would the best fit for your use case I guess.

To be honest I think not enough filters support commands sufficiently
to make most use cases possible. From a quick glance the use case you
described seems not possible with current ffmpeg.

If you can't contribute to ffmpeg development, I fear that filter
commands won't work out for you.

So looking for another software that supports your use case out
of the box (possibly letting you use FFmpeg for the encoding)
might be more promising for quick success.

No idea in particular though, I don't have such a use case myself
and can't recommend any software. Also your description was a bit
terse and therefore some of my assumptions may be plain wrong. I'm
mostly only answering because I think the feature of sending commands
down the filter graph isn't widely known.


  Alexander


More information about the ffmpeg-user mailing list