Bug 382582

Summary: Video stutters when played with MP3 audio track
Product: [Applications] digikam Reporter: jerome.tonnaer
Component: Preview-VideoAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: aidanbabu, alexxxahey, caulier.gilles, ctreber, deanobats, emanuel, Ernest, jerome.tonnaer, jgoerzen, kusi, metzpinguin, petercandaele, profucius1, rafael.linux.user, skoupad-bugzilla, zeugs
Priority: HI    
Version: 7.6.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=414572
Latest Commit: Version Fixed In: 8.3.0
Sentry Crash Report:

Description jerome.tonnaer 2017-07-22 09:59:35 UTC
When I use the preview mode, video files are played but the playback is stuttering. Video files are played normal in an external player.
Comment 1 caulier.gilles 2019-03-15 10:34:19 UTC
Jerome,

The 6.1.0 pre-release installer have been updated this morning. Please test and
report to see if you can reproduce the dysfunction:

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

Gilles Caulier
Comment 2 Kusi 2019-06-22 09:25:17 UTC
since the move from gstreamer to QtAV, all videos (iPhone mov, mp4, Panasonic GH4) stutter. The internal viewer is unusable for me. Using the external player works without issues. DK 6.1 / Linux
Comment 3 caulier.gilles 2019-06-22 13:16:56 UTC
It work perfectly under My Linux With QtAv. In fact, QtAv is not the problem, but the ffmpeg codecs to install. The non free codec must be installed to process MP4 files for ex.

GStreamer never work for me here and it's a high level of run time puzzle to solve to be suitable. This is why we switch to QtAV instead.

Do not ask me to switch back.

Gilles Caulier
Comment 4 Kusi 2019-06-22 14:19:25 UTC
I use the non-free ffmpeg from OpenSuse (http://packman.links2linux.de/package/ffmpeg-3)
Comment 5 caulier.gilles 2019-06-22 14:21:44 UTC
Here under Mageia, i can use ffmpeg free codec or non free codec. With free codec, the MP4 decoding use the CPU only computation, with non free, plenty optimization are used with an optimized algorithm. Free codec introduce lag, especially with HD video, non free work as expected.
Comment 6 Maik Qualmann 2019-06-22 15:56:18 UTC
I also use Packman's non-free packages and there are no problems playing videos.

Maik
Comment 7 Kusi 2019-06-22 19:16:15 UTC
Maik: do you use the package ffmpeg-3 or ffmpeg-4?

Maik, Gilles: I have an Intel Core i7 6700 with Intel HD Graphics 530. What GPU do you have?
Comment 8 caulier.gilles 2019-06-22 19:33:30 UTC
Mine : Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz

NVIDIA Corporation GM107 [GeForce GTX 750 Ti] (rev a2)

32 Gb of RAM + SSD

ffmpeg 3 for me.
Comment 9 Maik Qualmann 2019-06-22 19:39:00 UTC
My digiKam developer version is compiled against ffmpeg-4.

Do not laugh:

Operating System: openSUSE Tumbleweed 20190621
Processors: 2 × AMD Athlon(tm) II X2 250 Processor
Memory: 7,8 GiB
Graphics: Radeon HD7750 / R7 250E (Kernel modul: radeon)

Maik
Comment 10 Kusi 2019-06-22 23:41:41 UTC
maybe I need to buy a 10 years old Athlon too :) 

None of you guys use the Intel GPU.

I checked QMLPlayer from the QtAV-players package, and it stutters the same way as in DK. So it's not a DK issue.

vlc/mpv play without issues on my machine
Comment 11 MrBond 2019-08-04 19:41:53 UTC
I have the same issue. DK 6.2, Lubuntu.
Video file playback is stuttering. Playing them with external player (VLC) work perfect. Where can I get such a „non-free ffmpeg codec“? Does this really solve the problem?
Comment 12 caulier.gilles 2019-08-04 20:44:58 UTC
yes it is. Some codec use advanced method with patents to decode video contents. Some other use GPU to speed up decoding. If codec are not compiled or without right option to optimize workflow, ffmpeg will delegate all computation to CPU only and this will slowdown decoding.

Gilles Caulier
Comment 13 skoupad-bugzilla 2019-10-22 18:49:10 UTC
I am also experiencing video stuttering, but only when I play webm video files. Everything else I play with digikam playback fine. I use the appimage version of digikam 6.3.0
Comment 14 MrBond 2019-11-03 20:47:09 UTC
Ok, where can I get such a non-free ffmpeg codec?
Comment 15 deanobats 2019-12-19 08:48:26 UTC
There is a bit of a mixed outcome for video preview. In appimage 6.0.0 all video formats play fine, and with sound. In 6.1.0 all video formats play, but there is no sound. In 6.2.0 (latest beta version Jul 22 2019) the sound is back but certain video formats are fine and others stutter - on my system (Kubuntu 18.04 LTS i5 chip with 8GM RAM) .MKV, WMV and.MP4 are fine but MPEG and AVI stutter. This stuttering behavior is repeated through 6.3.0 and 6.4.0 on the same formats. VLC player will play all formats fine as well as QML-player.
Comment 16 caulier.gilles 2020-01-02 05:32:02 UTC
*** Bug 415778 has been marked as a duplicate of this bug. ***
Comment 17 MrBond 2020-01-05 15:32:28 UTC
I've installed the latest source file of ffmpeg (4.2.1) from the official website https://www.ffmpeg.org/, but the problem still occurs. Tested in digikam 6.4 and 7.0 beta. OS: Lubuntu 18.04 LTS.
Comment 18 Maik Qualmann 2020-01-05 16:14:02 UTC
Is there maybe a link to download a demo video that stutters. All of my test videos play here without any problems.

Maik
Comment 19 caulier.gilles 2020-01-11 17:32:41 UTC
There is a patch applied to QtAV for this problem in current implementation from git/master :

https://github.com/wang-bin/QtAV/pull/1268

So, i will take a look to integrate this change in Windows installer.

Gilles Caulier
Comment 20 MrBond 2020-01-11 22:00:22 UTC
I have the problem on a Lubuntu (Ubuntu) machine, not Windows.
Comment 21 caulier.gilles 2020-01-12 06:10:48 UTC
Git commit d6d8862514d023c1f362bdd1f561aade29dc1ecb by Gilles Caulier.
Committed on 12/01/2020 at 06:08.
Pushed by cgilles into branch 'master'.

build qtav from master at digiKam bundle updates, as it contains important fixes
Related: bug 414572, bug 386522

M  +0    -3    project/bundles/3rdparty/ext_qtav/CMakeLists.txt
M  +0    -2    project/bundles/appimage/01-build-host.sh
M  +1    -0    project/bundles/appimage/03-build-digikam.sh
M  +0    -1    project/bundles/macports/01-build-macports.sh
M  +1    -0    project/bundles/macports/03-build-digikam.sh
M  +0    -1    project/bundles/mxe/01-build-mxe.sh
M  +1    -0    project/bundles/mxe/03-build-digikam.sh

https://invent.kde.org/kde/digikam/commit/d6d8862514d023c1f362bdd1f561aade29dc1ecb
Comment 22 caulier.gilles 2020-01-12 09:24:07 UTC
MrBond 

The fix in QtAV is generic, not only for Windows. We will include these changes in digiKam AppImage bundle.

For native Linux package, you will need to wait next QtAv release and an update from your Linux packagers team. So, this w can a while, and this is why we provide a stand alone Linux bundle to be able to check all fixes immediately...

Voilà...

Gilles Caulier
Comment 23 caulier.gilles 2020-01-12 10:50:07 UTC
*** Bug 388475 has been marked as a duplicate of this bug. ***
Comment 24 MrBond 2020-01-12 19:34:01 UTC
Great! I'm looking forward to test this with the next dk release. In the past, I generally installed dk via the appimage file. The last native Lubuntu release (via Synaptic Package Manager) is dk version 5.6, where videos play smoothly, because QtAV was not yet implemented in this version. But I don't wanna miss the new features in newer dk versions.
Comment 25 Maik Qualmann 2020-06-27 15:11:44 UTC
*** Bug 423580 has been marked as a duplicate of this bug. ***
Comment 26 caulier.gilles 2020-08-04 07:01:10 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 27 MrBond 2020-08-08 10:32:56 UTC
Thank you! H264 video files with audio-codec "aac" are now playing smoothly. But H264 video files with audio-codec "mp3" are still not playing accurately. They are playing in slow motion.
Comment 28 deanobats 2020-08-15 09:36:36 UTC
It does seem to be the mp3 stream that causes issue. Any file container that has mp3 as the audio stream causes the video to stutter. This is typically in AVI containers, but if the AVI container has an aac encoded audio stream (unusual but it does happen), then it plays fine. Interestingly, the appimage of Kdenlive will also not export mp3 as it claims that libmp3lame is not supported. Could be related?
Comment 29 deanobats 2020-08-15 11:20:01 UTC
Just to add to that, files that stutter in the appimage of Digikam with an mp3 stream will preview and play fine in the Kdenlive appimage.
Comment 30 Maik Qualmann 2020-09-10 05:48:38 UTC
*** Bug 426356 has been marked as a duplicate of this bug. ***
Comment 31 jgoerzen 2020-09-14 18:22:35 UTC
I'm the submitter of #426356, which has been marked as a duplicate of this one.  There are some differences I wanted to highlight for all of you.

I am running the latest Flatpak digikam, which identifies with version 7.0.0-rc in Flatpak, and in Help->About as 7.0.0 with a build date of Sept. 7, 2020.  (Not sure why 7.0.0 release or 7.1.0 isn't in flatpak).

Anyhow, I have a Pixel 2 XL and a Pixel 4a.  Both can capture 4K video with H.264.  This video plays back fine in my Debian buster system using VLC.  My video card is an nVidia GTX 1070.  I am using the Nouveau open-source nvidia drivers.  When playing on the host system with vlc, vlc comments "Trying to open /usr/lib/x86_64-linux-gnu/dri/nouveau_drv_video.so".    This also worked fine on the older version of Digikam included in buster.

Since I have upgraded to the digikam flatpak, however, this 4K video cannot play smoothly.  There is significant skipping and jumping in the video playback.

The nouveau_drv_video.so file used by vlc is in the Debian package mesa-va-drivers.

I don't know if a missing nouveau_drv_video.so is the cause of this problem, but it might be a reasonable place to start.

-----
Addendum:

I switched to an Intel video-based system with HEVC decoding acceleration (necessary for 4K H.265 playback).  Outside of Digikam, my system is quite capable of playback of both H.264 and H.265 video at 4K.  Within Digikam, however, the issue as I described above persists.

One of the videos is reported by mplayer like this:

Selected video codec: [ffhevc] vfm: ffmpeg (FFmpeg HEVC / H.265)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))

So that's not MP3.

This is also a regression from Digikam 5.9.0 in regular Debian.  I don't know if something in the newer version hurt, or if flatpak does; either way, the older Digikam was much better about this.
Comment 32 Maik Qualmann 2020-09-14 18:37:13 UTC
Well, I haven't dealt with the Flatpak yet. As far as I know it uses some sort of sandbox system. That we probably include the graphics output. I don't know if it's possible to optimize it.

Maik
Comment 33 caulier.gilles 2020-09-14 20:07:24 UTC
About digiKam flatpak, there is a dedicated github repository with a team maintaining the FlatHub bundle :

https://github.com/flathub/org.kde.digikam/issues

I seen that they work to upgrade to digiKam 7.1.0. You can report the latency problem with H264 playback to this team...

Gilles Caulier
Comment 34 deanobats 2020-10-17 12:35:39 UTC
Update - I updated by system from Kubuntu LTS 18.04 to LTS 20.04 which updated the installed version of Digikam to 6.4.0. All video formats play fine now, but no appimages of any version above 6.0.0 will play a video properly that has an .mp3 audio stream in them (most notably .avi containers). So if I compare the installed version of 6.4.0 (works) with the appimage 6.4.0 (doesn't work properly) it appears that there is something going on with the appimage packages and the .mp3 decoder.
Comment 35 MrBond 2020-10-18 14:54:24 UTC
Videos with audio codec "pcm_s16le" are also stuttering ("Live" Pictures from iPhone SE - video codec h264, mov container).
digiKam 7.1.0 appimage, Lubuntu 18.04, Linux Kernel 4.15.0-118-generic.
Comment 36 deanobats 2021-07-11 08:44:55 UTC
an update.
If using any modern appimage files (eg 7.2 or 7.3) the video playback stutters for any video container that contains an mp3 stream (typically avi). If you disable the audio device, then the video plays fine (obviously with no sound though). So there is clearly and issue with mp3 playback in appimages.
Comment 37 caulier.gilles 2021-07-11 09:42:28 UTC
DK 7.3.0 will be released soon. Later, we will port Virtual Machine to build AppImage bundle to a more recent Linux system with a main update of ffmpeg codec used by QtAV framework.

Gilles Caulier
Comment 38 Maik Qualmann 2021-09-11 13:35:30 UTC
Git commit 450d93baf8a059d9e4e0214539bf3810912e0a72 by Maik Qualmann.
Committed on 11/09/2021 at 13:33.
Pushed by mqualmann into branch 'master'.

Use QtAV video output to use hardware acceleration if supported
and use libAVFIlter to rotate the video
Related: bug 435660, bug 430873, bug 414572

M  +44   -44   core/libs/video/player/mediaplayerview.cpp

https://invent.kde.org/graphics/digikam/commit/450d93baf8a059d9e4e0214539bf3810912e0a72
Comment 39 Maik Qualmann 2021-09-11 14:49:40 UTC
Git commit 701855c5455c495bf68b61298344e80828404311 by Maik Qualmann.
Committed on 11/09/2021 at 14:48.
Pushed by mqualmann into branch 'master'.

Use QtAV video output also for the slideshow
Related: bug 435660, bug 430873, bug 414572

M  +42   -41   core/libs/video/player/slidevideo.cpp
M  +0    -1    core/libs/video/player/slidevideo.h

https://invent.kde.org/graphics/digikam/commit/701855c5455c495bf68b61298344e80828404311
Comment 40 Maik Qualmann 2021-09-22 13:04:55 UTC
*** Bug 442802 has been marked as a duplicate of this bug. ***
Comment 41 Alex 2021-09-24 19:46:13 UTC
Hi,

Noticed #442802 was marked as a duplicate of this issue.

Would just like to note that the following video formats play without stutter:
- 30fps h264/h265 with AAC audio
- 60fps h264/h265 videos without audio

The following video formats suffer severe stuttering:
- 60fps h264/h265 with AAC audio
- 60fps mpeg4 with pcm_s16le audio

CPU spikes to 30% during playback, so hopefully it's just the hardware acceleration issue.
Comment 42 Maik Qualmann 2021-11-13 21:05:46 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 445422

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

https://invent.kde.org/graphics/digikam/commit/d8213d853db4c3664a6ca549ebc6e4dcd4d77d33
Comment 43 MrBond 2021-12-11 22:58:52 UTC
When will be a new appimage released?
Comment 44 caulier.gilles 2021-12-12 05:51:41 UTC
7.4.0 files  are published : https://download.kde.org/stable/digikam/7.4.0/
Comment 45 caulier.gilles 2021-12-14 04:52:51 UTC
*** Bug 440668 has been marked as a duplicate of this bug. ***
Comment 46 Hugo 2022-04-28 08:48:02 UTC
Problem persists in version 7.6.0
In my case on Linux. All videos stutter, no matter whether .mov or .mp4 format
Comment 47 Hugo 2022-04-28 09:33:38 UTC
I can confirm, the audio stream is the problem. When you disconnect audio in the OS, the video plays smoothly.
Comment 48 caulier.gilles 2022-04-28 10:05:28 UTC
Hi,

The problem in digiKam is the lack of settings to tune backend to use for video and audio playback. The default ones are used as well. I plan to add the relevant code in digiKam to fix the problem.

Also, you must know that QtAV is not maintained since February 2022. We (digiKam team and me personalty) have backported all QtAV core codes in digiKam 8.x and maintain/review/fix these codes for the digiKam uses (and only these ones).

See the README here : https://invent.kde.org/graphics/digikam/-/tree/master/core/libs/video/qtav

Best

Gilles Caulier
Comment 49 Hugo 2022-04-28 12:20:07 UTC
(In reply to caulier.gilles from comment #48)
> Hi,
> 
> The problem in digiKam is the lack of settings to tune backend to use for
> video and audio playback. The default ones are used as well. I plan to add
> the relevant code in digiKam to fix the problem.
> 
> Also, you must know that QtAV is not maintained since February 2022. We
> (digiKam team and me personalty) have backported all QtAV core codes in
> digiKam 8.x and maintain/review/fix these codes for the digiKam uses (and
> only these ones).
> 
> See the README here :
> https://invent.kde.org/graphics/digikam/-/tree/master/core/libs/video/qtav
> 
> Best
> 
> Gilles Caulier

Thank you, looking forward to it very much -- it is such a nice program!
Comment 50 caulier.gilles 2022-05-12 11:24:46 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 445422, 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 51 caulier.gilles 2022-05-12 13:58:41 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 445422, 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 52 caulier.gilles 2022-05-12 15:26:27 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 445422, 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 53 Hugo 2022-05-23 06:52:31 UTC
(In reply to caulier.gilles from comment #52)

Thanks a lot - can't wait to see it the next build :)
Comment 54 caulier.gilles 2023-01-17 17:32:59 UTC
Hi,

I perform some test with 8.0.0 to play MKV 4K on my computer (Kubuntu 22.04, ffmpeg 4, i7, 32Gb, NVIDIA).

If QtAV is compiled without sound support (libopenal, libportaudio, libpulseaudio), the video decoding is fluent but of course there is no audio. Almost the video stream decoding pass through the video card.

If i install libopenal: catastrophe !!! sound mangle CPU, video is cluttered => not suitable. Sound like libopenal interface in QtAV code is weird. I propose to disable this support in code.

If i use libpulseaudio,, it's not better. CPU is not overloaded to decode sound, but in fact the audio is destroyed.

If i use libportaudio, it's really better. CPU idle is 60%. video and audio are fluent It's not the best but suitable.

NOTES: 

- there is no way to select right audio output on the computer. I installed right backend, uninstalled the unwanted, and recompiled digiKam as well.

- If i install all backends, libopenal is always taken by default.

- We must stay with libportaudio as i can see, or implement an audio backend selector.

Gilles
Comment 55 caulier.gilles 2023-05-05 18:27:44 UTC
@jerome.tonnaer@gmail.com 

digiKam 8.0.0 is out. This problem still reproducible with this release ?

Best regards

Gilles Caulier
Comment 56 Hugo 2023-05-05 18:32:00 UTC
(In reply to caulier.gilles from comment #55)

Dear Gilles, Everything works absolutely fine now! Thanks a lot for your efforts and support! 🤗
Comment 57 MrBond 2023-05-05 20:32:59 UTC
After nearly 6 years a solution to the problem?! :) Wow. That took a long time!
Comment 58 profucius1 2023-05-25 16:05:56 UTC
I am still suffering with the issue of videos stuttering during playback within Digikam on Windows 11. This has been going on for a long time now, even on v8.0.0 and v8.1.0 as of today. My video files are recorded from my phone, which is a Google Pixel 7 Pro (2022). 

The video file format is an MP4 file encoded with the HEVC codec and AAC LC audio. It is very frustrating to be unable to preview my videos without opening them manually using VLC, which plays the video perfectly. 

Is there anything I can do to help test?
Comment 59 profucius1 2023-05-25 16:44:39 UTC
(In reply to profucius1 from comment #58)
> I am still suffering with the issue of videos stuttering during playback
> within Digikam on Windows 11. This has been going on for a long time now,
> even on v8.0.0 and v8.1.0 as of today. My video files are recorded from my
> phone, which is a Google Pixel 7 Pro (2022). 
> 
> The video file format is an MP4 file encoded with the HEVC codec and AAC LC
> audio. It is very frustrating to be unable to preview my videos without
> opening them manually using VLC, which plays the video perfectly. 
> 
> Is there anything I can do to help test?

I should mention that I can improve the stuttering somewhat with the Configure > Video settings, I can reduce the initial stuttering when the video first plays, but inevitably the stuttering returns after a few seconds. I'm not sure what else to try
Comment 60 caulier.gilles 2023-10-12 05:50:47 UTC
This problem will be closed when we use Qt6 instead Qt5 with digiKam
Comment 61 Kusi 2023-10-12 07:58:30 UTC
(In reply to caulier.gilles from comment #60)
> This problem will be closed when we use Qt6 instead Qt5 with digiKam

What changes with Qt6? Is the plan to go back from QtAV to QtMultimedia?
Comment 62 caulier.gilles 2023-10-12 08:20:23 UTC
The port to Qt6::QtMultimedia is already done in git/master.

Qt5 => QtAV
Qt6 => QtMultimedia.

Gilles Caulier
Comment 63 caulier.gilles 2024-01-26 12:47:47 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 435660, bug 471199, bug 478314, bug 445422, bug 448681, bug 477031, bug 478613
FIXED-IN: 8.3.0

M  +12   -9    NEWS

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