mltframework / shotcut

cross-platform (Qt), open-source (GPLv3) video editor
https://www.shotcut.org
GNU General Public License v3.0
10.84k stars 1.12k forks source link

a user reports a problem with starting on linux #1399

Closed alexmyczko closed 1 year ago

alexmyczko commented 1 year ago

Please see the details at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019445

I was not able to reproduce the problem, and it's maybe a local user problem, reporting it anyways to maybe find out if there are others with this issue.

ddennedy commented 1 year ago

Hi, Shotcut does not yet use OpenCV. However, it uses MLT, which has a OpenCV plugin that it registers during initialization at runtime. Recent versions of MLT has an environment variable MLT_REPOSITORY_DENY that you can use to block loading a certain plugin; however, I fixed a bug with it recently. In any case, a hard workaround is sudo rm /usr/lib/x86_64-linux-gnu/mlt-7/libmltopencv.so OpenCV is loading things in initialization, and there is a circular dependency in debian via frei0r-plugins. Looking through strace output I see: libmltopencv.so loads various libopencv_*.so.406 libraries including libopencv_flann.so.406. Next, libmltfrei0r.so loads various frei0r plugins including facebl0r.so, which depends on OpenCV leading to the second libopencv_flann.so.406, which results in that protobuf error. In my opinion the bug is in OpenCV: it should only add a protobuf file (opencv-caffe.proto) to the database if it has not already been added. Surely, this database can be queried quickly?

ddennedy commented 1 year ago

A web search on "File already exists in database: opencv-caffe.proto" shows this is a not uncommon problem. There is a suggestion to statically link to libprotobuf from upstream caffe project in https://github.com/BVLC/caffe/issues/1917