-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
bugIssues that report (apparent) bugs.Issues that report (apparent) bugs.lib-PIL-PillowIssues pertaining to dependency PIL (or PIL fork Pillow).Issues pertaining to dependency PIL (or PIL fork Pillow).textIssues dealing with TextClip, SubtitlesClip, or handling of text in general.Issues dealing with TextClip, SubtitlesClip, or handling of text in general.
Description

from moviepy import VideoFileClip, TextClip, CompositeVideoClip
import os
# Load file example.mp4 and keep only the subclip from 00:00:10 to 00:00:20
# Reduce the audio volume to 80% of its original volume
clip = (
VideoFileClip("./assets/Here Comes the Runaway Bride-8.mp4")
.subclipped(10, 20)
.with_volume_scaled(0.8)
)
# Generate a text clip. You can customize the font, color, etc.
txt_clip = (
TextClip(font="Arial.ttf", text="Hello there!", font_size=70, color="white")
.with_duration(10)
.with_position("center")
)
# Overlay the text clip on the first video clip
final_video = CompositeVideoClip([clip, txt_clip])
if not os.path.exists("out"):
os.makedirs("out")
final_video.write_videofile("out/result.mp4")
Expected Behavior
Actual Behavior
Steps and code to Reproduce the Problem
Used medias
Specifications
- Python Version: 3.13.5
- MoviePy Version: 2.2.1
- Platform Name: macOS
- Platform Version: 15.5
tiagotriques
Metadata
Metadata
Assignees
Labels
bugIssues that report (apparent) bugs.Issues that report (apparent) bugs.lib-PIL-PillowIssues pertaining to dependency PIL (or PIL fork Pillow).Issues pertaining to dependency PIL (or PIL fork Pillow).textIssues dealing with TextClip, SubtitlesClip, or handling of text in general.Issues dealing with TextClip, SubtitlesClip, or handling of text in general.