You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a kinda messy way to do this using moviepy.
import os
import glob
from natsort import natsorted
from moviepy.editor import *
from pathlib import Path
base_dir = os.path.realpath("D:\\images")
print(base_dir)
fps = 24
file_list = glob.glob('D:\\images\\*.*') # Get all the files in the current directory (Only tested on jpgs and pngs)
file_list_sorted = natsorted(file_list,reverse=False) # Sort the images
for image in file_list_sorted:
print(image)
filename = Path(image).name
print(filename)
clips = [ImageClip(image).set_duration(15)]
concat_clip = concatenate_videoclips(clips, method="compose")
outputname = 'D:\\images\\outputz\\' + filename + 'output_video.mp4'
concat_clip.write_videofile(outputname, fps=fps)
It would be great if there was a way to import photos / images as well as videos and cut on the beat.
Is this something that has been concidered for the project?
The text was updated successfully, but these errors were encountered: