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

How to subclip specified number of frames in a VideoFileClip in Moviepy

I'm looking for a way to remove some frames of video or cut some sequences of video clips and then concatenate them. Is there any way to do so in Moviepy? I know one possible solution is to compute the duration of each frame based on the fps of the…
0
votes
1 answer

edit video with moviepy after downloading from youtube

I'm trying to write a basic python script that downloads videos from youtube, clips 10 seconds of it, and then concats it with another pre-downloaded video I have in my root directorywhatever.mp4. I have a list of search words in words.txt that I…
Yehuda
  • 27
  • 15
0
votes
1 answer

Moviepy - OSError: Error in file converted_fg01.mp4, Accessing time t=1352.40-1352.45 seconds, with clip duration=1352.400000 seconds

I'm using moviepy to cut a clip into multiple equally-sized segments, and it's reading from a txt file of start and end values to cut the clip properly. The following is my code: required_video_file = VideoFileClip(filename) with open("times.txt")…
0
votes
1 answer

MoviePy ValueError: t_start (60.00) should be smaller than the clip's duration (30.00)

I'm using moviepy to cut a clip into multiple equally-sized segments, and it's reading from a txt file of start and end values to cut the clip properly. The following is my code: required_video_file = VideoFileClip(filename) with open("times.txt")…
0
votes
1 answer

MoviePy: How to convert horizontal 1920x1080 video to vertical 1080x1920 video?

I am trying to convert a horizontal video clip (1920x1080) using Moviepy to a vertical video clip (1080x1920), and also understand the Moviepy Docs. The docs say x1,y1 is the upper left corner and x2,y2 is the bottom right corner. But when I enter…
S7bvwqX
  • 147
  • 3
  • 13
0
votes
1 answer

Concatenate videos of varying lengths to produce a video of no longer than 60 seconds

Say I have multiple videos sorted out in a list that I'll call "sub_videos" based on its video length: # sub_videos ____________________________________________________________________________________ ten_second_or_below_videos = [ten_sec_video1,…
HELPME
  • 1
0
votes
2 answers

Moviepy - video will not export with the audio I add to it

from moviepy.editor import * clip = VideoFileClip('add_audio.mp4') audio = AudioFileClip('liver_1.wav') videoclip = clip.set_audio(audio) clip.write_videofile('does this work.mp4') Please help, when I run this code the video exports but with…
torin
  • 21
  • 5
0
votes
1 answer

moviepy render comes out as trash after first clip

So im trying to concatenate the clips but after the first clip it stops working. Does anyone know how to fix this? Is this a bug or something? because I really cannot figure this out here is my code from moviepy.editor import* #intro video intro =…
tomas
  • 13
  • 5
0
votes
1 answer

zoom effect function with moviepy

i have many images are resized at 720x1280, so when I try to apply this zoom effect function to generate clips with moviepy def zoom_in_effect(clip, zoom_ratio=0.025): def effect(get_frame, t): img = Image.fromarray(get_frame(t)) …
fartoot
  • 15
  • 4
0
votes
0 answers

OpenCV & MoviePy - Analyzing video frames

I've been using OpenCV and MoviePy to get images out of a video (1 image per second) and once extracted, I analyze the image with pytesseract. The part where the script extract images takes quite a bit of time. Is it possible or is there a function…
0
votes
3 answers

Get the difference in loudness expressed in decibels

I need to figure out the difference in loudness between two files (A and B) expressed in decibels, so that I can pass this value to an application as an argument so file A's audible volume can be played back at a similar level as file B's. Borrowing…
Fnord
  • 5,365
  • 4
  • 31
  • 48
0
votes
0 answers

MoviePy error: failed to read the first frame of video file ****. That might mean that the file is corrupted

I am trying to reverse a video using MoviePy. My code is as under: - from moviepy.editor import VideoFileClip from moviepy.video.fx.all import time_mirror clip = VideoFileClip("udit.mp4") clip =…
0
votes
0 answers

How to concatenate multiple video(.mp4) files FAST in python using a python script

This is the current code i have and its too slow. I am a noobie programmer and have tried to use stuff like njit but it doesn't work. I need a script that merges multiple videos faster! from moviepy.editor import * import os from functools import…
0
votes
0 answers

how to merge all video files in a directory using Moviepy [solved]

I am trying to code a program that takes video files from a dir and merges them using moviepy. Sth like that: dir: file1, file2, file3 final_video = concatenate_videoclips(dir) found an answer: Combine mp4 files by order based on number from…
Sting3r
  • 3
  • 4
0
votes
1 answer

Moviepy videos not playing on YouTube

I am trying to upload videos made using moviepy to YouTube but when i finally upload them, i can't play them. The video playback stops at 6 seconds. (e.g. https://www.youtube.com/watch?v=CLSWs63ygH0). I've tried changing the audio codec from mp3 to…