moviepy

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

MoviePy ValueError: t_start (60.00) should be smaller than the clip's duration (30.00) Question: 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") as f: times = …

Total answers: 1

How to add transitions between clips in moviepy?

How to add transitions between clips in moviepy? Question: My current attempt: This is my current code: from moviepy.editor import * clips = [VideoFileClip(‘a.mp4’), VideoFileClip(‘b.mp4’), VideoFileClip(‘c.mp4′)] transitioned_clips = [demo_clip.crossfadein(2) for demo_clip in clips] for_delivery = concatenate_videoclips(transitioned_clips) for_delivery.write_videofile(target_path, fps=clip.fps, bitrate=’%dK’ % (bitrate), threads=50, verbose=False, logger=None, preset=’ultrafast’) I also tried using CompositeVideoClip, but: It resulted in a …

Total answers: 1

FFMPEG with moviepy

FFMPEG with moviepy Question: I’m working on something that concatenate videos and adds some titles on through moviepy. As I saw on the web and on my on pc moviepy works on the CPU and takes a lot of time to save(render) a movie. Is there a way to improve the speed by running the …

Total answers: 4

How to flip an mp4 video horizontally in python?

How to flip an mp4 video horizontally in python? Question: I have looked into this in moviepy and ffmpeg but could only find how to rotate a video, and not flip it horizontally. Asked By: John Locke || Source Answers: In ffmpeg, its easy to flip a video horizontally: import ffmpeg stream = ffmpeg.input(‘input.mp4’) stream …

Total answers: 3

Moviepy still prints a progress bar even after setting `verbose` to `False`

Moviepy still prints a progress bar even after setting `verbose` to `False` Question: I tried to suppress the console output produced from moviepy when calling the “write_videofile” method. I passed the verbose argument as False to no avail. It still outputs something like: 0%| | 0/1624 [00:00<?, ?it/s] 0%| | 8/1624 [00:00<00:20, 77.64it/s] 1%| | …

Total answers: 6

Can't import moviepy.editor

Can't import moviepy.editor Question: i was trying to create an application with python using the moviepy library. I installed it using: pip install moviepy I found this from a MoviePy crash-course: # Import everything needed to edit video clips from moviepy.editor import * After trying to run this line i get this error: Python 2.7.13 …

Total answers: 5

Moviepy zooming effects need tweaking

Moviepy zooming effects need tweaking Question: 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, and to a bigger …

Total answers: 2

Cutting out a portion of video – python

How can I efficiently cut out part of a video? Question: I want to remove the first few seconds from a video that’s about 25 minutes long. I found the moviepy package, and tried writing this code: from moviepy.editor import * clip = VideoFileClip("video1.mp4").cutout(0, 7) clip.write_videofile("test.mp4") However, it’s very slow even for a single video. …

Total answers: 4