Reply to topic

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

Merlimau
Registered Member
Posts
599
Karma
5
I downloaded all files. Could you upload the Kdenlive project file as well. Then that’s more easy to reproduce. Let me know the timeline zone (in point/out point) I have to use to reproduce. At a first glance I see that your MP3 files have 320kb/s and mine 120 and 160kb/s only.
dhealey
Registered Member
Posts
13
Karma
0
Thanks. I've added the project file to the same dropbox folder. Here are the times for the items shown in the screenshot on the two tracks

A2

00:00:00:07 - 00:00:01:02
00:00:01:14 - 00:00:02:05
00:00:02:20 - 00:00:03:14
00:00:03:16 - 00:00:04:00
00:00:04:14 - 00:00:04:24
00:00:05:07 - 00:00:05:17
00:00:05:18 - 00:00:06:04
00:00:06:05 - 00:00:06:13

A7
00:00:00:14 - 00:00:05:21
Merlimau
Registered Member
Posts
599
Karma
5
Got it. I rendered the first 6:13 seconds. Yes there are clicks and distortions in the rendered file and I even hear it in Kdenlive's playback.

When I load the MP4 into Audition the MP4 is only 3sec long but it plays with the correct speed (?!). So I see at: 2.2:12sec, 2.2:14sec, 2.4:11ec, 2.4:14sec, 3.2sec clicks and distortion in Audition.

You have made customer project settings: 1920x800 12:5 (2.4:1) PAL at 25fps. Is that correct?
Let me investigate further.
dhealey
Registered Member
Posts
13
Karma
0
Yes I made a custom profile as you describe.
Merlimau
Registered Member
Posts
599
Karma
5
Disabling parallel processing for rendering gives less clicks and distortions in the rendered file.

I re-made the project as "pur" 1080p25 project but after rendering with the same clicks and distortions in the rendered file.
The same after MP3 rendering.

I assume it could be a concurrent process issue in the rendering part. I like to open an issue for this. Can I take your files and put it in the issue tracker?
dhealey
Registered Member
Posts
13
Karma
0
Merlimau wrote:Can I take your files and put it in the issue tracker?

Yes definitely! Thanks for taking the time to test this out, really appreciate it!
User avatar ulatekh
Registered Member
Posts
4
Karma
0
I can reproduce this with a single .wav file. I recorded saying the numbers 1 through 5, and used kdenline cut them up into 5 sections. The first audio pop happens in the middle of "two". This is kdenlive 18.12.3 and mlt 6.12.0, as provided by Fedora Core 29, BTW. (Edit: Reproduced with latest mlt/kdenlive from git.)

Is providing this sample helpful, or do you have all the data you need to track down the problem?
It's kind of maddeningly easy to reproduce.
I'm trying to build debug versions of the needed tools (kdenlive_render and mlt, I think), but someone that knows the code better can probably find this in an instant.

Edit 1: listening closely to the source audio, at the point where the rendered audio pops loudly, it seems there's the *tiniest* sound that might qualify as a pop, but it's barely audible in the source, and it's getting magnified way out of proportion somehow in the rendered audio. Is the rendered audio getting converted to frequency-domain and back or something? I'm not sure why something that sounds like a tiny pop is somehow getting magnified so much.

Edit 2: Tested using latest mlt (from git on 7-Jul-2019) and kdenlive (from git on 13-Jul-2019). Popping artifact still present.
Where is the issue-tracker entry for this? I looked at recent changes to the kdenlive bugs at https://bugs.kde.org/ but didn't see it.
User avatar ulatekh
Registered Member
Posts
4
Karma
0
I've made some progress on this bug. Hopefully the developers are listening.

I found two ways to make the problem go away. One, don't reuse the same source clip -- use a different copy of it. I repeated my "1 through 5" test, but with 4 hardlinks to the original sound file, and the loud pops went away. Two, arrange the edited clips in reverse order that they appear in the source clip, i.e. it became a "5 through 1" test.

So the issue appears to be related to reusing the same clip and seeking forward inside of it.

I'm trying my best to understand src/modules/avformat/producer_avformat.c, but it's not easy -- the flow of control is pretty wild, and the lack of strong encapsulation (e.g. mlt_frame_set_position() can set the "original_position" property, but it's also set in producer_avformat's producer_get_image() and producer_get_frame()) makes the data flow hard to understand. I really hope one of the developers that knows this code better can track down the problem using the above observations.

Meanwhile, I'm going to remake my dialog-oriented source clips (i.e. the .wav files I recorded with a microphone) so that the lines are embedded in the reverse order that I'm using them in my video, and see if the above observations work when put to the test.

Edit: I've redone several scenes in my video this morning, placing clips in the timeline in the reverse order they appear in the source audio file. No popping artifacts. Looks like I found a legitimate clue!
dhealey
Registered Member
Posts
13
Karma
0
ulatekh wrote:Where is the issue-tracker entry for this? I looked at recent changes to the kdenlive bugs at https://bugs.kde.org/ but didn't see it.


Hi,

Yeah I forgot to open a bug report. I've done it now though - https://bugs.kde.org/show_bug.cgi?id=410726 :)
Merlimau
Registered Member
Posts
599
Karma
5
ulatekh wrote:Edit: I've redone several scenes in my video this morning, placing clips in the timeline in the reverse order they appear in the source audio file. No popping artifacts. Looks like I found a legitimate clue!


Do I understod correct? You record different text phrases and save it in 1 wav file.
Load this wav file into Kdenlive and cutting it into the needed pieces of text phrases (at a silent point?) but let the order as you spoke it. Render this video: You get pops.

Re-arrange the text phrases on the timeline in a manner that is not the original spoken order. Render this version: You get no pops. Correct?

What project setting (1080p25fps?) and render settings do you use?

I assume Kdenlive doesn't cut the wave file on the zero-point of the sinus wave. If you cut the original wav lets say in Audacity at the zero-point and load this cutted wav files into Kdenlive it should not pop after rendering.

Or do you think something in MLT is wrong?

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bartoloni, Bing [Bot], blogthetech, boudewijn, Google [Bot], gui-m, ipwizard, Majestic-12 [Bot], ramskulls, skylerjett, Sogou [Bot], YaCy [Bot]