Bug 484479 - HDR video playback not supported fully on Mac.
Summary: HDR video playback not supported fully on Mac.
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Video (show other bugs)
Version: 8.3.0
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-25 21:07 UTC by alfie80
Modified: 2024-12-02 06:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Some crash info. (65.62 KB, text/rtf)
2024-03-25 21:07 UTC, alfie80
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alfie80 2024-03-25 21:07:07 UTC
Created attachment 167763 [details]
Some crash info.

STEPS TO REPRODUCE
1. Video playback in MacOs
2. 
3. 

With version 8.3.0 on Mac, I cannot find any settings for video playback in preferences. 

OBSERVED RESULT
1. No sound in playback. 
2. Video controllers not working.
3. HDR videos not rendering in HDR, washed out colour. 

EXPECTED RESULT
Consistent video playback 


SOFTWARE/OS VERSIONS

macOS: 

KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION; 
I have attached some info from the crash log. 
This crash happened when I was trying to do some video playback
Comment 1 Maik Qualmann 2024-03-25 21:15:55 UTC
Sound problem has already been reported with Bug 484360

Maik
Comment 2 caulier.gilles 2024-03-26 08:54:37 UTC
Can you share some video sample using a cloud web-service to reproduce the problem here ?
Comment 3 alfie80 2024-03-26 20:37:35 UTC
This was a random crash. It was not linked to particular video playback. I can’t reproduce that. 
Noted sound problem report.  Can’t see much info about HDR video playback issue on Mac OS. 
Do you want me send a random HDR 4K video. It applies to both HLG and PQ.
Comment 4 caulier.gilles 2024-05-04 13:45:32 UTC
For the MacOS bundle we forget to include GPL3 and nonfree video codecs in ffmpeg. It's now done with 8.4.0 pre-release PKG installer available here :

 https://files.kde.org/digikam/

Please test and report if this file can be closed.

Thanks in advance

Gilles Caulier
Comment 5 alfie80 2024-05-04 18:08:11 UTC
Thank you.
Comment 6 caulier.gilles 2024-05-05 02:49:11 UTC
alfie80,

Did you try the pre-release version ? The video sound problem is fixed, i'm sure. About the 4K suppoet, i'm not sure. Please double check on your computer...

Gilles Caulier
Comment 7 alfie80 2024-05-05 06:16:12 UTC
It will play one or two videos with sound. But when navigate to next video, it makes an artificial sound. Then keep going going like that.
Comment 8 caulier.gilles 2024-05-05 06:49:32 UTC
is the crash reproductible ? How is the HDR color rendering ?
Comment 9 alfie80 2024-05-07 13:17:30 UTC
Yes, it is reproducible. It is not crash. Distorted sound. It is better than before. 
Navigating through different folders with videos. 
After a few videos it will start with distorted sounds only, from speaker. 
I must admit that this sound distortion is erratic, It will play some some videos with correct sound. 
I am unable to figure any particular audio codec as culprit.
Still no HDR playback. 
I have taken some screen recordings of the video playback.
This is a typical video audio encoding: Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                           : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 min 24 s
Bit rate mode                          : Constant
Bit rate                                     : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                         : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                   : Lossy
Stream size                              : 1.93 MiB (0%)
Title                                    : SoundHandle
Language                                 : English
Encoded date                             : 2024-03-23 15:26:43 UTC
Tagged date                              : 2024-03-23 15:26:43 UTC
Comment 10 caulier.gilles 2024-05-07 15:42:13 UTC
Can you share a video sample please ?
Comment 11 alfie80 2024-05-08 09:31:25 UTC
https://drive.google.com/drive/folders/11_O--kTgIhFifZ7_rHqPLoGmT5upEOuA?usp=sharing

Please these videos.  2 of them are screen recordings. One is an original video.
Comment 12 caulier.gilles 2024-05-08 10:50:16 UTC
Thanks to share the sample. See my screenshot :

https://i.imgur.com/nLTRLp0.png

There is not major visual difference between VLC and digiKam 8.4.0 on my Macbook ProM1. The video preview work as expected.

Sure VLC has certainly a way to render video with 10 bits per color per pixel (digiKam only support 8 bits for the moment). digiKam video player is not here to replace VLC at all.

For the sound glitch, yes i can here something at video init, perhaps something is not properly set before to play the media.

Gilles Caulier
Comment 13 alfie80 2024-05-09 17:17:26 UTC
Video playback improved. Also improvement with audio playback. I got a mixture of 8 & 10 bit videos. 
Strange as it sounds, Digikam plays 10 bit videos with all audio without any problems. 8 bit videos do have all the sound problems. 
I will upload some videos over the weekend for demonstration. I will try to get example videos HDR too.
Comment 14 alfie80 2024-05-24 10:22:47 UTC
Sorry for the delay. 
In these videos 8 bit encodes videos with same audio codecs do have sound problems. 
10 bit videos encoded with same sound codecs appears to play sound better. 
Please see the shared videos. Original sounds were low. Please listen for distorted sounds.

https://drive.google.com/drive/folders/11_O--kTgIhFifZ7_rHqPLoGmT5upEOuA?usp=sharing
Comment 15 caulier.gilles 2024-06-15 07:53:04 UTC
Git commit 57536d9f6188f0370d120dd84605a41549651a7b by Gilles Caulier.
Committed on 15/06/2024 at 07:45.
Pushed by cgilles into branch 'master'.

Update media player with git/master branch from GitHub
Related: bug 485468, bug 487031

M  +2    -2    core/libs/video/QtAVPlayer/QtAVPlayer_manifest.txt
M  +3    -0    core/libs/video/QtAVPlayer/qavhwdevice_d3d11.cpp
M  +1    -1    core/libs/video/QtAVPlayer/qavhwdevice_vaapi_drm_egl.cpp
M  +1    -0    core/libs/video/QtAVPlayer/qavsubtitleframe.cpp
M  +3    -1    core/libs/video/QtAVPlayer/qtavplayerglobal.h

https://invent.kde.org/graphics/digikam/-/commit/57536d9f6188f0370d120dd84605a41549651a7b
Comment 16 caulier.gilles 2024-07-17 06:22:41 UTC
Hi,

It's reproducible with last 8.4.0 release ?

https://download.kde.org/stable/digikam/8.4.0/

Best

Gilles Caulier
Comment 17 alfie80 2024-07-17 21:44:46 UTC
Yes the sound issue partially resolved. Now it can play, lot of erratic behavior  of sound playback. Sometimes, sound stop after few seconds. At times some videos with distorted sounds. 
 Video playback is OK. Still No HDR support in MAC. All native players support HDR playback, Quicktime and Elmedia. In Digikam HDR video colours are washed out. 
So I need to open videos in default player to get it work.
Comment 18 caulier.gilles 2024-09-16 14:16:37 UTC
With the bug #487031 now closed, digiKam for macOS version 8.5.0 pre-release use ffmpeg 6.1 and Qt6Multimedia 6.7.2 for the video playback:

https://i.imgur.com/u4lXXYy.jpg

All the dysfunctions disappears, excepted the rendering of HDR colors. In other words, the Video controllers are working now. 

Maik, i don't know if we can do something about the HDR support in digiKam.

Gilles
Comment 19 Maik Qualmann 2024-09-16 15:33:33 UTC
When I look at the screenshot, I like the colors in digiKam better from the video than from the macOS Player ((:-))
QMediaPlayer currently does not have support for the BT.2020 color space, for example.
Is there a difference when Darwin is used?

Maik
Comment 20 caulier.gilles 2024-09-16 16:15:35 UTC
Maik,

The stand alone video player in my last screenshot is... VLC (:=)))...

Gilles
Comment 21 caulier.gilles 2024-09-16 20:42:06 UTC
Using Drawing backend or the external Apple video player (QuickTime), give exactly the same result...
Comment 22 caulier.gilles 2024-12-02 06:41:24 UTC
Hi,

digiKam 8.5.0. is out with many fixes and improvements.

https://www.digikam.org/news/2024-11-16-8.5.0_release_announcement/

This report still valid with this version?
Thanks in advance

Gilles Caulier