Größe der Größe von Videoclips mit moviepyPython

Python-Programme
Anonymous
 Größe der Größe von Videoclips mit moviepy

Post by Anonymous »

Ich habe Moviepy verwendet, um einen Auto -Editor zum Aufstellen eines Clips und einen Clip unten zu erstellen. Ich habe Probleme, meine Clips zu ändern. Es wird mir nicht erlauben, den Befehl zur Größe des Größens zu verwenden, wenn ich ihn importiere. Dies ist der Code, den ich verwende: < /p>

Code: Select all

import os
import random
from moviepy.editor import VideoFileClip, CompositeVideoClip, concatenate_videoclips , clips_array, vfx, AudioFileClip, ImageClip
from moviepy.video.fx import resize

originalFolder = "c:\\Users\\me\\Desktop\\Content Software\\testfold"
list = os.listdir(originalFolder)

minecraftFolder = "c:\\Users\\me\\Desktop\\Content Software\\minecraft"

minecraftList = os.listdir(minecraftFolder)

def videoGen(minecraftList, list):
clipIndex = int(random.random()*len(list))
filePath1 = os.path.join(originalFolder, list[clipIndex])

overlayClip = VideoFileClip(filePath1)
minecraftIndex = int(random.random()*len(minecraftList))
filePath2 = os.path.join(originalFolder, list[minecraftIndex])

minecraftClip = VideoFileClip(filePath2)

clips = ([overlayClip], [minecraftClip])

combined = clips_array(clips)

combinedFinal = resize(combined, width=1080, height=1920)

combinedFinal.write_videofile("test.mp4")

videoGen(minecraftList, list)```

I keep getting this error message every time  I run the command:

Traceback (most recent call last):
File "c:\Users\me\Desktop\Content Software\Minecraft Video Gen.py", line 33, in 
videoGen(minecraftList, list)
File "c:\Users\me\Desktop\Content Software\Minecraft Video Gen.py", line 28, in videoGen
combinedFinal = resize(combined, width=1080, height=1920)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'module' object is not callable

What is it that I'm doing wrong that's causing my code to break? using combined.resize() hasn't worked for me either, I'm really confused because nothing in the docs are solving my problem.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post