In the avfiltergraph of FFmpeg, it is required that all filters within the graph can obtain a format and successfully negotiate for data flow.


So, is it allowed for the graph to contain filters that cannot obtain a format? Can these filters be ignored during format negotiation, allowing only the filters that can obtain a format to negotiate successfully?


This patch addresses the problem described in this scenario.


For example:


abuff_src@Music                            ---> amix --> abuff_sink   abuff_src@Ring  

 
In the graph above, We support three playback scenarios at the same time:


1. Only abuff_src@Music needs to be played, and abuff_src@Ring has no data. abuff_src@Ring is ignored during negotiation, abuff_src@Music --> amix --> abuff_sink link negotiation is successful, and playback can be performed;


2. Only abuff_src@Ring needs to be played, and abuff_src@Music has no data. abuff_src@Music is ignored during negotiation, abuff_src@ring --> amix --> abuff_sink link negotiation is successful, and playback can be performed;


3. Both abuff_src@Music and abuff_src@Ring need to be played, and all filters are negotiated successfully and mixed playback is performed.





杨亚磊
269032741@qq.com



 




------------------ Original ------------------
From:                                                                                                                        "ffmpeg-devel"                                                                                    <george@nsup.org&gt;;
Date:&nbsp;Tue, Mar 25, 2025 07:28 PM
To:&nbsp;"FFmpeg development discussions and patches"<ffmpeg-devel@ffmpeg.org&gt;;
Cc:&nbsp;"yangyalei"<269032741@qq.com&gt;;
Subject:&nbsp;Re: [FFmpeg-devel] [PATCH] FFMPEG: add graph reconfig capability



yangyalei050 via ffmpeg-devel (HE12025-03-25):
&gt; From: yangyalei <269032741@qq.com&gt;
&gt; 
&gt; 1. Support reuse the graph to play different audio.
&gt; 2. Support config part of the graph.

Please explain what it means. I see a lot of new code, but I have no
idea what triggers it.

Regards,

-- 
&nbsp; Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".