Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.09k stars 1.51k forks source link

TextClip shows line instead of text #2034

Open austinmw opened 10 months ago

austinmw commented 10 months ago

Expected Behavior

I'm trying to write text onto a movie clip.

Actual Behavior

Instead of text a line is displayed across the screen (with the text and background colors). I've tried adjusting the size and position significantly, and this moves the line around, but I still can't see any text. Here's an example of the line in the middle of the video clip:

image

Steps to Reproduce the Problem

from moviepy.editor import *

# loading video dsa gfg intro video 
video_path = 'output.mp4'

clip = VideoFileClip(video_path)

# clipping of the video 
# getting video for only starting 10 seconds 
clip = clip.subclip(0, 10) 

# Generate a text clip 
txt_clip = TextClip("TESTING TESTING", fontsize = 75, color = 'black', bg_color='white')

# setting position of text in the center and duration will be 10 seconds 
txt_clip = txt_clip.set_duration(10).set_position('center')

# Overlay the text clip on the first video clip 
video = CompositeVideoClip([clip, txt_clip]) 

# showing video 
video.ipython_display(width = 480) 

Specifications

y9rabbito commented 9 months ago

In which file this TextClip is code?? Also assign to me.

dariansh1 commented 1 month ago

Was anyone able to find a resolution to this issue? Having the same problem, using MoviePy hosted in an AWS Lambda Container to add text to some .mp4 videos and TextClips always show up as lines when processed in the container:

Specifications: