Hello all, I’m not sure if this is the right place to ask but I haven’t been able to find anyone else describing the exact issue I’m having. Kdenlive 8.8.0, Windows 10 fully updated.
Any audio or video clip I bring into Kdenlive seems to be truncated in some way. Example:
I have a freshly exported audio loop track from Audacity that is 60fps timed and has a total duration of 12.384 seconds. The duration is confirmed via OS details, Foobar2000, WMP, and MediaInfo. With the project set to 60fps (or any setting), the second I drop it into Kdenlive it shows 12.23 seconds duration, before I even drag it out of the project bin. I’ve exported it as a wav, flac, and mp3, all produce the same result.
Playing the track on repeat it’s very obvious that the audio has been clipped, as I timed it precisely to loop on the music beat. This is with the clip in the middle of the timeline, and expanded as far as I can in both directions. You can literally see that the end of the waveform is gone. I can “get around” the problem by adding ~150ms of silence at the end of each track but that’s sloppy and imprecise and I’d really rather know what the heck is going on.
I’m not sure if I’m doing something wrong in kdenlive, or if I have some sort of system or codec issue, but the audio file plays fine and with the correct duration in every media player I’ve tried it on, it’s only kdenlive that has an issue.
Wow, thanks for pointing that out, I was looking at digiKam for some reason. But yes, I am on 25.08.3.
Since I’m here, I’ll add that after rebooting, that same 12.384 second audio clip now imports as 12.11 seconds instead of 12.23. The clip has not changed.
If I’m describing a known thing here (smells like flooring division somewhere…) then just tell me to get over it and I’ll change my entire project to exclusively use whole second value audio.
I just pulled in a random flac from my audio library and that 44.1 kHz, 11335464 samples file shows as 04:17;01 in the clip bin, which by my math:
11335464 / 44100 = 257.04 seconds 04:17;01 @ 29.97fps = 257.0333667 and a bit seconds
We only handle audio in video frame size chunks, so the duration is always going to be rounded to some multiple of that - but anything more than that and either something weird is happening on windows (I’m testing this with the Linux appimage), or there’s something bogus about the audio files you’re creating.
Can you reproduce this with files you didn’t create in audacity?
You might need to share an example file to see more about what’s going on in your case.
You don’t say what your framerate is, but I think I see your problem (and yeah, it’s between keyboard and chair : )
03:39;11 != 3 min 39.11 seconds. 03:39;11 = 3 min 39.367 and a bit seconds assuming a 29.97fps project.
The ;11 is 11/30 frames for a 30fps project, not 0.11 sec.
If you do actually want a perfect loop, you’ll need to make your audio exactly a multiple of the video frame duration, but @ 30fps the most it will be off by otherwise is 0.0333 sec.
I’ll add that after rebooting, that same 12.384 second audio clip now imports as 12.11 seconds instead of 12.23. The clip has not changed.
But your project framerate did! 60 → 29.97 and 12;23 → 12;11 not 12.23.
Aha, okay, that part makes sense, but then I still don’t understand why the original audio track I am trying to use is cutting off.
If you do actually want a perfect loop, you’ll need to make your audio exactly a multiple of the video frame duration, but @ 30fps the most it will be off by otherwise is 0.0333 sec.
This is the point I started from. The original project was 60fps, I created the loop timed for such. 12.384 seconds should align at frame 23 (23.040…..), and yet, the audio is still truncated, regardless of the length of the project. It’s more than 0.01667 seconds missing, as well, suggesting more than one frame worth is being cut, it’s perhaps as much as a quarter of a second.
Depending on if/where you are rounding here, and whether it’s really 60fps or 59.94 (which tends to be more common), 12.384 seconds is either 743.04 or 742.29696 frames, so it’s going to get rounded to an integer number of frames.
743 frames @ 60fps = 12.38333… sec.
And if it’s 59.94 you can’t just trivially use that as a factor because that’s the overall rate, but the ‘drop frames’ are applied at very specific places (most seconds will have 60 frames, and some will have 59). But once you figure that out, the math should work.