Bug 501716 - Krita audio while animating make horrible crackling sound
Summary: Krita audio while animating make horrible crackling sound
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 5.2.9
Platform: Compiled Sources Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-18 23:03 UTC by Deagan
Modified: 2025-04-01 19:45 UTC (History)
3 users (show)

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


Attachments
OBS recording of audio crackling (2.17 MB, video/x-matroska)
2025-03-18 23:03 UTC, Deagan
Details
attachment-386414-0.html (1.53 KB, text/html)
2025-03-19 12:44 UTC, Deagan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Deagan 2025-03-18 23:03:33 UTC
Created attachment 179556 [details]
OBS recording of audio crackling

SUMMARY
When making an animation and adding the audio, a crackling sound plays when playing the animation. It also plays the crackling sound while selecting a frame.

STEPS TO REPRODUCE
1. Add audio
2. Play animation or change a frame
3. 

OBSERVED RESULT
Audio Crackling

EXPECTED RESULT
No audio crackling

SOFTWARE/OS VERSIONS
Windows

ADDITIONAL INFORMATION
Comment 1 Dmitry Kazakov 2025-03-19 05:30:31 UTC
Hi, Deagan!

What format you use for the audio file? If mp3, could you try using any other format, like .ogg or .wav?

We have a known issue with clicking in .mp3 format. Other formats should be better
Comment 2 Deagan 2025-03-19 12:44:00 UTC
Created attachment 179572 [details]
attachment-386414-0.html

Hi, I have tried mp3 and WAV files and the same thing happens for both. I
have no clue why this is happening.

On Wed, Mar 19, 2025, 12:30 AM Dmitry Kazakov <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=501716
>
> Dmitry Kazakov <dimula73@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |dimula73@gmail.com
>
> --- Comment #1 from Dmitry Kazakov <dimula73@gmail.com> ---
> Hi, Deagan!
>
> What format you use for the audio file? If mp3, could you try using any
> other
> format, like .ogg or .wav?
>
> We have a known issue with clicking in .mp3 format. Other formats should be
> better
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Deagan 2025-03-19 23:10:02 UTC
I fixed the issue! I had to go into my appdata folder and remove all traces of krita from my device and then redownload it.
Comment 4 Deagan 2025-03-19 23:17:55 UTC
(In reply to Deagan from comment #3)
> So when i use the portable file version, it's fixed. But the installer version has the bug.
Comment 5 Emmet O'Neill 2025-03-20 01:49:07 UTC
Ok, good to know! We'll make sure that both the portable and installer versions are working as expected. :)

Thanks for the report Deagan.
Comment 6 Halla Rempt 2025-03-28 09:49:13 UTC
It's exactly the same code, so there is no difference at all between the portable zip file and the installer.
Comment 7 Deagan 2025-03-29 01:40:54 UTC
Well now the issue is happening on BOTH versions. What do i do?
Comment 8 Deagan 2025-03-29 04:34:06 UTC
OK - so i found out that the more you lower the framerate, the more the crackling goes away. This still isn't a fix, though. I animate in 24 frames per second.
Comment 9 Emmet O'Neill 2025-04-01 19:26:24 UTC
@Deagan What are the specs of your computer?
Comment 10 Emmet O'Neill 2025-04-01 19:45:27 UTC
@halla I thought that was the case but I'm not too familiar with the different ways of packaging on Windows. 

I was thinking that it might be possible that the packaging for Windows was somehow messed up, causing the playback engine to automatically fall back from MLT to Qt (which it'll do if it can't find the proper path for the MLT resource/profile/preset files).  We actually recently had an issue with this on Linux post qt6 port.

But that *still* can't be it, because we totally removed QtMultimedia form the basic Qt-based playback engine, so even if MLT failed to load and it had to fall back, it wouldn't produce any audio at all.

Personally I haven't been able to reproduce this on Linux or Windows with various mp3 files, so I'm starting to suspect it's a power/performance issue. Maybe we've set the audio buffer size small by default (this improves latency and AV sync, but taxes the CPU more). If that's the case then the right solution might be to make it configurable and start with a slightly more conservative setting.

If it's not a power issue and Deagan has a relatively powerful PC, then I'm really not sure and will need to go back to the drawing board and do more investigation...