kdenlive - audio time delay

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

kdenlive - audio time delay

Daniel
Hello All,
i have a special little audio problem with kdenlive which is annoying me
a lot, perhaps you can reproduce it or have an solutiuon:
I like to do video cuts exactly synchronized with music song beats. So i
would like to "tap in" the beats with markers before cutting to have the
cut positions to snap to. That's not possible on my system, i always
have about 500ms of delay when i listen to the music track and tap in
the beats. So the markers are always a little to late and out of sync...
Can you reproduce this? Do you have an idea?
I am on Arch latest kernel, KDE, Ryzen System, tried it on Pulseaudion
and Firewire external Audio Interface, Same Problem.

Thanks for ideas, Daniel.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Wilhelm
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Christoph Kuhr
Hi,

kdenlive cuts on a frame-basis rather than audio-sample basis. May this be part of the issue?
But 500ms is a little slow to fit this problem. Would be two video frames per second.
Sorry if it doesn't make sense. I just woke up... ;-)

Best,
Ck


--
Diese Nachricht wurde von meinem Android Mobiltelefon mit WEB.DE Mail gesendet.
Am 30.09.19, 22:40, Daniel Wilhelm <[hidden email]> schrieb:
Hello All,
i have a special little audio problem with kdenlive which is annoying me
a lot, perhaps you can reproduce it or have an solutiuon:
I like to do video cuts exactly synchronized with music song beats. So i
would like to "tap in" the beats with markers before cutting to have the
cut positions to snap to. That's not possible on my system, i always
have about 500ms of delay when i listen to the music track and tap in
the beats. So the markers are always a little to late and out of sync...
Can you reproduce this? Do you have an idea?
I am on Arch latest kernel, KDE, Ryzen System, tried it on Pulseaudion
and Firewire external Audio Interface, Same Problem.

Thanks for ideas, Daniel.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Daniel Wilhelm
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Chris Caudle
In reply to this post by Daniel
On Mon, September 30, 2019 3:40 pm, Daniel Wilhelm wrote:
> I like to do video cuts exactly synchronized with music song beats. So i
> would like to "tap in" the beats with markers before cutting to have the
> cut positions to snap to. That's not possible on my system, i always
> have about 500ms of delay when i listen to the music track and tap in
> the beats. So the markers are always a little to late and out of sync...

Do you always use PulseAudio?  500ms latency is very high.  Does kdenlive
support jackd for audio?

If the latency is consistent does kdenlive allow shifting audio tracks?
You could manually shift the track to be aligned.

One solution which involves a lot of labor would be to export the audio
track, import to Ardour, make sure the latency compensation is set
correctly in Ardour, record the new audio, then export the audio recorded
by Ardour, and import again into kdenlive.

--
Chris Caudle
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Daniel
In reply to this post by Daniel
Hi Friends! Thank you very much for answering!
Unfortunately you did not quite get where the problem is: I need timeline
markers in kdenlive timeline where i can easy snap my video cuts to. And
these markers should be exactly on the beats od the audio, of course.
Unfortunately i cannot bring them there, because of the delay. When i tap in
the beats while listening all of them are a litttle late...
It doesen't help to shift the audio track, that would have been possible,
but the markers are linked to the audio, so they will be shifted as well, no
help. i would have to shift all the markers to the left for the amount of
delay, but thats not possible...
I need to find out, why the audio, i am listening to has this little bit of
latency, where it is coming from... to eliminated the source...
I don't know, why this problem isn't affecting a lot of other people having
their workflow in kdenlive, because you always want your cuts to be aligned
to the music beats, correct?



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Christoph Kuhr
In reply to this post by Daniel
I don't produce music videos, but lectures with kdenlive... so no, I don't have the problem.
It is a video tool, it is video frame based.
Maybe Ardours video features are better suited? But I haven't tried them yet.


--
Diese Nachricht wurde von meinem Android Mobiltelefon mit WEB.DE Mail gesendet.
Am 01.10.19, 19:46, Daniel <[hidden email]> schrieb:
Hi Friends! Thank you very much for answering!
Unfortunately you did not quite get where the problem is: I need timeline
markers in kdenlive timeline where i can easy snap my video cuts to. And
these markers should be exactly on the beats od the audio, of course.
Unfortunately i cannot bring them there, because of the delay. When i tap in
the beats while listening all of them are a litttle late...
It doesen't help to shift the audio track, that would have been possible,
but the markers are linked to the audio, so they will be shifted as well, no
help. i would have to shift all the markers to the left for the amount of
delay, but thats not possible...
I need to find out, why the audio, i am listening to has this little bit of
latency, where it is coming from... to eliminated the source...
I don't know, why this problem isn't affecting a lot of other people having
their workflow in kdenlive, because you always want your cuts to be aligned
to the music beats, correct?



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user

_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Lorenzo Sutton
In reply to this post by Daniel
Hi Daniel,

On 01/10/19 19:46, Daniel wrote:

> Hi Friends! Thank you very much for answering!
> Unfortunately you did not quite get where the problem is: I need timeline
> markers in kdenlive timeline where i can easy snap my video cuts to. And
> these markers should be exactly on the beats od the audio, of course.
> Unfortunately i cannot bring them there, because of the delay. When i tap in
> the beats while listening all of them are a litttle late...
> It doesen't help to shift the audio track, that would have been possible,
> but the markers are linked to the audio, so they will be shifted as well, no
> help. i would have to shift all the markers to the left for the amount of
> delay, but thats not possible...
> I need to find out, why the audio, i am listening to has this little bit of
> latency, where it is coming from... to eliminated the source...
> I don't know, why this problem isn't affecting a lot of other people having
> their workflow in kdenlive, because you always want your cuts to be aligned
> to the music beats, correct?


Unfortunately I have only experience 'the other way round': I have done
a soundtrack on Linux. But in my case I was getting video cuts and
synchronising the music to the video, in some cases even to the frame.
At the time I was using xjadeo and jack transport as master working
mainly with Rosegarden and Ardour. I believe xjadeo (and equivalent
functionality) is now integrated in Ardour.

If I understand correctly, in your case you are trying to sync the video
to audio (i.e. you already have the audio and are cutting / editing) the
video.

Only option I could think of is to try another video editor. For your
use-case ShotCut comes to minde as it should support jack audio and jack
transport. [1] I know if you are using Kdenlive probably you like to use
that, but maybe you can bear with using something else just for the cuts :)

In any case one option would be to use the visual waveform as clue.. Not
the best in Kdenlive honestly.

Another idea could be to generate a working copy of the video with the
timecode 'hard coded' (graphically) in the video and then use this as
precise reference for cuts. Although this probably means working in e.g.
Ardour to get the right timecode for cuts and a couple of extra
passages, it might work.

That said... do keep in mind that video frames means a 'quantiztion' of
33 to 40 ms (e.g. with 25 fps), which in audio-land can me quite a lot.
Still 500ms for audio seems really a lot as others pointed out.

One final thought: is the source audio some compressed format like mp3,
ogg, but even flac? Generally decoding could add some lag, so try
converting to wav (with same samplerate as the video project) and see if
things improve?

My two cents.

Lorenzo.

[1] https://shotcut.org/features/
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Jostein Chr. Andersen
In reply to this post by Daniel
On 2019-09-30 22:40, Daniel Wilhelm wrote:
...
> I like to do video cuts exactly synchronized with music song beats. So
> i would like to "tap in" the beats with markers before cutting to have
> the cut positions to snap to. That's not possible on my system, i
> always have about 500ms of delay when i listen to the music track and
> tap in the beats.


I believe this is not an audio-related problem but this might put you on
track:

Not that I would use markers for this myself (I use the peaks of the
wave representation of the tracks), but I just tested it myself, hitting
the asterisk key while listening to the music and got a delay of just 2
frames @25FPS with a low latency kernel.

The only thing I can think of that can make such big delay as 500 ms is
that you use the "Use slow keys" setting in the accessibilities
settings. You might want to open "System Settings" -> "Accessibility"
and there select the "Keyboard Filters" and then have a look there. Bit
it's weird if this is the problem because then everything you type would
have the same delay. I hope you manage to fix it.

Jostein
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user
Reply | Threaded
Open this post in threaded view
|

Re: kdenlive - audio time delay

Daniel
OK. A little progress.
The rt kernel would not work on my system, i am investigating, so i
installed the linux-ck kernel.
In the kdenlive preferences i can switch the audio system which is used
for playback. When i use pulseaudio i get a delay in my markers of about
5-6 frames (200-240ms).
When i switch to ALSA i get a delay of 2-3 frames (80-120ms). That's a
little better.
I will try further audio servers (e.g. OSS) to see where i may get a
further improvement. Also will try to install the rt kernel...

Any ideas, how i can get it right on the spot? My system latency is
around 30ms (cyclictest).

Thanks a lot!



--
Sent from: http://linux-audio.4202.n7.nabble.com/linux-audio-user-f5.html
_______________________________________________
Linux-audio-user mailing list
[hidden email]
https://lists.linuxaudio.org/listinfo/linux-audio-user