79573938

Date: 2025-04-14 20:11:57
Score: 1
Natty:
Report link

from moviepy.editor import * from PIL import Image

Load image

image_path = "/mnt/data/A_photograph_in_a_promotional_advertisement_showca.png" image_clip = ImageClip(image_path).set_duration(10).resize(height=1080).set_position("center")

Add promotional text

text_lines = [ "اكتشف نعومة الطبيعة مع صابون espase", "مصنوع من رماد، سكر، ملح، زيت زيتون، زيت، بيكربونات، وملون 88", "تركيبة فريدة تمنح بشرتك النقاء والانتعاش", "espase... العناية تبدأ من هنا" ]

Add each text line with a fade-in

text_clips = [] start_time = 0 for line in text_lines: txt_clip = (TextClip(line, fontsize=60, font="Arial-Bold", color="white", bg_color="black", size=(1080, None)) .set_position(("center", "bottom")) .set_start(start_time) .set_duration(2.5) .crossfadein(0.5)) text_clips.append(txt_clip) start_time += 2.5

Final video composition

final_clip = CompositeVideoClip([image_clip] + text_clips, size=(1080, 1080)) output_path = "/mnt/data/espase_promo_video.mp4" final_clip.write_videofile(outpu

t_path, fps=24)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ali Tema