-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix] filter: add args modify #2304
[fix] filter: add args modify #2304
Conversation
We can already change the value of each of those arguments. Could you give a concrete example of why this is needed? |
Ah, I see, you need to set different inputs/outputs differently. What about making imageWidth, imageHeight, and pixelFormat into array properties instead? |
Yes, I need to add a foreground image to the background video, but I found that the size of the foreground image is the same as the original video when outputting it.
|
I didn't quite understand, do you mean you need to replace the current object array with a pojo array? Or do you need to modify the imageWidth, imageHeight, and pixelFormat properties in the filter to array? |
I was thinking of modifying existing properties, but this gets ugly. I think we could simply add a couple of new properties to FrameFilter.java like: String[] videoFilterArgs = null;
String[] audioFilterArgs = null; I don't think we need callbacks? |
Okay, I got it. Before starting, if these two parameters are set, all input arg strings for video or audio are allowed to be customized by the user. Otherwise, the previous template will be used for filling. Do I understand correctly? If there is no problem, I will modify it according to this. |
@saudet Thanks for the suggestion. I have already pushed a version and implemented it using properties.Please help me take a look, thank you. |
Thanks! That looks alright, but is it OK for your needs? |
Yes, it meets my needs very well. |
Recently, I created an overlay filter and found that the size of each input and pixelFormat cannot be customized, resulting in incorrect output video. Therefore, I added the following code, which can be modified after the original configuration is generated.