自从将我的 PC 从 Fedora 35 升级到 Fedora 36 后,kdenlive 无法渲染。我将问题追溯到 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
...
完全相同的 mlt 文件(我在 F36 上的 kdenlive 22.04.0 上生成)在安装了 mlt-melt 6.26.1 的 Fedora 35 上运行良好。我没有看到任何说明需要额外的步骤才能使 mlt 在 F36 上工作。如果我将工作中的 .mlt 文件从 F35 拉到 F36,我会得到相同的“audo encode -22”错误。
有什么想法或建议吗?我无法回滚到 F35。我需要一个前进的解决方案。谢谢。
回答1
错误代码 -22 映射到 posix 错误 EINVAL(无效参数)。这是 FFMpeg 从 MLT 调用返回到 avcodec_receive_packet() 的代码。 https://github.com/mltframework/mlt/blob/0e0e526124f4392275bdeb2510e8fb086d23da8f/src/modules/avformat/consumer_avformat.c#L1376
如果您在 FFMpeg 中跟踪代码,则返回 EINVAL 的位置有很多:https://ffmpeg.org/doxygen/trunk/encode_8c_source.html#l00391
我认为最有可能是您的 FFMpeg 没有您尝试使用的编解码器 - 但您说当您直接使用 FFMpeg 时它可以工作。除非 MLT 没有找到您正在测试的相同 FFMpeg。查看 MLT 是否找到您想要的编解码器的一个好方法是运行:
melt -query audio_codecs
但这只是一个猜测。也许 EINVAL 错误代码是由不同的问题引起的。
至于其他的想法……嗯,你可以使用开发者自己提供的 AppImage 或 Flatpack:https://kdenlive.org/en/download/