<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">ср, 31 янв. 2024 г., 13:30 Matteo Bini via Cin <<a href="mailto:cin@lists.cinelerra-gg.org">cin@lists.cinelerra-gg.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Cinelerra GG developers,<br>
I've found a strange behaviour in this great editing software.<br>
<br>
When I render my project, sometimes the audio is out of sync. Not all<br>
the audio, but from a certain point, from half of the video the audio is<br>
out of sync and it gets worst the more we get to the end of the video.<br>
It's like latency piles up. I've only done MP4 renderings so far.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I think there should be some muxer setting behind 'format' button if you  summon ffmpeg rendering options  ... but there is a lot of variables, so experimenting might  become major time sink!</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
My idea, but I don't know how to demonstrate it, is that ffmpeg doesn't<br>
know how to render audio and video in sync, when there's some audio that<br>
is not aligned on frames. Since I do a lot of precise audio editing in<br>
my project, there are some audio cuts that are not aligned on frames.<br>
<br>
It's not a big problem, I just wanted to let you know. The solution is<br>
very simple: render only the video track, then render the audio track in<br>
WAV and then mux them together with ffmpeg, copying the video track and<br>
encoding the audio one. This way the video is perfectly in sync with the<br>
audio.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">in theory with ffmpeg 6.1 you also can render pcm in mp4 container, just not sure how many other softwares can read it yet? Also, in not so recent past we tried gpac (MP4Box) for making such mp4s.</div><div dir="auto"><br></div><div dir="auto">I wonder if ffmpeg's audio stream copy also fix alignment? Or only re-encoding audio?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The strange thing is that, when I watch my project from the compositor<br>
window, audio and video are in sync.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">sounds like problem with timestamps (decode/presentation) , some ffmpeg (command line) users struggled with it while trying to cut/merge videos  ... Any warnings if you launch cin form terminal?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you for making Cinelerra GG a really great free software.<br>
<br>
--<br>
Matteo Bini<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank" rel="noreferrer">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div></div></div>