Fix: parallel streams are concatenated instead of overlaid, output is N times too long - #17
Fix: parallel streams are concatenated instead of overlaid, output is N times too long#17Komuccap1 wants to merge 1 commit into
Conversation
|
Разобрался с причиной удвоения. Дело в Звук при этом собирается через Ощущение «замедления» обманчиво: сами чанки играют с нормальной скоростью, просто Два открытых PR по этой теме:
Если нужно прямо сейчас, а ждать мержа не хочется — правка из #17 применяется к |
Problem
create_video_with_gaps()assigns every clip its position on the webinar timelinewith
.with_start(relativeTime)and then passes the list toconcatenate_videoclips(). That function discards.startand lays the clipsend to end.
A webinar is normally recorded as several parallel streams (presenter camera,
screen share, sometimes a second screen). With them appended instead of overlaid,
the output is roughly N times longer than the recording, and the same minutes are
shown again from a different source.
The audio path does not have this problem —
create_audio_with_gaps()usesCompositeAudioClip, which does honour.start. So video is sequential whileaudio sits on the real timeline: the two drift apart by design.
Reported in #8 — 3 hours of source produced a 5.5 hour file after ~14 hours of
rendering.
Reproduction
Fix
Replace
concatenate_videoclipswithCompositeVideoClipover a full-length blackbackground. The background also covers the gaps, so the manually inserted filler
clips are no longer needed and the function gets shorter.
Verified with the snippet above: 40.0 s → 20.0 s.
Note on layout
This restores correct duration and A/V sync. Where two streams are live at the same
time they now stack, with the later clip on top — which stream ends up visible
depends on the order in
eventLogs. Proper composition (screen full frame with thecamera as a corner inset, or vice versa) is a separate decision and out of scope for
this fix; the point here is that the timeline is no longer wrong.