"f=mkv" or "f=matroska" produces MP4 file output
Summary
MLT is very sensitive to the order of the attributes.
Kdenlive is using the Qt QDomDocument
type to represent an XML DOM in-memory while building the MLT script. It turns out that between Qt4 and Qt5, this DOM representation got reworked, and the Qt5 version uses a hash table to store attributes. In addition, for security reasons, the hash provider is salted with a unique seed on each run. So, with QDomDocument
, it is flat-out impossible to have any control over the order of attributes. Simply loading an XML document and re-saving it will scramble all the attributes in the file.
I believe Kdenlive's render widget will have to be reworked to use a different XML library.
STEPS TO REPRODUCE
- Create a custom render format definition with parameters such as:
properties=x264-medium f=mkv vcodec=libx264 acodec=flac g=120 crf=9 global_quality=500 me_method=umh
In my testing, any valid set of parameters that specify "f=mkv" trigger the bug. - Render all or part of the timeline.
OBSERVED RESULT
The output file has MP4 format according to tools like "ffprobe".
EXPECTED RESULT
The output file has Matroska (MKV) format.
ADDITIONAL INFORMATION
See here: https://bugs.kde.org/show_bug.cgi?id=411260
The MLT bug file: https://github.com/mltframework/mlt/issues/477