Registered Member
|
I'm having some major audio/video sync issues on rendering, and I can't figure out what's going on or why.
I recorded audio separately from video for this project. I put both into Kdenlive, and lined them up using a clap towards the beginning. When I play the video from within Kdenlive, it's lined up pretty well and looks fine. The whole edited video is 20 minutes long The problem is that when I render it - whether to MP4 or WebM - it starts out fine towards the beginning, but by the 20 minute mark the audio is so far ahead of the video that it's incredibly noticeable. It's around the 13-15min mark that I started to notice it, and by the end it was painful. (I've noticed this issue with other projects I've done in Kdenlive too, but I've never rendered a video file this long - now it's become obvious to me there's a problem at the rendering stage, not just in editing or in my perception or something.) Here's the rendered video: https://media.blaise.ca/tob/kdenlive.mp4 My inputs/environment:
I've tried a whole bunch of different things, with mixed results, but I can't see to figure out what the problem is:
The key thing is that you can take that same MP4 file, play it in mplayer or totem (or it was particular bad in VLC on Android...) and compared that with MLT... there's a noticeable difference, especially in the last 5 minutes. Like, take a look at my final remarks in the last minute of the video. Night and day comparison, or whether it could be passable or whether it's clearly out of sync to any viewer.
Now, if I ffprobe the audio only export, I get this:
Notice that the duration on the WAV file export is 00:20:00.00... whereas the duration on the MP4 export is 00:20:00.43... when I play in mplayer, towards the end of the video if I manually adjust the a/v sync to -300ms it starts looking natural again... Could there be an issue with the length of the audio versus the length of the video, and something with the container formats and how it's played together? Just a wild guess, but I can't figure out what's wrong or how to fix it... Any help would be greatly appreciated, because it's supremely frustrating to have pulled two all nighters to put together a project, and have it fall apart at the rendering stage after spending hours and hours in Kdenlive to edit!
Last edited by balleyne on Tue May 12, 2020 6:15 am, edited 1 time in total.
|
Registered Member
|
I am having the exact same issue.
|
Moderator
|
can you try latest build? https://binary-factory.kde.org/job/Kden ... age_Build/
|
Registered Member
|
I watched your clip, and it seems to jump wildly out of sync after the final edit from the song to you talking. Interestingly, this is nearly identical to my problem, where, right around the 19 minute mark, and following an edit, the audio and video are suddenly way out of sync. Everything looks fine when played back within Kdenlive.
Using Mint 19.3 Cinnamon and Kdenlive v20.04.1 running from an appimage. I also just tried rendering in the latest Kdenlive appimage : v20.07.70 with identical results. Same with an install of Kdenlive v17.12.3 Even when I render only the segment in question, the issue is still there : https://youtu.be/TLTzzJH7ReE As OP mentioned was the case when rendering his project in segments. So it doesn't seem to be related to actual length of the rendered clip, but position in the timeline? As a cheat, I went and clipped out a segment of video following the edit, and moved the rest of the video segments back to cover the gap. Upon exporting, everything is finally looking in sync (better than before). But if I drop the originally rendered mp4 back into Kdenlive, it plays back just fine, without the sync issue. Interested to hear what kind of solutions are available. I just started using v20.04.1 on a new system, but previously had no such issues on my previous one (which was about 12 years old). At least render time for a ~30m clip is now around 30 minutes long instead of 4.5 hours. I'll try experimenting with some similar, non-critical video/audio content to see if this is a consistent issue that just "happens" around 19 minutes with or without edits. Very frustrating! My ffprobe output on the mp4 video :
|
Registered users: bancha, Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]