Bug 503470

Summary: Wrong video orientation in media player Non-destructive video rotation
Product: [Applications] digikam Reporter: Dmitry Nezhevenko <dion>
Component: Preview-VideoAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 8.6.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:

Description Dmitry Nezhevenko 2025-04-28 10:03:56 UTC
SUMMARY
It would be cool to have support for non-destructive video rotation using XMP sidecars file. Exactly same as it's currently implemented for photos.

Note that video itself may have 'rotation' flag that was wrong

STEPS TO REPRODUCE
1. Start video capture on phone in portrait mode and them immediately rotate it to landscape
2. Import to digikam, observe that video is in 'portrait mode' (expected default)
3. Rotate video using "Ctrl+Alt+Left/Right" hotkey 

OBSERVED RESULT
`tiff:Orientation="1"` is written to XMP file. Thumbnail is rotated

Player itself still plays video in portrait mode

EXPECTED RESULT

Embedded video player should automatically rotate video in a same way like thumbnail (basically same thing as right click on it) 

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2025-04-28 10:32:46 UTC
I can't reproduce this with the Qt6 version of digiKam. A video rotating over the XMP sidecar is played in the correct orientation.

Which version of digiKam are you using exactly?

Maik
Comment 2 Maik Qualmann 2025-04-28 10:39:22 UTC
Okay, if it has a counterclockwise rotation in the metadata, it won't play correctly aligned. I'll take a look.

Maik
Comment 3 Dmitry Nezhevenko 2025-04-28 13:05:31 UTC
I'm using `flatpak`

digiKam: 8.6.0
KDE Frameworks: 6.13.0
Qt: Using 6.8.3 and built against 6.8.3
KDE Flatpak runtime (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.13-amd64
Comment 4 Maik Qualmann 2025-04-29 06:00:29 UTC
Git commit 48961c81137e146a1d6775688c6c4d8e9851a2df by Maik Qualmann.
Committed on 29/04/2025 at 05:59.
Pushed by mqualmann into branch 'master'.

fix video rotation in the Qt6 video player
FIXED-IN: 8.7.0

M  +1    -1    NEWS
M  +6    -2    core/libs/video/player/qtmm/mediaplayerview.cpp
M  +6    -2    core/libs/video/player/qtmm/slidevideo.cpp

https://invent.kde.org/graphics/digikam/-/commit/48961c81137e146a1d6775688c6c4d8e9851a2df