[FFmpeg-user] How to change overlay parameter at runtime

Michael Koch astroelectronic at t-online.de
Fri Mar 27 11:54:42 EET 2020


Am 27.03.2020 um 10:40 schrieb Paul B Mahol:
> On 3/27/20, Michael Koch <astroelectronic at t-online.de> wrote:
>> Am 27.03.2020 um 10:29 schrieb Paul B Mahol:
>>> On 3/27/20, Michael Koch <astroelectronic at t-online.de> wrote:
>>>> Am 27.03.2020 um 10:10 schrieb Paul B Mahol:
>>>>> On 3/27/20, foxtail mega <foxtailmegadeveloper at gmail.com> wrote:
>>>>>> Actually I meant when ffmpeg is running, I want to send parameters to
>>>>>> that
>>>>>> running ffmpeg instance and that should change the filter_complex
>>>>>> overlay
>>>>>> parameters in the next frame of processing.
>>>>>>
>>>>>> Using expression is like hard coding parameters into ffmpeg command. I
>>>>>> need
>>>>>> something where I can send the variable parameters when I need it
>>>>>> without
>>>>>> stopping the current running ffmpeg command.
>>>>> Please stop top posting.
>>>>>
>>>>> There is sendcmd filter for this, but I think overlay filter does not
>>>>> support commands,
>>>>> but that could be easily fixed.
>>>> The overlay filter does already support commands. There is an example in
>>>> chapter 2.61 of my book:
>>>> http://www.astro-electronic.de/FFmpeg_Book.pdf
>>>>
>>>> But I think the question was if the parameters can be changed in
>>>> real-time while ffmpeg is running. I don't know if this is possible.
>>>>
>>> Look at realtime filter.
>> That's not what the OP wanted. He wrote:
>>
>> "Actually I meant when ffmpeg is running, I want to send parameters to that
>> running ffmpeg instance and that should change the filter_complex overlay
>> parameters in the next frame of processing.
>>
>> Using expression is like hard coding parameters into ffmpeg command. I need
>> something where I can send the variable parameters when I need it without
>> stopping the current running ffmpeg command."
> Exactly and realtime filter allows exactly that in combination with
> filters that send commands, there are at least 2 such filters for
> video.

To the OP: Please clarify where the information (x,y for overlay filter) 
comes from.
If I understood the question right, the coordinates are unknown when 
FFmpeg is started and come from somewhere else while FFmpeg is running. 
He needs a filter that receives commands from outside of FFmpeg.

Michael



More information about the ffmpeg-user mailing list