Я пытаюсь создать видео, как показано ниже, с помощью Moviepy Python.?
Видео –
https://assets.json2video.com/examples/ ... lide-text- right.mp4
Возможно ли это с помощью Moviepy Python? Я не могу использовать FFMPEG, поскольку он не поддерживается на моем сервере.
from moviepy.editor import *
# Load the image
img_clip = ImageClip("your_image.png")
# Set the duration of the image clip
img_clip = img_clip.set_duration(5)
# Resize the image if necessary
img_clip = img_clip.resize(height=1080) # Keep the height consistent
# Define your text
text = "Your Marketing Message"
# Create a TextClip
txt_clip = TextClip(text, fontsize=70, color='white')
# Set the duration of the text clip
txt_clip = txt_clip.set_duration(5)
# Animate the text to slide in from the right
def slide_in(t):
return 'center', -1000 + 1500 * t # Adjust these values based on your needs
txt_clip = txt_clip.set_position(slide_in)
# Set background color
txt_clip = txt_clip.on_color(size=(1920, 1080), color=(0, 0, 0), col_opacity=1)
# Position the image on the left side
img_clip = img_clip.set_position(('left', 'center'))
# Position the text clip on the right side
txt_clip = txt_clip.set_position(('right', 'center'))
# Composite the two clips together
final_clip = CompositeVideoClip([img_clip, txt_clip])
# Set the duration of the final clip
final_clip = final_clip.set_duration(5)
# Save the video
final_clip.write_videofile("image_and_slide_text.mp4", fps=24)
Подробнее здесь: https://stackoverflow.com/questions/793 ... ound-video
Изображения и текст Moviepy Python с цветным фоновым видео ⇐ Python
Программы на Python
-
Anonymous
1736251571
Anonymous
Я пытаюсь создать видео, как показано ниже, с помощью Moviepy Python.?
Видео –
https://assets.json2video.com/examples/marketing/slide-text- right.mp4
Возможно ли это с помощью Moviepy Python? Я не могу использовать FFMPEG, поскольку он не поддерживается на моем сервере.
from moviepy.editor import *
# Load the image
img_clip = ImageClip("your_image.png")
# Set the duration of the image clip
img_clip = img_clip.set_duration(5)
# Resize the image if necessary
img_clip = img_clip.resize(height=1080) # Keep the height consistent
# Define your text
text = "Your Marketing Message"
# Create a TextClip
txt_clip = TextClip(text, fontsize=70, color='white')
# Set the duration of the text clip
txt_clip = txt_clip.set_duration(5)
# Animate the text to slide in from the right
def slide_in(t):
return 'center', -1000 + 1500 * t # Adjust these values based on your needs
txt_clip = txt_clip.set_position(slide_in)
# Set background color
txt_clip = txt_clip.on_color(size=(1920, 1080), color=(0, 0, 0), col_opacity=1)
# Position the image on the left side
img_clip = img_clip.set_position(('left', 'center'))
# Position the text clip on the right side
txt_clip = txt_clip.set_position(('right', 'center'))
# Composite the two clips together
final_clip = CompositeVideoClip([img_clip, txt_clip])
# Set the duration of the final clip
final_clip = final_clip.set_duration(5)
# Save the video
final_clip.write_videofile("image_and_slide_text.mp4", fps=24)
Подробнее здесь: [url]https://stackoverflow.com/questions/79335879/moviepy-python-images-and-text-with-colour-background-video[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия