Bug 445422 - digikam not compliant with pipewire jack library
Summary: digikam not compliant with pipewire jack library
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Video (show other bugs)
Version: 8.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-13 12:18 UTC by Philippe ROUBACH
Modified: 2024-01-26 12:48 UTC (History)
3 users (show)

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


Attachments
digikam verbose (48.91 KB, text/x-log)
2021-11-14 07:29 UTC, Philippe ROUBACH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe ROUBACH 2021-11-13 12:18:59 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. select an album
2. launch a slideshow
3. 

OBSERVED RESULT

for video there is no sound

EXPECTED RESULT

for video there is sound

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
kde gear 21.08.3

ADDITIONAL INFORMATION

with openSuse 15.3 pipewire replaces pulseaudio.
I get problem using pipewire + pulseaudio then I installed pipewire-pulseaudio then all pulseaudio was uninstalled.

digikam uses standard jack library, not pipewire jack library.
If we install pipewire jack library then standard jack library is uninstalled.
Then digikam does not find any jack library.

We must add a link

/usr/lib64/libjack.so.0 -> /usr/lib64/pipewire/jack/libjack.so.0

to get again sound with digikam.
Comment 1 caulier.gilles 2021-11-13 12:21:40 UTC
Did you use digiKam from AppImage bundle or a native system package ?
Comment 2 Philippe ROUBACH 2021-11-13 12:26:15 UTC
(In reply to caulier.gilles from comment #1)
> Did you use digiKam from AppImage bundle or a native system package ?

a native system package
Comment 3 Maik Qualmann 2021-11-13 14:35:58 UTC
This is clearly a pipewire and openSUSE package problem. Please read the openSUSE forums, they are full of it. I don't know the exact current status at the moment, but you should still install Pulseaudio. 

Maik
Comment 4 Philippe ROUBACH 2021-11-13 15:22:42 UTC
No, I found a solution for digikam using pipewire jack library.

I don't know if it is an opensuse related problem.
I can only say that all app I use are not troubled by pipewire and the fact I replaced pulseaudio by pipewire-pulseaudio.
Furthermore, I get no issue for 3 months using currently VLC, Skype, Firefox, Chrome playing sound.
I assume VLC, Skype, Firefox, Chrome use pulseaudio. That's why they don't get any problem.

Why digikam uses jack and not pulseaudio ?


***********************************************************************************************************************
When I installed (2021 august) 15.3 Argon I get some issues, but pipewire was rapidly updated from 03.24 to 0.3.3x, and I replaced pulseaudio with pipewire-pulseaudio. This  solved all the problems.

For those using only 15.3 and not 15.3 Argon, I recommend replacing pulseaudio with pipewire-pulseaudio and updating pipewire with 15.3 multimedia repo.  I first used it till I saw that the argon repo updates pipewire.

zypper addrepo https://download.opensuse.org/repositories/multimedia:libs/openSUSE_Leap_15.3/multimedia:libs.repo
***********************************************************************************************************************
Comment 5 Maik Qualmann 2021-11-13 15:37:18 UTC
We can prefer pulseaudio if it is available, for now we are automatically letting QtAV use an audio driver. 

Maik
Comment 6 Maik Qualmann 2021-11-13 20:37:44 UTC
A test here with the Pulse Audio backend from QtAV cannot be used here under openSUSE Tumbleweed, a video only plays a few frames per second. Please post a log from the terminal with an active debug environment variable from the start of digiKam. I want to see which audio backends are available under openSUSE Leap in QtAV.

I no longer see messages under openSUSE Tumbleweed that QtAV is looking for a Jack Audio Server, possibly this has already been deactivated under Tumbleweed in the QtAV package.

Maik
Comment 7 Philippe ROUBACH 2021-11-13 20:53:13 UTC
>> Please post a log from the terminal with an active debug environment variable from the start
>> of digiKam

How ?
Comment 8 Maik Qualmann 2021-11-13 21:05:54 UTC
Git commit d8213d853db4c3664a6ca549ebc6e4dcd4d77d33 by Maik Qualmann.
Committed on 13/11/2021 at 21:04.
Pushed by mqualmann into branch 'master'.

try to force platform dependent audio output plugin
Related: bug 382582

M  +21   -1    core/libs/video/player/mediaplayerview.cpp

https://invent.kde.org/graphics/digikam/commit/d8213d853db4c3664a6ca549ebc6e4dcd4d77d33
Comment 9 Maik Qualmann 2021-11-13 21:08:54 UTC
https://www.digikam.org/contribute/

Debug log in terminal:

export QT_LOGGING_RULES="digikam*=true"
digikam

Maik
Comment 10 caulier.gilles 2021-11-13 23:04:24 UTC
To Philippe from comment #7: Look explanations from this page : https://www.digikam.org/contribute/
Comment 11 Philippe ROUBACH 2021-11-14 07:29:57 UTC
Created attachment 143530 [details]
digikam verbose

result of

export QT_LOGGING_RULES="digikam*=true"
digikam
Comment 12 caulier.gilles 2022-05-12 11:24:30 UTC
Git commit 5aae9b7c21ab662d63b49f165163984809c1d585 by Gilles Caulier.
Committed on 12/05/2022 at 11:10.
Pushed by cgilles into branch 'master'.

Move AVPlayer config widgets to core/QtAV to allow to re-use these settings view in a new Video section from digiKam Setup dialog.
the goal is to be able to configure the video decoder, the audio backend, and the video renderer with video preview framework,
to prevent dysfunctions while playing audio and video media if wrong decoder/backend/renderer is selected by default.

Currently none of these settings is possible in digiKam and playing video and audio always depends of default settings done in QtAV
framework which can be badly configured for the available hardwares and modules in client computer.

TODO: add the new video config pannel in digiKam Setup dialog to configure decoder/backend/renderer.
Related: bug 435660, bug 382582, bug 426951, bug 430873, bug 437328, bug 388475, bug 440668, bug 415778, bug 442802, bug 423580

M  +2    -14   core/avplayer/CMakeLists.txt
M  +3    -6    core/avplayer/main/MainWindow.cpp
M  +7    -7    core/avplayer/main/MainWindow.h
R  +2    -0    core/avplayer/utils/ConfigDialog.cpp [from: core/avplayer/config/ConfigDialog.cpp - 099% similarity]
R  +8    -5    core/avplayer/utils/ConfigDialog.h [from: core/avplayer/config/ConfigDialog.h - 090% similarity]
M  +2    -0    core/avplayer/utils/common.cpp
M  +12   -0    core/libs/video/qtav/CMakeLists.txt
R  +2    -2    core/libs/video/qtav/widgets/config/AVFilterConfigPage.cpp [from: core/avplayer/config/AVFilterConfigPage.cpp - 098% similarity]
R  +7    -6    core/libs/video/qtav/widgets/config/AVFilterConfigPage.h [from: core/avplayer/config/AVFilterConfigPage.h - 086% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/AVFormatConfigPage.cpp [from: core/avplayer/config/AVFormatConfigPage.cpp - 098% similarity]
R  +7    -6    core/libs/video/qtav/widgets/config/AVFormatConfigPage.h [from: core/avplayer/config/AVFormatConfigPage.h - 084% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/AVPlayerConfigMngr.cpp [from: core/avplayer/config/AVPlayerConfigMngr.cpp - 099% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/AVPlayerConfigMngr.h [from: core/avplayer/config/AVPlayerConfigMngr.h - 098% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/CaptureConfigPage.cpp [from: core/avplayer/config/CaptureConfigPage.cpp - 099% similarity]
R  +7    -6    core/libs/video/qtav/widgets/config/CaptureConfigPage.h [from: core/avplayer/config/CaptureConfigPage.h - 086% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/ClickableMenu.cpp [from: core/avplayer/utils/ClickableMenu.cpp - 097% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/ClickableMenu.h [from: core/avplayer/utils/ClickableMenu.h - 082% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/ConfigPageBase.cpp [from: core/avplayer/config/ConfigPageBase.cpp - 097% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/ConfigPageBase.h [from: core/avplayer/config/ConfigPageBase.h - 087% similarity]
R  +34   -37   core/libs/video/qtav/widgets/config/DecoderConfigPage.cpp [from: core/avplayer/config/DecoderConfigPage.cpp - 098% similarity]
R  +11   -6    core/libs/video/qtav/widgets/config/DecoderConfigPage.h [from: core/avplayer/config/DecoderConfigPage.h - 082% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/MiscPage.cpp [from: core/avplayer/config/MiscPage.cpp - 099% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/MiscPage.h [from: core/avplayer/config/MiscPage.h - 086% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/PropertyEditor.cpp [from: core/avplayer/config/PropertyEditor.cpp - 099% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/PropertyEditor.h [from: core/avplayer/config/PropertyEditor.h - 093% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/ShaderPage.cpp [from: core/avplayer/config/ShaderPage.cpp - 098% similarity]
R  +7    -6    core/libs/video/qtav/widgets/config/ShaderPage.h [from: core/avplayer/config/ShaderPage.h - 085% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/Slider.cpp [from: core/avplayer/utils/Slider.cpp - 099% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/Slider.h [from: core/avplayer/utils/Slider.h - 088% similarity]
R  +2    -2    core/libs/video/qtav/widgets/config/VideoEQConfigPage.cpp [from: core/avplayer/config/VideoEQConfigPage.cpp - 099% similarity]
R  +10   -6    core/libs/video/qtav/widgets/config/VideoEQConfigPage.h [from: core/avplayer/config/VideoEQConfigPage.h - 088% similarity]

https://invent.kde.org/graphics/digikam/commit/5aae9b7c21ab662d63b49f165163984809c1d585
Comment 13 Philippe ROUBACH 2022-05-12 11:34:17 UTC
thanks
Comment 14 caulier.gilles 2022-05-12 13:58:25 UTC
Git commit 505bc17cd39702e14446c15d79d44d14d80fe005 by Gilles Caulier.
Committed on 12/05/2022 at 13:56.
Pushed by cgilles into branch 'master'.

Add Setup Video page from digiKam configuration dialog.
This allow to setup few options for media player as the decoder priority to use.
Related: bug 435660, bug 382582, bug 426951, bug 430873, bug 437328, bug 388475, bug 440668, bug 415778, bug 442802, bug 423580

M  +24   -12   core/libs/video/player/mediaplayerview.cpp
M  +1    -0    core/libs/video/player/mediaplayerview.h
M  +22   -10   core/libs/video/player/slidevideo.cpp
M  +4    -0    core/libs/video/player/slidevideo.h
M  +2    -2    core/libs/video/qtav/widgets/config/AVPlayerConfigMngr.cpp
M  +1    -1    core/libs/video/qtav/widgets/config/DecoderConfigPage.cpp
M  +1    -0    core/utilities/setup/CMakeLists.txt
M  +29   -0    core/utilities/setup/setup.cpp
M  +2    -0    core/utilities/setup/setup.h
M  +1    -1    core/utilities/setup/setuptemplate.cpp
A  +69   -0    core/utilities/setup/setupvideo.h     [License: GPL (v2+)]

https://invent.kde.org/graphics/digikam/commit/505bc17cd39702e14446c15d79d44d14d80fe005
Comment 15 caulier.gilles 2022-05-12 15:26:35 UTC
Git commit 0e2bc2695efc7d6d0d2ec52731c3f69095554b7f by Gilles Caulier.
Committed on 12/05/2022 at 15:24.
Pushed by cgilles into branch 'master'.

Hide advanced settings for each decoder as nothing is saved and restored between the sessions. Only the list of decoder and the priority is saved
Related: bug 435660, bug 382582, bug 426951, bug 430873, bug 437328, bug 388475, bug 440668, bug 415778, bug 442802, bug 423580

M  +6    -4    core/libs/video/qtav/widgets/config/DecoderConfigPage.cpp
M  +1    -1    core/libs/video/qtav/widgets/config/DecoderConfigPage.h
M  +1    -1    core/utilities/setup/setupvideo.cpp

https://invent.kde.org/graphics/digikam/commit/0e2bc2695efc7d6d0d2ec52731c3f69095554b7f
Comment 16 caulier.gilles 2023-05-02 06:26:48 UTC
@Philippe

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 17 Philippe ROUBACH 2023-05-02 06:57:15 UTC
Problem still there, no sound with a mp4 video with digikam, sound with dolphin media player or VLC for example.

Operating System: openSUSE Tumbleweed 20230430
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
KDE GEARS 23.04.0
Comment 18 Philippe ROUBACH 2023-05-02 07:01:02 UTC
Here is the messages when using a text console

:~> digikam
kf.xmlgui: Unhandled container to remove :  Digikam::DigikamApp
digikam.qtav.warn: invalid index 0 ( valid is 0 ~ 0 ) for stream type 2
digikam.qtav.warn: invalid video frame from decoder. undecoded data size: 0
digikam.qtav.warn: [FFmpeg:libopenh264] [OpenH264] this = 0x0x55ffb63ad190, Warning:referencing pictures lost due frame gaps exist, prev_frame_num: 17, curr_frame_num: 10
digikam.qtav.warn: [FFmpeg:libopenh264] DecodeFrame failed
digikam.qtav.warn: [VideoDecoder] Unknown error occurred
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Can not copy codec properties when it's open
digikam.qtav.warn: Can not copy codec properties when it's open
Comment 19 Philippe ROUBACH 2023-07-31 15:02:04 UTC
digikam 8.1

Problem still there, no sound with a mp4 video with digikam, sound with dolphin media player or VLC for example.

:~> digikam
kf.xmlgui: Unhandled container to remove :  Digikam::DigikamApp
digikam.qtav.warn: invalid index 0 ( valid is 0 ~ 0 ) for stream type 2
digikam.qtav.warn: invalid video frame from decoder. undecoded data size: 0
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Invalid plane! Valid range is [0, 0)
digikam.qtav.warn: Can not copy codec properties when it's open
digikam.qtav.warn: Can not copy codec properties when it's open
digikam.qtav.warn: invalid index 0 ( valid is 0 ~ 0 ) for stream type 2
digikam.qtav.warn: invalid video frame from decoder. undecoded data size: 0
Comment 20 caulier.gilles 2023-10-11 06:03:07 UTC
This entry will be fixed when digiKam switch to Qt6 where QtMultimedia will be used instead QtAV.

Gilles Caulier
Comment 21 caulier.gilles 2024-01-26 12:48:04 UTC
Git commit 79ac8d6e9cb90c8d9b456405051ec0937f8485fe by Gilles Caulier.
Committed on 26/01/2024 at 13:44.
Pushed by cgilles into branch 'master'.

Preview and Slideshow of video is now rendered with Qt6::Multimedia and Qt5::QtAVPlayer.
Older and unmaintained QtAV framework code used in digiKam core is fully removed.
Both Qt6::Multimedia and Qt5::QtAVPlayer are based and compatible to FFMpeg API 5 and later.
Related: bug 468572, bug 382582, bug 435660, bug 471199, bug 478314, bug 448681, bug 477031, bug 478613
FIXED-IN: 8.3.0

M  +12   -9    NEWS

https://invent.kde.org/graphics/digikam/-/commit/79ac8d6e9cb90c8d9b456405051ec0937f8485fe