I am customizing now OpenShot to change brightness of video. I already figured out that I need to add sws_getColorspaceDetails / sws_setColorspaceDetails​ functions to convert_image() of producer_avformat.
But I am wondering how to access producer_avformat object from the python code to pass brightness as parameters.
In Python code producer are created here: self.p = mlt.Producer( self.profile, 'xml:%s' % self.file_name)
But it is another producer.
Regards
Do not modify the producer to change the brightness. Rather, you should attach a filter to the producer.
This one would work: https://www.mltframework.org/bin/view/MLT/FilterBrightness
I see from your example that your producer is not an instance of producer_avformat. Your producer is a producer_xml. I assume that you are loading an MLT xml file that has an avformat producer defined inside of it. In that case, it would be easy to modify the xml to attach a brightness filter to the avformat producer.