mlt failing after upgrade to fedora 36

121 views Asked by At

Since upgrading my PC from Fedora 35 to Fedora 36, kdenlive has failed to render. I traced the problem to mlt-melt.

$ mlt-melt export.mlt
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
[consumer avformat] error with audio encode: -22 (frame 1)
[consumer avformat] error with audio encode: -22 (frame 11)
[consumer avformat] error with audio encode: -22 (frame 21)
Current Position:         20
$ mlt-melt --version
mlt-melt 7.4.0
...

$ dnf list mlt\*
...
Installed Packages
mlt.x86_64                                                                          7.4.0-3.fc36                                                                     @fedora        
mlt-freeworld.x86_64                                                                7.4.0-1.fc36                                                                     @rpmfusion-free
...

The exact same mlt file (which I generated on kdenlive 22.04.0 on F36) works fine on Fedora 35, which has mlt-melt 6.26.1 installed. I didn't see any instructions that additional steps were needed to make mlt work on F36. I get the same "audo encode -22" errors if I pull a working .mlt file from F35 to F36.

Any thoughts or suggestions? I cannot roll back to F35. I need a go-forward solution. Thanks.

1

There are 1 answers

2
Brian On

Error code -22 maps to the posix error EINVAL (Invalid argument). THis is the code FFMpeg is returning from the MLT call to avcodec_receive_packet(). https://github.com/mltframework/mlt/blob/0e0e526124f4392275bdeb2510e8fb086d23da8f/src/modules/avformat/consumer_avformat.c#L1376

If you trace the code in FFMpeg, there are any number of places that EINVAL is returned: https://ffmpeg.org/doxygen/trunk/encode_8c_source.html#l00391

I think the most likely is that your FFMpeg does not have the codec you are trying to use - but you say it works when you use FFMpeg directly. Unless MLT is not finding the same FFMpeg that you are testing with. A good way to see if MLT is finding the codecs you want is to run:

melt -query audio_codecs

But that is just a guess. Maybe EINVAL error code is caused by a different problem.

As for other ideas... Well, you could use the AppImage or Flatpack provided by the developers themselves: https://kdenlive.org/en/download/