I'm trying to download clips online and merge them into one video, but I get this error, not sure why this is happening:
Traceback (most recent call last):
File "C:/Users/myalt/OneDrive/Desktop/pythonProject1/main.py", line 78, in <module>
merge()
File "C:/Users/myalt/OneDrive/Desktop/pythonProject1/main.py", line 56, in merge
video = concatenate_videoclips(clips, method='compose')
File "C:\Users\myalt\OneDrive\Desktop\pythonProject1\venv\lib\site-packages\moviepy\video\compositing\concatenate.py", line 75, in concatenate_videoclips
w = max(r[0] for r in sizes)
ValueError: max() arg is an empty sequence
def merge():
clips = []
clipPaths = [] # If you want to store the paths as well
for filename in os.listdir(r'clips//'):
# clips.append(filename)
clip = VideoFileClip(f'clips//{filename}')
clips.append(clip)
clipPaths.append(filename)
video = concatenate_videoclips(clips, method='compose')
video.write_videofile('Merged.mp4', fps=30)