Thanks for your kind reply. In my scenario, a user may randomly try to
apply a filter to an opened video. If the filter is SR, it means that the
user needs better resolution of the video (not just linear interpolation).
The decision is on the fly, and the SR filter should receive the original
size of the video frame as input, rather than a resized one (produced by a
default producer with the normalize filter). And after manual job is done,
the user may export the result video in arbitrary resolution.

I have just managed to hack a temporal solution for my problem, that is to
directly communicate between my SR filter and consumer_avformat.c so that
my SR filter knows what resolution to export and then resizes the frame to
the video exporting size inside the filter. This solution works, but the
logic is ugly and requires more work to generalize.

Brian Matherly <brian.mathe...@yahoo.com> 于2022年5月3日周二 10:04写道:

> I think you will need to give more information about what you are trying
> to accomplish. I do not understand why you would make a filter to double
> the dimensions of the image.
>
> In MLT, the consumer expects to receive the image size that it has
> requested. The producer has normalize filters (like resize) to ensure that
> happens. If you want your consumer to receive a different size image, then
> you should configure your consumer to request that size.
>
> On Monday, May 2, 2022, 05:43:49 AM CDT, Michael Ren <
> renpeira...@gmail.com> wrote:
>
>
> Hey, MLT guys
>
> I have added a video SR filter (super-resolution) to MLT, and use it in
> Shotcut. However, the filter does not work very well. The problem is that
> the profile width/height from source video (e.g. iw, ih) is different from
> the frame size after the SR filter processing (e.g. 2*iw, 2*ih), and also
> the exported video can have another size. As a result, the exported video
> can be part of the frame generated by my SR filter, if the exported video
> size is set to be smaller than 2*iw, 2*ih.
>
> I code the SR filter, referring to the
> mlt\src\modules\core\filter_resize.c. Should I move to another reference or
> should I set some frame property to let the MLT know that the frame size
> has been changed by my filter?
>
> Thank you very much!
> Best regards
> _______________________________________________
> Mlt-devel mailing list
> Mlt-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mlt-devel
>
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to