79647394

Date: 2025-06-01 10:05:16
Score: 0.5
Natty:
Report link

from moviepy.editor import VideoFileClip, concatenate_videoclips, TextClip, CompositeVideoClip from moviepy.video.fx import resize

Reload video clips after environment reset

clip1 = VideoFileClip("/mnt/data/VID20250601114023.mp4").subclip(0, 5) clip2 = VideoFileClip("/mnt/data/VID20250601114725.mp4").subclip(0, 5) clip3 = VideoFileClip("/mnt/data/VID20250601114859.mp4").subclip(0, 5)

Resize to vertical 9:16 (Instagram)

clips = [resize.resize(clip, height=1920).crop(width=1080, x_center=clip.w / 2) for clip in [clip1, clip2, clip3]]

Text content and timing

text_data = [ ("Jesús ens va ensenyar a compartir...", 0), ("...i no mirar només per nosaltres", 2.5), ("Hi ha qui passa gana...", 5), ("...mentre altres llencem el pa", 7.5), ("Foc de fe 🔥 és actuar, no només creure", 10), ("La meva comunitat cristiana", 12.5), ("Jesús ens va ensenyar a compartir el pa", 15) ]

Concatenate video clips

final_video = concatenate_videoclips(clips)

Generate overlay texts

text_clips = [ TextClip(text, fontsize=70, color='white', font='Arial-Bold') .set_position('center') .set_duration(2.5) .set_start(start) for text, start in text_data ]

Merge video and text

final = CompositeVideoClip([final_video, *text_clips])

Export final Instagram-ready video

output_path = "/mnt/data/Foc_de_fe_INSTAGRAM_FINAL.mp4" final

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Jose Santiago Roberto Vegas