Open Beiri22 opened 3 years ago
The scanf
does match the snprintf
in the source code. Maybe the problem is that your MLT environment is expecting comma for the decimal separator, and the data is using periods. I read that Kdenlive is having some trouble with their change to try to switch the project file to be numeric locale agnostic. What does the first line <mlt ...>
of the MLT XML say?
I will add that it is working fine for me in Shotcut 20.09 with the filter "Normalize: Two Pass".
Locale mismatch is also my first suspicion.
But when running melt
How are you doing that? Command line manually? melt
reads the locale and applies it. So, you may need to run with LC_NUMERIC=C melt ...
The first line reads:
<mlt LC_NUMERIC="C" producer="main_bin" version="6.22.1" root="...">
My system locale is set to de_DE.UTF_8
Adding the "LC_NUMERIC=C" to the command line works; But why does melt not use the locale setting of the "first line" when available?
MLT is modular such that melt
does know anything about XML; only the dynamically-loaded xml
module does. Since melt does much more than process XML it loads the system locale early to support numeric locale for command line options. The mlt_properties
API in conjunction with the XML module normally does support the locale specified in the XML. However, this filter is using a formatted string and doing its own numeric parsing outside the mlt_properties
API.
setlocale()
by default and add a command line option to do it for backwards compatibility. Now that both Shotcut and Kdenlive are using MLT and melt in a locale agnostic manner this seems likely to happen soon.sscanf_l()
to parse this string, but that is not available in glibc, and the code would have to repeat the ugly platform-specific patterns seen in mlt_properties.c
and mlt_property.c
.filter_avformat.c
for the lut3d
filter.another (huge) hack is to just check LC_NUMERIC and replace all instances of ,
with .
. :-)
probably going to break other stuff, though.
I am rendering a kdenlive-project that uses the 2-pass loudness-filter. I did all the analysis steps so that the mlt-file contains the analysis result. But when running melt, I get hundrets of those error messages:
I have looked up the filter source and found a sscanf-directive. As far as I understand, the input should match, but it obviously doesn't.
Name : kdenlive Version : 20.08.2-1
Name : mlt Version : 6.22.1-4