You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the example code vailable on PyPi site for moviepy.
Expected Behavior
The text should stop displaying after 10 seconds.
Actual Behavior
The text is displayed for 14 seconds, regardless of what value is passed in with_duration method.
Steps to Reproduce the Problem
from moviepy import VideoFileClip, TextClip, CompositeVideoClip
# Load file example.mp4
clip = (
VideoFileClip("long_examples/example2.mp4")
)
# 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])
final_video.write_videofile("result.mp4")
Specifications
Python Version: 3.13.0
MoviePy Version: 2.1.1
Platform Name: Macbook Pro - M1 2020
Platform Version: MacOS Sonoma 14.5
ffmpeg version: 7.1
The text was updated successfully, but these errors were encountered:
harsh-zymr
changed the title
Base example from PyPi is not working in latest version
Base example from PyPi is not working as expected in latest version -- with_duration seems to be ignored
Dec 26, 2024
Interestingly this only happened when a video, generated by another NodeJS application, was used. The Nodejs generated video using ffmpeg only.
If I generate a video from the same library then the issue does not happen.
@OsaAjani I will need to recreate it now since I dropped nodejs app and moved to full python generation only to avoid the issue. I will share the video here in a day or so, after I recreate it.
Running the example code vailable on PyPi site for moviepy.
Expected Behavior
The text should stop displaying after 10 seconds.
Actual Behavior
The text is displayed for 14 seconds, regardless of what value is passed in
with_duration
method.Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: