Bug 360084 - git master - Audio is not synced with 4k UHD video during playback -- video plays faster (sample clip included)
Summary: git master - Audio is not synced with 4k UHD video during playback -- video p...
Status: RESOLVED WORKSFORME
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: git-master
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL: https://www.dropbox.com/s/r3l88btospm...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-04 17:59 UTC by Unknown
Modified: 2021-04-04 04:33 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: timeline_corruption+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2016-03-04 17:59:08 UTC
I noticed in using this clip for testing, that the video is playing slightly faster than the audio. The frame size in this video is 2048 x 1152, which is larger than my normal 1920 x 1080 test clips, but it bears reporting nonetheless.

Reproducible: Always

Steps to Reproduce:
1. Add the sample clip provided to the Project Bin (let Kdenlive change the Project to match the clip parameters)
2. Open clip in Clip Monitor and playback.

Actual Results:  
Video is playing slightly faster than audio

Expected Results:  
Video should be in perfect sync with audio.

Bug discovered on latest Kdenlive git master build (15.13.) while using Kubuntu 15.10 x64 w/ KDE Plasma 5.5.4 via kubuntu backports ppa.
Comment 1 Jean-Baptiste Mardelle 2016-03-05 11:26:25 UTC
I cannot reproduce. Which project profile are you using (size, fps) ?
Which MLT version do you have ? There was a fix that looks a bit like what you report in MLT on the 20th of january
Comment 2 Unknown 2016-03-05 20:09:35 UTC
Hey JB. Thanks for looking into this. The default profile is 1920x1080, 24fps. When I added the clip to the Project Bin, it asked to convert it to a custom 2048 x 1152 23.98fps.

I tried opening the clip on a fresh install of Kdenlive with the latest mlt .deb builds from olivier banus' ppa (MLT 6.1.0, build 2016.03.03), but it gave me an error this time: "Cannot open file /home/jesse/.local/share/kdenlive/profiles/customprofile0". I checked the folder path, and discovered there's no file folder "profiles" in /home/jesse/.local/share/kdenlive...

The plot thickens. Any suggestions?
Comment 3 Jean-Baptiste Mardelle 2016-03-05 20:42:51 UTC
Hi Jesse,

Interesting. Kdenlive crashed if you were using a custom project profile as default project profile. I just fixed it in git, please try if you can.. Otherwise open your kdenlive config file:

$HOME/.config/kdenliverc

and search for the line:
default_profile= (...)  (should show a path to customprofile0)

Just completely delete that line, save and restart Kdenlive
Comment 4 farid 2016-04-06 16:41:35 UTC
i can confirm. i deleted the whole kdenlive.rc file and still has this problem. using today's build under archlinux. this is a big problem. :(
Comment 5 Unknown 2016-04-06 17:52:48 UTC
The crashing when using a custom project profile appears to be fixed. Thanks JB!

When working with that particular clip I referenced, the sync is still off. However, this is the only video file I've tested with this issue. It probably would be a good idea to test it with other 4K UHD footage.
Comment 6 farid 2016-04-06 19:23:48 UTC
(In reply to Jesse from comment #5)
> The crashing when using a custom project profile appears to be fixed. Thanks
> JB!
> 
> When working with that particular clip I referenced, the sync is still off.
> However, this is the only video file I've tested with this issue. It
> probably would be a good idea to test it with other 4K UHD footage.

this is happening with 1920x1080 24fps footage as well as when using proxies.
Comment 7 Unknown 2016-04-06 19:47:29 UTC
Hmm, I'll have to do some more testing.
Comment 8 Unknown 2016-05-16 17:49:24 UTC
I probably need to test with more 4k UHD footage, but something came to mind: I'm running two Nvidia 970's in my editing laptop, using Ubuntu's latest proprietary Nvidia driver. Could the proprietary driver have anything to do with this and Kdenlive or MLT?

JB, just curious, if I can ask, do you have any PC's that run any Nvidia cards with proprietary drivers for testing?
Comment 9 Jean-Baptiste Mardelle 2016-05-16 17:56:46 UTC
I don't have a machine with Nvidia graphic card, only integrated intel graphics.
However, one way to test is to play the clip in MLT and in FFmpeg to see if the bug is present with these libraries. From a terminal:

melt myclip.mp4

ffplay myclip.mp4

Let me know the results...
Comment 10 Unknown 2016-08-22 19:19:22 UTC
Hey, so sorry, not sure how I missed your last post on this bug. I'll definitely do that and report back. I also came into possession of a new laptop that uses integrated Intel graphics. I'll have to test the clip on that one, too, and see if the bug is present. Appreciate it Buddy.
Comment 11 Unknown 2016-09-27 21:05:54 UTC
Confirmed, playing the sample video I provided using melt reproduces this issue (and it was on a laptop workstation with integrated graphics). ffplay is slightly closer to syncronicity, but the video is still playing slightly faster. Playing the same video file in VLC player or Dragon Player doesn't reproduce the issue.

So... this is an MLT issue? Do I submit a bug to Dan and MLT for testing?
Comment 12 Wegwerf 2016-09-28 14:45:33 UTC
Maybe even an ffmpeg issue? (Might be on multiple lawns, though)
Comment 13 Unknown 2016-10-27 23:39:07 UTC
Justed tested and confirmed bug still present on Kdenlive git master 16.11.70, Ubuntu 16.10 x64, Unity 7.5.0, KDE Frameworks 5.26.0, Qt 5.6.1, MLT 6.3.0.

When playing back in the Clip Monitor, the audio meter seems to be in sync with the audio playback; the sound peaks when the meters peak, etc. However, the video still moves faster than the audio -- the lipsync and sound effects during the fight scene in this video don't line up.

Here's a download link to the file in question: https://www.dropbox.com/s/7fyyn1np321thk3/The%20Matrix%20-%20Neo%20vs%20Morpheus%204k%20UHD.mp4?dl=0
Comment 14 Unknown 2017-05-01 22:29:21 UTC
UPDATE: Tested to see if this bug is also present in MLT by running "melt" from Terminal and choosing the file in topic. I can confirm that the audio sync issue is present even without Kdenlive, so this seems to be an MLT issue? Where would I go to submit a bug for this?
Comment 15 Unknown 2017-05-02 01:24:21 UTC
I submitted a bug to MLT's github page. You can see the bug report, here: https://github.com/mltframework/mlt/issues/231
Comment 16 emohr 2021-03-05 15:42:21 UTC
As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

MLT has got some fixes about this issue in the meantime

Please try with the current Kdenlive AppImage version 20.12.2  https://download.kde.org/stable/kdenlive/20.12/linux/
Comment 17 Bug Janitor Service 2021-03-20 04:33:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 18 Bug Janitor Service 2021-04-04 04:33:35 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!