Bug 456512 - No sound on AppImage previews
Summary: No sound on AppImage previews
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Video (show other bugs)
Version: 8.0.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-09 13:13 UTC by Such A Shame
Modified: 2023-05-18 17:56 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Such A Shame 2022-07-09 13:13:36 UTC
SUMMARY
No sound at appimage versions of digiKam on videos or sound files. Experienced using 7.6. on Ubuntu 20.04 LTS and 7.7. on Ubuntu 22.04 LTS. No problems with sounds respective "native" versions 6.x and 7.5.

STEPS TO REPRODUCE
1. Preview any video or sound file.

OBSERVED RESULT
No sound.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 22.04 LTS
KDE Plasma Version: 
KDE Frameworks Version: 5.95.0
Qt Version: Version 5.15.3 (built against 5.15.3
Comment 1 Such A Shame 2022-07-09 13:57:07 UTC
Actually mp3 sound files don't even play (progress bar stays still). Video mp4 shows normally without sound.
Comment 2 Maik Qualmann 2022-07-09 17:19:18 UTC
We always closed the audio device in digiKam-7.7.0 when no video is playing. This change is already removed in the digiKam-7.8.0 trial version. But the problem is still there, so it wasn't the problem. There must have been another change to QtAV.

Maik
Comment 3 Such A Shame 2022-07-17 10:50:29 UTC
MP3-file preview frame also shows incorrect length (correct information at properties sidebar), if it helps.
Comment 4 Nicofo 2022-10-05 18:58:25 UTC
Same problem with appimage 7.7 and 7.8 on Fedora: video plays well, but no sound.
Comment 5 Maik Qualmann 2022-10-05 19:45:43 UTC
This is not an internal digiKam problem, as the native digiKam version plays sound without any problems. Something must be missing in the VM when compiling / creating the AppImage.

The only difference to an older AppImage is that it still has sound and that Pulse is also available. In current AppImages, only OpenAL.
Gilles, I think there is something missing to compile QtAV with Pulse.

Maik
Comment 6 caulier.gilles 2022-10-05 20:12:24 UTC
hi Maik,

Yes probably. I will take a look.

Gilles
Comment 7 caulier.gilles 2022-10-12 14:47:47 UTC
Git commit bd48db4af207073d4865562488ea6cc847ac53af by Gilles Caulier.
Committed on 12/10/2022 at 14:47.
Pushed by cgilles into branch 'qt5-maintenance'.

Add pulse audio support in AppImage

M  +1    -0    project/bundles/appimage/01-build-host.sh

https://invent.kde.org/graphics/digikam/commit/bd48db4af207073d4865562488ea6cc847ac53af
Comment 8 Maik Qualmann 2022-10-12 20:49:12 UTC
The current AppImage now plays sound here again.

Maik
Comment 9 Nicofo 2022-10-13 18:53:19 UTC
(In reply to Maik Qualmann from comment #8)
> The current AppImage now plays sound here again.
> 
> Maik

There is indeed a change in the last AppImage:
 - there is some sound, but with a lot of noise
 - and the video lags a lot (video is jerky).
In the previous AppImage: no sound at all, but the video was ok (not jerky).

Of course the video plays nice (with sound) outside Digikam (VLC, ...).
Comment 10 Maik Qualmann 2022-10-13 19:27:02 UTC
You're using Fedora with Gnome I assume? QtAV is now part of digiKam, the debug messages are now in the digiKam namespace. There are a lot of debugging messages during playback. If you have enabled internet debugging under digiKam Setup-> Miscellaneous-> System, please disable it and restart digiKam. The debug environment variable should also not be set.

Maik
Comment 11 Maik Qualmann 2022-10-13 19:28:52 UTC
not internet debugging -> internal debugging...

Maik
Comment 12 Nicofo 2022-10-13 19:36:48 UTC
Indeed Maik, I'm using Fedora with Gnome.
"Enable internal debug logging" was already deactivated. And I don't use debug environment variable (AFAIK, unless they are used by default?). 
Note that I have tested deactivating the option "Disable HW acceleration OpenCL": no effect.
Comment 13 Nicofo 2022-10-13 19:45:10 UTC
Note that as you asked, I have tested with KDE Plasma -> same result.
And also Gnome X11 or Wayland does not change anything.
Comment 14 Such A Shame 2022-10-26 06:33:53 UTC
(In reply to Maik Qualmann from comment #8)
> The current AppImage now plays sound here again.

I have 7.8.0 from Oct 14 but fix is not there.
Comment 15 Maik Qualmann 2022-10-26 06:40:38 UTC
(In reply to myaccount132 from comment #14)
> I have 7.8.0 from Oct 14 but fix is not there.

My comment was related to the upcoming digiKam -7.9.0 AppImage from here:

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

Please test it.

Maik
Comment 16 caulier.gilles 2022-10-26 06:54:15 UTC
And i will rebuild all 7.9.0 bundles this evening

Gilles
Comment 17 Such A Shame 2022-10-26 06:57:32 UTC
By quick testing mp4 video sound is ok, but all mp3 files have silent gaps.
Comment 18 Such A Shame 2022-10-26 06:58:59 UTC
(In reply to myaccount132 from comment #17)
> By quick testing mp4 video sound is ok, but all mp3 files have silent gaps.

... they're not actually gaps, but playing stops abruptly and constantly for short times.
Comment 19 Such A Shame 2022-10-28 17:05:04 UTC
Tested newer 7.9.0 build from today. Now both mp3 audio and mp4 video audio play at equally correct speed but also have equally corrupt output (distortion, analogue synth type sounds).
Comment 20 Such A Shame 2022-10-28 17:14:04 UTC
(In reply to myaccount132 from comment #19)
> Tested newer 7.9.0 build from today. Now both mp3 audio and mp4 video audio
> play at equally correct speed but also have equally corrupt output
> (distortion, analogue synth type sounds).

Retested 20221022 build and behavior change actually seems to be from upgrading Ubuntu 22.04 -> 22.10 as this previous version now behaves similarly. Anyway, there still seems to be something wrong with the audio.
Comment 21 caulier.gilles 2023-01-17 17:46:16 UTC
Maik,

Problem is also reproducible on my computer with 8.0.0 and a native compilation using libportaudio under Kubuntu 22.04.

In fact the first video is ok, but when i switch to another one, no sound. I need to restart digiKam

Gilles
Comment 22 Nicofo 2023-04-15 17:24:11 UTC
I have tested with 8.0.0 version (still Appimage on Fedora 37):
- now the video and sound are working well
- EXCEPTED during the first 2-3 seconds of the video which are laggy (and no sound)
Strange ...
Comment 23 caulier.gilles 2023-04-15 18:05:32 UTC
I have exactly the same problem here under Kubuntu 22.04 (Plasma desktop).

Disabling the desktop OpenGL effects fix the problem. Do ask me why...

Gilles Caulier
Comment 24 Nicofo 2023-04-15 19:54:50 UTC
(In reply to caulier.gilles from comment #23)
> I have exactly the same problem here under Kubuntu 22.04 (Plasma desktop).
> 
> Disabling the desktop OpenGL effects fix the problem. Do ask me why...
> 
> Gilles Caulier
I tested that as well (I suppose you mean disabling compositing : Alt+Shift+F12 on KDE xorg ?). No effect, same problem under Fedora.
Comment 25 Roland 2023-04-26 12:49:32 UTC
Same issue in openSUSE 15.4 and openSUSE Tumbleweed using KDE Plasma - no sound available, disabling compositing has no effect.
Application digikam is not shown in the audio section of the plasma control panel during video playback.
No sound problems in earlier releases including 7.10.0.
Comment 26 Roland 2023-04-26 13:19:10 UTC
video playback with mp3 audio

console output during video playback:
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 27 Maik Qualmann 2023-04-26 17:04:51 UTC
Roland, under openSUSE Tumbleweed have you tested the AppImage or the already available native digiKam version from the repository?
Here with my developer version under openSUSE Tumbleweed no sound problems, either with FFmpeg4 or FFmpeg5.
Have you installed the required Packman FFmpeg packages?

Maik
Comment 28 Roland 2023-04-26 21:05:22 UTC
Hi Maik,

I have installed digiKam from the repo KDE:Extra.
PackMan ffmpeg 4.4.4-1599.1.pm.5 is available.

I have just tested the AppImage version, it is working 👍

Perhaps, it's now a task for the package maintainer of the repo.
Comment 29 Such A Shame 2023-05-18 17:50:04 UTC
Appears to be fixed in 8.0.0
Comment 30 caulier.gilles 2023-05-18 17:56:43 UTC
It's a great news.