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
8
votes
1 answer

Mixing audio files in MoviePy

I've been writing a script using MoviePy. So far I've been able to import videos, clip them, add text, replace the audio and write a new file. It's been a great learning experience. My question is this: The movie that I'm editing has audio attached.…
Ghoti
  • 121
  • 1
  • 10
8
votes
2 answers

Moviepy zooming effects need tweaking

I would like to zoom a clip to a certain dimension, then stop further zooming. In other words, the clip stop further increasing its size after reaching a certain size, and its better if the clip start zooming from much smaller of its original size,…
Anay Bose
  • 880
  • 1
  • 14
  • 24
8
votes
2 answers

MoviePy VideoFileClip instance has no attribute 'reader'

I've searched for a few days regarding this issue but have come to no solution. I have a big script (I'm trying to concatenate large number of videos, ~100-500), which is why I was getting the error "Too many files open". Reading Zulko's responses…
Waclock
  • 1,686
  • 19
  • 37
8
votes
2 answers

Difficulty animating a matplotlib graph with moviepy

I have to make an animation of a large number (~90,000) figures. For context, it's a plot of a map for every day from 1700 - 1950, with events of interest marked on relevent days. I can do this using matplotlib.animation.FuncAnimation, and I have…
LABarnard
  • 290
  • 2
  • 9
7
votes
2 answers

Pygame/MoviePy - The video displays with a terrible framerate and the window size is bigger than my screen

I've been looking around for a while trying to find a way to display videos in Pygame because of a new story video-game project. I finally stumbled across Moviepy which works alright...except that the video displays showing only one of the 24 frames…
7
votes
2 answers

Moviepy - Output video not playable

I'm using the library moviepy on Linux Mint 18.1. Specifically, it's moviepy 0.2.3.2 on python 3.5.2 Since I'm getting started, I tried this simple script, which should concatenate two videos one after the other: import moviepy.editor as mp video1…
Russell Teapot
  • 511
  • 1
  • 6
  • 19
7
votes
3 answers

ffmpeg installation on macOS for MoviePy fails with SSL error

I'm trying to write a Python program that uses MoviePy on Mac OS 10.11.16 to convert an MP4 file to GIF. I use: import moviepy.editor as mp and I get an error saying I need to call imageio.plugins.ffmpeg.download() so I can download ffmpeg. I…
shmible
  • 71
  • 1
  • 3
7
votes
2 answers

MoviePy: Concatenating video clips causes weird glitches in final video

Is there a way to successfully always patch up any clips together in such a way that prevents weird glitches? I put together a .mp4 from smaller .mp4 files and I got a final video with weird glitches. I am running Python 3.6.1 on Windows 10 through…
JohnSmithy1266
  • 407
  • 1
  • 6
  • 15
7
votes
2 answers

Extract images using opencv and python or moviepy

I have a video (.mp4) that has ~8000 frames. I have a csv that tells me the time that I need to grab each frame at in the video, and the number of frames to grab. number_of_frames in video = 8000 times is an array like [0.004, 0.005, ... 732s] The…
JonathanMitchell
  • 400
  • 1
  • 2
  • 12
7
votes
4 answers

Get number of frames in clip with Moviepy

You would think this would be such a simple operation, but there is nothing in the documentation about how to get the number of frames in a video clip. The only way I can think of is to use iter_frames() and just count the frames out one by one, but…
Maurdekye
  • 3,597
  • 5
  • 26
  • 43
7
votes
1 answer

moviepy resize not working in some sizes

I have a mp4 video of 720x1280, and I want it in different sizes like: 0.66%, 0.5% and 0.33%. For each of these sizes I use: clip = mp.VideoFileClip(file) clip_resized1 = clip.resize(height=int(clip.h * float(0.66666)))…
facumedica
  • 658
  • 1
  • 7
  • 20
7
votes
2 answers

How can I get the volume of sound of a video in Python using moviepy?

I want to get the volume of sound of a video so I use the following: import numpy as np # for numerical operations from moviepy.editor import VideoFileClip, concatenate clip = VideoFileClip("soccer_game.mp4") cut = lambda i:…
IordanouGiannis
  • 4,149
  • 16
  • 65
  • 99
6
votes
1 answer

Moviepy: add audio to a video

I am trying to run the following code: from moviepy.editor import * videoclip = VideoFileClip("filename.mp4") audioclip = AudioFileClip("audioname.mp3") new_audioclip = CompositeAudioClip([videoclip.audio, audioclip]) videoclip.audio =…
Charles Wagner
  • 103
  • 1
  • 2
  • 10
6
votes
2 answers

High performance video edit in Python

I'm trying to add watermark on very short part of the mp4 video. It has to be very, very fast. Now I tried to do it with moviepy Here is my code: import moviepy.editor as mp video = mp.VideoFileClip("video.mp4") part1 = video.subclip(0,10) part2 =…
R.Slaby
  • 349
  • 2
  • 4
  • 10
6
votes
1 answer

ValueError: MoviePy couldn't find the codec associated with the filename. Provide the 'codec' parameter in write_videofile

Why is it throwing this error on some files, and for other files it doesn't ? The files are all .mp4 videos. 'ValueError: MoviePy couldn't find the codec associated with the filename. Provide the 'codec' parameter in write_videofile.' The code,…
Slake
  • 2,080
  • 3
  • 25
  • 32
1
2
3
50 51