This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Audio "pops"/"ticks"/"crackling" at the beginning of clips

Tags: None
(comma "," separated)
saahbs
Registered Member
Posts
1
Karma
0
I ran into this bug on kdenlive Version 20.12.1 appimage prebuilt binary (on Linux). After finding that the root cause is somewhere between MLT and kdenlive, the simplest instant solution I found is to render my project (9min video) into whatever desired video quality codec I need, but high quality audio (ie. flac). Then use ffmpeg to re-process the container by copying video and declicking the audio and re-compressing into a final audio codec. Here is an example ffmpeg invocation:

$> ffmpeg -i film-4-kdenlive-clicking.mp4 -codec:v copy -filter:a dynaudnorm=p=0.9,adeclip,adeclick -codec:a aac -b:a 96k film-5-ffmpeg-post-process-of-4.mkv

This ~9min clip took 30sec to process, it was completely hands off and adeclip and adeclick filters in my case reported following findings:
[Parsed_adeclick_2 @ 0x562627cdfe40] Detected clicks in 644499 of 52983808 samples (1.21641%).
[Parsed_adeclip_1 @ 0x562627cdd100] Detected clips in 0 of 52983808 samples (0%)

So my audio wasn't clipping (as expected) but 1.2% !!! samples had clicks which the declip filter interpolated over and effectively removed.

The final audio footage sounds natural/normal with no clicks and I can keep working on my video projects.

saahbs
item
Registered Member
Posts
2
Karma
0
hi there. ran into the same issue. using 18.12.3 on debian. skimming through the thread bug might be a combination of using 24-bit audio files and transcoding to AAC? without trying the flac output and separate later transcoding, one workaround for regions that have a possible pre-run, is to remove fade-in, add pre-run, then add keyframe volume so the clip runs silent for a few 100 ms before fading it in. that seems to "skip" the popping area in the beginning.
item
Registered Member
Posts
2
Karma
0
how do I select flac output? changing to `acodec=flac` when using generate-script doesn't seem to produce a working script (empty output).

__edit__ ok exporting ffv1+flac seems to work, then use ffmpeg afterwards.
senjin
Registered Member
Posts
19
Karma
0
I'm not sure if it's related, but I encountered an issue that seems similar to the one described here.

My projects typically constitute of one or two video tracks (mp4 clips) and an audio track (flac clip). In the rendered file there was always an audio artefact at the very beginning of the video, within the first half second or so. It seemed like audio was stuttering, a small section was repeated twice.

Today I tried decoding flac to wav, and using wav file in kdenlive – and this seemed to help! So perhaps there is an issue with reading out the audio files in some formats?
tuffnerdstuff
Registered Member
Posts
1
Karma
0
EDIT: I wrote before that reprocessing 24bit FLAC to 16bit FLAC solves the problem, but this is not the case. I performed some tests with a generated 5s sine wave and this is the result, no matter if the FLAC is in 24bit or 16bit:
- FLAC audio track "uncropped" --> clean audio
- FLAC audio track "Crop Start=1s" --> crackles and pops

I also tested Shotcut and got the exact same result. I'll do some more investigation and I'll file a bug if there is none.

If you want to perform the same test on your own, here is how to generate the sine wave:

16bit
Code: Select all
ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -sample_fmt s16 test_16bit.flac

24bit
Code: Select all
ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" -sample_fmt s32 test_24bit.flac


EDIT2
I narrowed the problem down to the MLT framework. I filed a bug on their issue tracker: https://github.com/mltframework/mlt/issues/741
egerlach
Registered Member
Posts
65
Karma
0
OS
I have similar problem since 21.08.1 : the beginnings of new wav-Audio are damaged in video: after first second some chars (one syllable) I speak in audio are completly damaged . I have normal 16Bit wav audio like years before, always no problem with these wav-files, generated with audacity.

who can help?

My workaround at the moment: If error at the beginning of video I add some audio stuff , then render video, then cut video with avidemux at beginning. But I've no workaround when error occurs in the middle of video!!! I would have to cut video in to pieces, then substitute audio at beginning at part 2, then cut , then merge video together! What a huge overhead! :(
johnnydoe
Registered Member
Posts
3
Karma
0
I've been having this issue with the latest version of kdenlive. It appears to have been known for years now but nothing has been done to fix it. The same issue exists in Premiere Pro, however there it is easily and completely fixable by making a two frame transition, and the audio pops disappear. Can't we have something similar for kdenlive?
User avatar
zolder
Registered Member
Posts
172
Karma
2
Deleted. Turned out to be not relevant.

Last edited by zolder on Mon Feb 07, 2022 8:00 pm, edited 1 time in total.
senjin
Registered Member
Posts
19
Karma
0
zolder wrote:A lot to read. I didn't so can be someone already said this.

Those clicks, are the appearing on spots where you have cut?
In that case, make minor small fade-in's and fade-out's at that piece of audio. Just that small to kill the clicks and no more.

This is also a common issue in audio production, where the audio software usually is programmes to set those fade's.
This mostly appears if silences aren't really silent (noise-floor). If you cut there those noises comes in hard giving as you name it 'clicks/pops/ticks'.

You didn't even read the OP's post. They wrote:
"The click sounds about one second after the start of a clip. A second click is heard half a second after that."
Fade ins won't fix that.
User avatar
zolder
Registered Member
Posts
172
Karma
2
senjin wrote:You didn't even read the OP's post. They wrote:
"The click sounds about one second after the start of a clip. A second click is heard half a second after that."
Fade ins won't fix that.


Yep. I have to confess o) I've overread that sentence. A 1000 apologies + 500. I will do penance. :'( Although i did read the OP's post. o) Sorry for trying to help.
And yes, i am not going to read 3 pages of long reactions. I just threw up on the possibility.

BTW, i didn't say that IS and MUST BE the problem. I asked a question, and said "if so, then...". ;)
But deleted, as it turns out to be not relevant. o) Cheers.
User avatar
mesutakcan
Registered Member
Posts
15
Karma
0
I edited the video on the latest version 22.8.0
I am having the same problems.
Moving the audio clip to another track is a workaround, but checking each clip is necessary.
Permanent solution needed.


User avatar
zolder
Registered Member
Posts
172
Karma
2
mesutakcan wrote:I edited the video on the latest version 22.8.0


May i suggest something of which i don't know if it has truth in it, but worked for me?
What OS do you have and which release does it have?

The latest version had strange problems here also.
I installed the 'latest' version comparing to my OS dating and that worked OOTB. Now i use Kdenlive 20 with my ubuntu 18.

My thoughts are that 'the latest version' perhaps doesn't collaborate at full with an 'older released' OS.
I would say, try it. Worked for me.
User avatar
mesutakcan
Registered Member
Posts
15
Karma
0
User avatar
zolder
Registered Member
Posts
172
Karma
2
Sorry. Linux here. No deep win experience anymore since Win 8.2. Can't help you with that.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]