Bug 510302

Summary: Crash when project has rotated video (from gopro) when hardware decoding is enabled (nvdec)
Product: [Applications] kdenlive Reporter: Egor <e.vakhromtsev>
Component: Project Bin & ImportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: crash CC: e.vakhromtsev, megester
Priority: NOR    
Version First Reported In: 25.08.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Egor 2025-10-06 14:51:16 UTC
SUMMARY

Kdenlive crashes on linux with nvidia card when hardware decoding option is enabled.
Crash occurs when play\import rotated video file recorded with gopro 11.

STEPS TO REPRODUCE
1. Enable hardware decoding on system with nvidia card option in "Setting \ Run Config Wizard" menu.
2. Import video file which had been recorded in 90° rotated gopro 11 camera (link to sample videos below).

OBSERVED RESULT

Kdenlive crashed with segfault.

EXPECTED RESULT
Kdenlive import rotated videos without crash. Imported videos played just fine.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch linux with kernel 6.16.10-arch1-1
Qt Version: 6.9.1
MLT:  7.32.0
Ffmpeg: n8.0 (also bug reproduced with ffmpeg 7.1.1)
nvidia-utils: 580.82.09-1 (NVIDIA GeForce RTX 3060)
nvidia-open-dkms: 580.82.09-1 (NVIDIA GeForce RTX 3060)

ADDITIONAL INFORMATION
Flipped (rotated by 180 degree) videos are imported fine. But had render glitches (broken colors).

Everything works fine on that system when hardware decoding disabled.

Sample video and kdenlive project for reproducing this bug (just enable hardware decoding and play project timeline to reproduce crash):
https://www.dropbox.com/scl/fo/h243o2wuvgp1gpjhmmc6d/AB94UQa2C29AEHxJUhBMNAI?rlkey=ahd3l4zn1upl6p6w4d0o68af8&st=xilj13n0&dl=0
Comment 1 Jean-Baptiste Mardelle 2025-10-23 07:20:10 UTC
Thanks for your report. This is an issue in MLT, I just reported it here and hopefully this can be solved soon:
https://github.com/mltframework/mlt/issues/1163
Comment 2 Andrey 2025-11-25 07:02:21 UTC
I can confirm this. In my case I get crash with VAAPI decoding if I:

1. Add a 1920x1080 clip
2. Open "Clip properties"
3. Set "Rotate" to either 270 or 90

If  I set it to 180 there is no crash but all the clip colors are heavily distorted. Without the VAAPI hardware decoding it all works fine.

My configuration:

Kdenlive: 25.08.3
MLT: 7.33.0
FFmpeg
KDE Frameworks: 6.19.0
Qt: Using 6.9.2 and built against 6.9.2
AppImage
Debian GNU/Linux 12 (bookworm) (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.12.43+deb12-rt-amd64
Comment 3 Jean-Baptiste Mardelle 2025-11-25 08:00:17 UTC
This is now fixed in MLT 7.34, by disabling HW decoding on clips with rotation metadata
Comment 4 Andrey 2025-11-25 11:45:04 UTC
Thank you!