Shotcut 20.07.11 Linux rendering "failed to load producer"

With the latest version rendering fails with the error “failed to load producer”

The Log:

QApplication: invalid style override passed, ignoring it.
mlt_repository_init: failed to dlopen /tmp/.mount_ShotcuyCuR3U/usr/bin/lib/mlt/libmltavformat.so
(/tmp/.mount_ShotcuyCuR3U/usr/bin/lib/libpulse.so.0: undefined symbol: pa_json_parse)
[producer_xml] failed to load producer “/home/vansloneker/Videos/sample.mp4”
[producer_xml] failed to load producer “/home/vansloneker/Videos/sample.mp4”
Failed with exit code 11
Failed with exit code 11

I experienced this so far on two different systems, both running Linux Mint 18.3/64. I happened both with snap installed Shotcut as well as with the appimage started Shotcut.

After long search and trying I found this happened with the latest version 20.07.11 only, not with previous versions.
It happened regardless where I put the source file, or what source file I use. I do have proper rights on the source file.

It works for me on Ubuntu 20.04 with AppImage or snap, but failed to dlopen /tmp/.mount_ShotcuyCuR3U/usr/bin/lib/mlt/libmltavformat.so is definitely a big problem because that is the FFmpeg integration. It seems to be failing on libpulse (PulseAudio). I reproduced in Mint 18.1 in a VM. Shotcut v20.06 does not work either, but 20.04 does. I did not upgrade the Linux base image used for making the builds (Ubuntu 16.04) since v19.02, but I did have to rebuild it. md5sum against the two bundled libpulse.so does show a difference. So there was a change to that lib in Ubuntu 16.04 sometime in the past couple years that broke it. Mint 18 is from 2017, and it does work in Mint 19 and Ubuntu 16.10 VMs that I have. So, it seems to have fallen out of compatibility with Mint 18 unfortunately. Sorry, but I am not planning to fix this.

I found something interesting inside the AppImage of the latest version.

$ find /tmp/.mount_ShotcueOFJaT -name 'libpulse.so*'
/tmp/.mount_ShotcueOFJaT/usr/bin/lib/libpulse.so.0
/tmp/.mount_ShotcueOFJaT/usr/lib/x86_64-linux-gnu/libpulse.so.0
/tmp/.mount_ShotcueOFJaT/usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0

The first one is the one from the Shotcut portable tar from which the AppImage is built. The other two are ones the AppImage tool bundled.

$ strings /tmp/.mount_ShotcueOFJaT/usr/bin/lib/libpulse.so.0 | grep json_parse
pa_json_parse
$ strings /tmp/.mount_ShotcueOFJaT/usr/lib/x86_64-linux-gnu/libpulse.so.0 | grep json_parse

The one that the AppImage tool pkg2appimage includes does not have the symbol.
Now, looking at an version 20.02.17 of the Shotcut.AppImage:

$ strings /tmp/.mount_ShotcuDjfcFR/usr/bin/lib/libpulse.so.0 | grep json_parse

returns nothing. That confirms the newer version has a newer version of libpulse with a ps_json_parse function that libmltavformat.so needs. An even more curious thing is that Shotcut UI loads libmltavformat.so as well with no problem. Only the background exporter qmelt is unable. It seems to not be loading our bundled libpulse and using either the one in /usr/lib/x86_64-linux-gnu/ or the host system.

I just did a test in a new Ubuntu 16.04 virtual machine, and it is weird. Trying to export in the AppImage fails, but the portable archive works! Unfortunately, the portable archive is not working on my Mint 18.1 machine. Maybe it will in your Mint 18.3.