Bug 493529

Summary: MacOS: DaSIM and Nano motion tracker not working - uncaught OpenCV exception / invalud OpenCV build?
Product: [Applications] kdenlive Reporter: Schlomo Schapiro <schlomo>
Component: Title Clips & SubtitlesAssignee: Jean-Baptiste Mardelle <jb>
Status: REPORTED ---    
Severity: major CC: 73584j, fritzibaby
Priority: NOR    
Version: git-master   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot of error

Description Schlomo Schapiro 2024-09-23 10:50:47 UTC
Created attachment 173986 [details]
screenshot of error

SUMMARY

Cannot use OpenCV motion trackers, "Analyse effect" fails with a "failed to filter source" error:

Current Frame: 1, percentage: libc++abi: terminating due to uncaught exception of type cv::Exception: OpenCV(4.9.0) /Users/gitlab/ws/builds/ GZwHuM5x/0/sysadmin/ci-management/macos-arm- clang/build/libs/opencv/opencv/work/opencv-4.9.0/ modules/dnn/src/onnx/onnx_importer.cpp:4097: error: (-2:Unspecified error) DNN/ONNX: Build OpenCV with Protobuf to import ONNX models in function 'readNetFromONNX'

STEPS TO REPRODUCE
1. install Kdeenlive
2. put OpenCV motion tracking modules into ~/Library/Application\ Support/kdenlive/opencvmodels/
3. load sample video, I used https://www.pexels.com/de-de/video/eine-gruppe-von-jungen-die-eine-musikalische-nummer-auf-der-buhne-spielen-2941132/
4. add Motion Tracker effect, mark a face, select DaSIM and click on "Analyze"

OBSERVED RESULT

error (see screenshot)

EXPECTED RESULT

Motion tracking with OpenCV models

SOFTWARE/OS VERSIONS
Mac OS 14.5 on M3 arm64
Kdenlive Version 24.11.70 (git master) from official DMG
Same problem observed also with 24.08.01 and 24.05.02 installed via DMG from official download
Comment 1 Schlomo Schapiro 2024-09-23 11:57:08 UTC
I did a countercheck on Linux (Kdenlive 24.08.1 via Flatpak) and there it all works.

It seems to me that there is a problem with the MacOS OpenCV build. This is the actual error message:

Build OpenCV with Protobuf to import ONNX models in function 'readNetFromONNX'

It seems like a problem with the builds for MacOS
Comment 2 73584j 2024-09-29 06:55:13 UTC
On the windows version, Kdenlive seems to have a similar issue, as it crashes when trying to use either motion tracking model.