Questions tagged [moviepy]

MoviePy is a Python module for video editing, which can be used for basic operations (like cuts, concatenations, title insertions), video compositing (a.k.a. non-linear editing), video processing, or to create advanced effects.

References

763 questions
0
votes
1 answer

moviepy CompositeVideoClip fails with ColorClip

I want to add a semi-transparent box over a video. Following is the code I have and the error: videoclip = VideoFileClip("a.mp4") bgclip = ColorClip(size =(50, 50), color =0.5, ismask=True) finalclip = CompositeVideoClip([videoclip, …
Ratan Nahn
  • 90
  • 7
0
votes
0 answers

Gtts stutters after 2 sentences

I'm trying to make two gtts voices, Sarah and Mary, talk to each other reading a standard script. After 2 sentences of using the same voice, they start repeating the last word until the duration of the sentence is over. from moviepy.editor import…
0
votes
0 answers

How do you wiggle an image in moviepy when a certain voice is talking?

I want to wiggle an image when a certain voice is talking in a conversation. I am currently using gTTS to generate two speakers and for the audience to know who is talking, I want them to move around when each of them are talking. The two speakers…
Electro
  • 17
  • 8
0
votes
0 answers

Pyinstaller error "ModuleNotFoundError:" after converting python file to .exe

I want to convert my python file to an executable file (.exe), but when I try to run the .exe after I converted the file, it gives me this error: Failed to execute script 'main' due to unhandled exception: No module named 'moviepy' Traceback (most…
Byuuk
  • 29
  • 4
0
votes
0 answers

Moviepy how to call the vfx function scroll?

I want a transition of a clip sliding so the other clip appears from moviepy.editor import ImageClip, AudioFileClip, concatenate_videoclips, vfx image1 = ImageClip('Video.png') image2 = ImageClip('Video-1.png') image3 =…
0
votes
0 answers

Multiple Callbacks and 'TypeError'?

I am trying to run a Python program that generates visuals from an audio file. I'm a bit of a beginner here, so I've just been reverse-engineering issues and incompatibilities that have come up along the way. Now, I am faced with an error. The…
0
votes
0 answers

Using moviepy on AWS Lambda (Docker) throw segmentation fault error

I am running fastapi on lambda and I got Lambda error which I believe related to moviepy and opencv. The error text is at the bottom. My main.py (the part where the error is triggered) ... from moviepy.editor import VideoFileClip ... My…
Apezzz
  • 95
  • 2
  • 8
0
votes
1 answer

Moviepy replays audio at the end for half a second

I used moviepy to add audio to a given video. I started by checking the duration of the video. If it's shorter than the audio, I slow the video down using: video_clip = video_clip.fx( vfx.speedx, (video_clip.duration/audio_clip.duration)) Then, I…
Zac Jokface
  • 153
  • 2
  • 10
0
votes
1 answer

"ImageMagick is not installed" when ImageMagick is already installed

I'm using MoviePy which requires ImageMagick, but when I run my code I receive the following error: Traceback (most recent call last): File…
0
votes
1 answer

Need help fixing this Error: AttributeError: 'int' object has no attribute 'cget'

First things first, Im german (strings in german aswell) and a bloody beginner when it comes to coding, but its fun and I want to improve. Im currently working on a Youtube downloader GUI using python and tkinter. The cget attribute has worked in…
flexbeatz
  • 17
  • 2
0
votes
1 answer

Automatically saving a file with the next sequenced name in Python

I'm fairly new to python. I'm trying to automatically create an mp4 using moviepy saved under the next increment number and correct folder each time the code is run. All files saved will be named "Clip(number).mp4", but every even number is saved in…
Electro
  • 17
  • 8
0
votes
0 answers

How can I add padding to a TextClip caption in moviepy

I would like to know how I can add padding so that it does not touch the edges of the video. This is my current code. text_clip = TextClip(text, size=[1080, 1920], fontsize=70, stroke_color='black',…
0
votes
0 answers

moviepy problem with ImageMagick: delegate library support not built-in

I'm using Ubuntu 22.04.1 LTS and when I try to run a Python code that uses the moviepy library, it returns an error related to ImageMagick: My simple code: from moviepy.editor import * text = TextClip("test", fontsize=24, color='white') text =…
pydev
  • 1
  • 2
0
votes
0 answers

Direct convert "mkv" to "wav" using python

How can I directly convert an "mkv" file to a "wav" file? It means that my goal is to extract the audio of a movie file using python. What is the process of this? Can anybody help me with how I can do it? My Python version is 3.10.8 and I guess it…
Sr7
  • 3
  • 4
0
votes
1 answer

Combining 100's of mp4s without running out of ram. In order

I have some code that is great for doing small numbers of mp4s, but at the 100th one I start to run out of ram. I know you can sequentially write CSV files, I am just not sure how to do that for mp4s. Here is the code I have:`11 This solution…
Dray
  • 69
  • 7