mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-11-14 18:22:59 +01:00
CompositeVideoClip treats a composite as transparent unless it is given bg_color or use_bgclip. Every frame then starts from a transparent RGBA canvas, the full-size first clip is alpha-composited onto it, and a second, full-size float mask composite is computed. The writer stacks that mask onto the frame and pipes RGBA to FFmpeg, where the H.264 output drops the alpha channel again. Four composites have an opaque clip covering the whole canvas, so the mask is always fully opaque and only costs time: - generate_video(): the combined footage under the subtitle clips, on every video with subtitles enabled - _fit_clip_to_canvas() in contain mode: the black letterbox canvas - slidein_transition() and slideout_transition(): the black canvas Give them bg_color=(0, 0, 0), as render_image_zoom_video() already does. The rendered frames are unchanged; the final MP4 files were byte-identical before and after on the benchmark inputs.