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
1
vote
0 answers

FileNotFoundError from moviepy

I'm trying to replicate a gif converter from this tutorial but it still gives me errors. I installed all dependencies for moviepy and followed all the instructions. I'm using windows 8.1 64 bit from moviepy.editor import * clip =…
0
votes
1 answer

Slow Video Playback with Python MoviePy and Pygame

I've been working on a video player in Python using MoviePy and Pygame. While I have managed to get it working, the video playback speed is not as smooth as I would like it to be, especially for high-resolution videos. Here's my code: from…
0
votes
1 answer

How to fix the Editor?

I'm trying to make a video editor in Python and Tkinter and MoviePy, but it is showing some error from moviepy.editor import * from tkinter import * from tkinter import filedialog def browseFiles(): global fn fn =…
THEOP05
  • 19
  • 6
0
votes
0 answers

MoviePy Animation

I am trying to animate a simple effect in moviepy. The first video needs to play. In its last 0.5s, the other video should slide in its place and start playing. The animation should be exactly 0.5s. The script I wrote for some reason only works for…
0
votes
0 answers

MoviePy error: failed to read the first frame of video file... That may also mean that you are using a deprecated version of FFMPEG

When I run a python telegram bot script locally, it works completely fine but when I run the script on PythonAnywhere I get an error that shows up when I try to generate a video: "2023-08-29 15:21:53,138 (__init__.py:960 MainThread) ERROR - TeleBot:…
0
votes
0 answers

moviepy.editor - upright video is wider not even

I have written code in moviepy.editor to make a video file smaller. The video is upright and is made wider by the image editing. Do I have a possibility to influence this image change? MY CODE import moviepy.editor as mp def…
0
votes
2 answers

MoviePy OSError: [Errno 32] Broken pipe | BrokenPipeError: [Errno 32] Broken pipe

macOS Ventura 13.5 I'm trying to split an audio mp4 file into few chunks to add one of them to a video clip. Here is the code: from moviepy.editor import * audio = AudioFileClip('/Users/User1/Desktop/video_creating/my_music.mp4') clip =…
phiz
  • 3
  • 1
0
votes
0 answers

video sub-clip repetition using python

I have a .mkv video file and a .srt subtitle file. I want to create a new embedded video file(video+subtitle) from them. I also want that each speech of the video will be repeated twice(Only the speech repeats and other parts will play only once). I…
0
votes
1 answer

How can i crop a video, using moviepy, and only export the cropped part without the black blackground?

ive made a function which crops a video using moviepy and ive made another algorithm to detect what coordinates to crop by using the variables top_left_crop etc this shows the output right now BUT i want it to crop out the video and remove the…
Pady
  • 9
  • 2
0
votes
1 answer

moviepy, after a few seconds the video freeze

I have an issue with the compressing the videos. The following code should resize the video and compress it: import moviepy.editor as mp def video_compressor(input_path): if input_path is not None: base_name =…
0
votes
0 answers

moviepy add zoom-out animation to a ImagClip

Following is the ImageClip (red background) that is continually being fitted to the word. When the ImageClip jumps to the next word, I want to generate a small zoom-out effect. color_clip =…
mika
  • 173
  • 2
  • 16
0
votes
0 answers

Resize the video using MoviePy

Following is my code: from moviepy.editor import VideoFileClip from moviepy.video.fx.resize import resize from PIL import Image video_path = "2textani.mp4" output_path = "now good1.mp4" new_width = 640 new_height = 480 video_clip =…
0
votes
0 answers

TypeError: must be real number, not NoneType using spyder anaconda

import moviepy.editor as mp import tkinter as tk from tkinter import filedialog import math from PIL import Image import numpy def zoom_in_effect(clip, zoom_ratio=0.02): def effect(get_frame, t): img = Image.fromarray(get_frame(t)) …
faisal2k
  • 3
  • 3
0
votes
0 answers

Video doesn't save in MoviePy

I can't seem to get this video to download to my downloads folder, here is the code: from tkinter import * import tkinter.filedialog import sounddevice as sd import wavio as wv from scipy.io.wavfile import write from moviepy.editor import * import…
0
votes
1 answer

OSError: MoviePy error: failed to read the first frame of video file

I am trying to extract and save a frame from an .mp4 using moviepy like so (simplified): from moviepy.editor import * clip = VideoFileClip('conditiontest1.mpg') clip.save_frame('frame1.png', 20) When I run this I get: Traceback (most recent call…
Steve
  • 945
  • 3
  • 13
  • 22