Don't wanna be here? Send us removal request.
Text
```python
from moviepy.editor import TextClip, concatenate_videoclips, CompositeVideoClip
import pandas as pd
# Data about the scenes
data = {
'text': [
"A person who deceives and manipulates.",
"Someone who uses others for personal gain.",
"A character lacking honesty and loyalty."
],
'duration': [3, 3, 3], # Duration of each clip in seconds
'fontsize': [50, 50, 50],
'color': ['white', 'white', 'white'],
'bg_color': ['black', 'red', 'grey']
}
df = pd.DataFrame(data)
# Create a list to hold video clips
clips = []
# Generate a text clip for each entry in the DataFrame
for index, row in df.iterrows():
txt_clip = TextClip(row['text'], fontsize=row['fontsize'], color=row['color'], bg_color=row['bg_color'], size=(1920, 1080))
txt_clip = txt_clip.set_duration(row['duration'])
clips.append(txt_clip)
# Concatenate all clips into one video
final_clip = concatenate_videoclips(clips, method="compose")
# Write the result to a file
final_clip.write_videofile("reel.mp4", fps=24)
```
1 note
·
View note