FS#74957 - [kdenlive] motion traking doesn't work

Attached to Project: Arch Linux
Opened by Guido Iodice (guiodic) - Saturday, 04 June 2022, 12:29 GMT
Last edited by Antonio Rojas (arojas) - Monday, 27 June 2022, 22:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
motion traking fails very often with all algorithm but kcf. It works in upstream appimage

I tried to install opencv from testing (4.5.5-7) and mlt-git from Aur without any results.

log:

Current Frame: 1, percentage: 0
animation initialized FAILED
Current Frame: 5, percentage: 2
Current Frame: 11, percentage: 4
Current Frame: 18, percentage: 7
Current Frame: 24, percentage: 10
Current Frame: 30, percentage: 13
Current Frame: 36, percentage: 15
Current Frame: 43, percentage: 18
Current Frame: 49, percentage: 21
Current Frame: 55, percentage: 24
Current Frame: 61, percentage: 26
Current Frame: 68, percentage: 29
Current Frame: 75, percentage: 33
Current Frame: 81, percentage: 35
Current Frame: 87, percentage: 38
Current Frame: 94, percentage: 41
Current Frame: 101, percentage: 44
Current Frame: 108, percentage: 47
Current Frame: 115, percentage: 50
Current Frame: 121, percentage: 53
Current Frame: 127, percentage: 55
Current Frame: 134, percentage: 59
Current Frame: 140, percentage: 61
Current Frame: 147, percentage: 64
Current Frame: 154, percentage: 67
Current Frame: 160, percentage: 70
Current Frame: 167, percentage: 73
Current Frame: 173, percentage: 76
Current Frame: 180, percentage: 79
Current Frame: 186, percentage: 81
Current Frame: 193, percentage: 85
Current Frame: 199, percentage: 87
Current Frame: 206, percentage: 90
Current Frame: 212, percentage: 93
Current Frame: 218, percentage: 96
Current Frame: 224, percentage: 98

This task depends upon

Closed by  Antonio Rojas (arojas)
Monday, 27 June 2022, 22:37 GMT
Reason for closing:  Works for me
Comment by Antonio Rojas (arojas) - Saturday, 04 June 2022, 21:16 GMT
Please give step by step instructions and provide sample files to reproduce this.
Comment by Guido Iodice (guiodic) - Saturday, 04 June 2022, 21:29 GMT
sample files

https://www.dropbox.com/sh/799sn40ufdhwqvp/AAA-_q1x7MQ2Y3O3OfccqU6ra?dl=1

steps to reproduce

open kdenlive
open prova.kdenlive
select the clip in the timeline
go to effect stack
in motion tracking click on "analyze"
try with different algotithms

p.s. sometimes also kcf fails.
Comment by Guido Iodice (guiodic) - Saturday, 04 June 2022, 23:14 GMT
mmmh

Just to try I installed opencv from here: https://mirror.cachyos.org/repo/x86_64_v3/cachyos-v3/

and this solved the problem.
Comment by Guido Iodice (guiodic) - Monday, 06 June 2022, 19:56 GMT
opencv 4.6 seems to work better with csrt but not with others alghoritms
Comment by Guido Iodice (guiodic) - Tuesday, 07 June 2022, 13:38 GMT
opencv 4.6 from here https://mirror.cachyos.org/repo/x86_64_v3/cachyos-v3/

works perfectly.

Maybe the -O3 optimization?
Comment by Guido Iodice (guiodic) - Tuesday, 07 June 2022, 14:18 GMT
according the cachyos devs, the pkgbuild is identical but makeflags are:

#CPPFLAGS=""
CFLAGS="-march=x86-64-v3 -O3 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
Comment by Antonio Rojas (arojas) - Tuesday, 07 June 2022, 14:46 GMT
well we can't compile Arch packages with v3 optimizations, so I don't think there's much we can do here.
Comment by Guido Iodice (guiodic) - Tuesday, 07 June 2022, 14:56 GMT
I understand. What about only O3? maybe it works.
Comment by Guido Iodice (guiodic) - Tuesday, 07 June 2022, 16:04 GMT
btw I strongly doubt that the appimage is compiled with optimization. Motion tracking work fine there.
Comment by Antonio Rojas (arojas) - Saturday, 11 June 2022, 08:35 GMT
> I understand. What about only O3? maybe it works.

Well, can you please check?
Comment by Guido Iodice (guiodic) - Saturday, 11 June 2022, 12:05 GMT
my computer is not that fast to build opencv within an acceptable timeframe, I tried to build it on Opensuse obs but fails because at some poit it download a library and it's not permitted...
can you please build a -O3 somewhere so I can test it?
Comment by Antonio Rojas (arojas) - Sunday, 12 June 2022, 09:34 GMT
Actually, opencv already builds with -O3 by default
https://github.com/opencv/opencv/blob/4.x/CMakeLists.txt#L98
Comment by Antonio Rojas (arojas) - Tuesday, 21 June 2022, 18:13 GMT
so, anything else to try here or should I just close it? This seems to be a performance issue, I can't reproduce this on my system