#187 Little lag during playback (in Project monitor) everytime there is a clip change


Hello everyone,

I am experiencing an annoying bug in kdenlive 0.9.4 and openshot 1.4.3 (mlt 0.8.8-3). Every time I want to play a video in the Project Monitor, there is a little lag when a clip changes. I tried with different videos (even proxy clips) and it always happens. The rendered video does not contain this lags but it makes it complicated to work with it. The source video is m2t (HD 1080p)

Thank you in advance

1 Attachments


  • Dan Dennedy

    Dan Dennedy - 2013-03-07

    Do not expect anyone to do anything about this anytime soon, but I will be glad to leave it open for you in the meantime. A possible fix in the apps is to make them configure MLT (possibly via setting) to have a little buffer for rendering frames ahead of playout, but this can also create some side effects with respect to responsiveness and accuracy of pause handling, which is why they are not using a buffer as that requires further optimization.

  • Dan Dennedy

    Dan Dennedy - 2013-03-07

    This might also be affected by the default interpolation setting of in-app preview, which also affects the accuracy of seeking in the avformat producer. This is inter-related with the buffering mentioned in previous comment. A less accurate seek means frames may be repeated upon seek (starting next clip where in point is not the beginning is a seek). A more accurate seek often takes more time. It depends upon the format of the video especially if there are B frames.

    Last edit: Dan Dennedy 2013-03-07
  • Dan Dennedy

    Dan Dennedy - 2013-03-08

    To see what I mean, try this command line to see how it helps:

    melt your.kdenlive -consumer sdl buffer=100 rescale=bilinear

    (If your.kdenlive has a lot of filters or transitions, then it will be harder to see improvement.)

    The rescale=bilinear acts like a general quality setting now. It affects more than just the scaler, but also other effects that use interpolation. It also makes the seeking more accurate to avoid repeating frames upon the seek to an in point, but it will take long to perform that seek on video with B frames. To counteract the slower seeking, we can set buffer level to 100 frames, but notice how the player shows black for a few seconds before starting playback while it fills the buffer.

  • Javier J. Salmeron Garcia

    Just as you said, with that command the lag is gone! It also works without the "buffer=100" setting. Is there any way to apply it to Kdenlive? Or at least, which flags should I set in ffmpeg so I could have a proxy clip that avoids this problem? I say this because I found that if I transcode the clips to DNxHD the problem does not show up in kdenlive.

    Thank you very much!

    Last edit: Javier J. Salmeron Garcia 2013-03-08
  • Dan Dennedy

    Dan Dennedy - 2013-04-26
    • status: open --> pending
  • Dan Dennedy

    Dan Dennedy - 2013-04-26

    git commit 560868 improves purging buffers. This will lets apps enable playback buffering and purge after pausing or seeking to minimize latency.
    I will close this ticket on the next release.

  • Dan Dennedy

    Dan Dennedy - 2013-06-20
    • status: pending --> closed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks