code:
from moviepy.editor import *
import os
Pictures = []
Path = 'Pictures_To_Use'
#Adding Pics to the Pictures arrray
for pics in os.listdir(Path):
clips = ImageClip(pics).set_duration(5)
Pictures.append(Path + "/" + pics)
#UI
Title = input("Please input a title:")
print("-" * 36)
print("Title:" + Title)
print("-" * 36)
print("The Following Pictures will be Used:")
print(Pictures)
print("-" * 36)
#Export video
video = concatenate_videoclips(clips, method="compose")
video.write_videofile(Title, fps=30)
error:
PS C:\Users\GeekZoid\Desktop\YTVideo Maker> python -u "c:\Users\GeekZoid\Desktop\YTVideo Maker\Main.py"
Traceback (most recent call last):
File "c:\Users\GeekZoid\Desktop\YTVideo Maker\Main.py", line 10, in <module>
clips = ImageClip(pics).set_duration(5)
^^^^^^^^^^^^^^^
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\video\VideoClip.py", line 889, in __init__
img = imread(img)
^^^^^^^^^^^
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\imageio\__init__.py", line 97, in imread
return imread_v2(uri, format=format, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\imageio\v2.py", line 226, in imread
with imopen(uri, "ri", **imopen_args) as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\imageio\core\imopen.py", line 113, in imopen
request = Request(uri, io_mode, format_hint=format_hint, extension=extension)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\imageio\core\request.py", line 248, in __init__
self._parse_uri(uri)
File "C:\Users\GeekZoid\AppData\Local\Programs\Python\Python311\Lib\site-packages\imageio\core\request.py", line 408, in _parse_uri
raise FileNotFoundError("No such file: '%s'" % fn)
FileNotFoundError: No such file: 'C:\Users\GeekZoid\Desktop\YTVideo Maker\Meme1.jpg
I have tried appending the File to an array as a path. I also tried using a for loop to run through the pictures array to set the duration of the pictures, But none of those solutions worked