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

How can the "thr" and "s" parameters in MoviePy's mask_color function be optimized for maximum quality and minimum rendering time?

I'm trying to separate a white animation from a black background. The results were poor (black pixelation around edges of animation) when using: mask_color(clip, color=[0,0,0]). I know the function's optional parameters thr=SomeNumber and…
mb_bts
  • 15
  • 6
0
votes
1 answer

generating video using moviepy using image and text but getting ERROR like size = clips[0].size AttributeError: 'list' object has no attribute 'size'

import glob import os from natsort import natsorted from moviepy.editor import * base_dir = os.path.realpath("./images/") print(base_dir) gif_name = 'pic' fps = 24 file_list = glob.glob('./images/*.jpg') # Get all the pngs in the current…
0
votes
1 answer

Moviepy return error on CompositeVideoClip = TypeError: 'float' object cannot be interpreted as an integer

I am trying to composite a '.mp4' video and 'text' using VideoFileClip and TextClip respectively by appending them to a variable 'clip_list'. If I try to print 'clip_list' on console it logs: [
0
votes
1 answer

Naming file output moviepy ffmpeg

I am trying to name clips from a moviepy ffmpeg output based on text in dataframe columns. I can create the clips but am having trouble with the naming as Im not sure how to loop through the list and add it to the output file name. example data…
Witness
  • 15
  • 5
0
votes
1 answer

How to apply transparency to clips in moviepy?

So I'm trying to create a clip with moviepy where five semi-transparent clips are overlaid on each other using the CompositeVideoClip. The output should be a clip of length equal to the longest clip, where the all the layers of the composite clip…
dequation
  • 531
  • 5
  • 4
0
votes
1 answer

Exception has occurred: TypeError Expected cv::UMat for argument 'src' when passing MoviePy colourClip into OpenCV

When I pass a MoviePy colour Clip into OpenCV I get the following error message Exception has occurred: TypeError Expected cv::UMat for argument 'src' import moviepy.editor as mped import moviepy as mpie import numpy as np import sys import…
OneWorld
  • 163
  • 2
  • 12
0
votes
1 answer

Add an image behind a video file (.mp4) in python

I am attempting to add an image behind a video using moviepy and cannot come up with any way to do it. My image dimension is (1080 x 720) and my video dimension is (200 x 200). I am trying to put the video file on top of the image file, place it in…
George Lua
  • 17
  • 1
  • 5
0
votes
2 answers

MoviePy cannot conctenate when using multiple paths in a for loop

I hope the question is clear enough. Basically I have an array "output" containing all the folders I will utilize (as shown below): output = ['folder1', 'folder2', 'folder3', 'folder4'] I want to create a video for all the subfolders. I can manage…
George Lua
  • 17
  • 1
  • 5
0
votes
1 answer

Reversing the translation of the Pillow Image Library Rotation

I'm a bit of newbie at this, trying to rotate an image in Python Pillow without changing the position of the centre of the rotated image. OR by the pillow rotate looks of things... returning the centre back to it's original spin location. In…
OneWorld
  • 163
  • 2
  • 12
0
votes
1 answer

Python Movie.py - How do I handle(deallocate/close) no longer used clips?

Expected Create ImageClips of varying duration and append to: clips = [] (line 13-16) Make ImageClips into a concatenated clip: concatenated_videoclips(clips, method="chain") (line 19) Add Audio to concatenated clip (line 20-21) Loops through…
0
votes
1 answer

How does the function process_frame(input_frame) receives its argument?

The function process_frame is nested inside property pipeline which belongs to class VehicleDetector of utils.py script. The property pipeline is called inside main.py script in function process_video. Can someone explain me how does the function…
0
votes
0 answers

Google Cloud Functions, Image Magick policy.xml OS Error, Not Authorised

I am using Google Cloud Functions to Download a video from Google Cloud Storage Bucket Overlay that video with some text Upload the processed video back to Google Cloud Storage Bucket. I am using Python MoviePy module. When running the script I…
0
votes
1 answer

MoviePy in Django: Failed to read the duration of the file

I'm trying to pass the video data pulled from a ModelsForm into a moviepy method, however the VideoFileClip() function is unable to read the duration of the file. I've checked the data I'm pulling in and it is the correct name. Currently the issue…
Silreth
  • 45
  • 11
0
votes
1 answer

Django Signals - How to save the instance

I am using Django Rest Framework to upload videos. Now I wanted to add thumbnails to my video files. Whenever a Video object is saved, I wanted to create a thumbnail and set its thumbnail field. My Video model looks like this: class…
0
votes
0 answers

Django - Trying to create a GIF from uploaded video

I have a model class representing a video file. It has also a GIF field. I want to create also a GIF file of each video file. Before saving, I fill the gif field with the content of video field in the save() method like this: class…