moviepy

Make a clip as long as a sound using moviepy

Make a clip as long as a sound using moviepy Question: My clip is 14 minutes long. The sound sometimes can last up to an hour or more. I don’t want to make the clip an hour long for example. When I have to make that clip.set_duration(audio.duration) it’s easy, but how can I make that …

Total answers: 1

Why does Moviepy stretch my output after cutting and putting back together a video?

Why does Moviepy stretch my output after cutting and putting back together a video? Question: I am using moviepy to cut up a video, put all the clips back together, and then export it. When I export it, the aspect ratio is changed, vertically stretching the image. I was using the ‘.mkv’ container, which I …

Total answers: 1

Problems with Python

Problems with Python Question: I have so many weird problems with python. I installed moviepy and when I want to run the code using Spyder, it says this no module named moviepy. But, when I run the code on the terminal, everything is fine. My other problem is that I installed jupyter notebook and jupyter …

Total answers: 1

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

Combining 100's of mp4s without running out of ram. In order Question: 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 …

Total answers: 1

Video generated from a picture and one auido file has no sound using moviepy

Video generated from a picture and one auido file has no sound using moviepy Question: I am trying to make a video with one image and one auido file using the following code: from moviepy.editor import * audio = AudioFileClip("/users/qingzhou/downloads/Taylor.wav") image = ImageClip("/users/qingzhou/downloads/shuangyu.png").set_duration(audio.duration) clip = image.set_audio(audio) clip.write_videofile("/users/qingzhou/downloads/rock.mp4",fps=30) After running it, I got the following notifications: …

Total answers: 1

How can i resize image in moviepy so that it perfectly fits in 1980×1080?

How can i resize image in moviepy so that it perfectly fits in 1980×1080? Question: So I’m trying to resize an image and maintain its ratio so that it perfectly fits in 1980×1080 in the moviepy library. Currently, I’m doing this with a function like this: def FitClip(size): #size is basicly clip.size clipRes = size …

Total answers: 1

How to scale up video with Python moviepy?

How to scale up video with Python moviepy? Question: I am using Python 3.10 and moviepy library to process videos. I need to scale up (zoom) video without changing its resolution. There are a lot of example of using moviepy resize method, but it changes only the resolution. Are there any options of scaling video …

Total answers: 1

Crop a video in Python, centered on a 16×9 video, cropped to 9×16, moviepy?

Crop a video in Python, centered on a 16×9 video, cropped to 9×16, moviepy? Question: I want to crop a video that is 16×9 resolution to 9×16. This can be done by cropping a centered 607px wide rectangle on the 16×9 video. Can this be done? EDIT: I do not care to stay within moviepy. …

Total answers: 2

Python – Adding image to mp3 files in folder

Python – Adding image to mp3 files in folder Question: I have a folder with 10 ".mp3" songs, I want to add an image to those songs and render all files in mp4 format, but I am getting an error : AttributeError: ‘WindowsPath’ object has no attribute ‘endswith’ Code: from moviepy.editor import * from pathlib …

Total answers: 1

How to use moviepy generated videos in Vegas?

How to use moviepy generated videos in Vegas? Question: For some reason I can’t use generated videos by Moviepy in Vegas but before editing them with Moviepy I’m able to import into Vegas. I just can use these videos if I convert each one using Handbrake (mp4 to mp4). Could this problem be caused by …

Total answers: 1