Hi, I want to write a video from a frame file. Frames folder is this:
And this my codes. Where is the problem?
import cv2
import numpy as np
import glob
img_array = []
for filename in glob.glob('C:/Users/mustafa/Downloads/highway/highway/input/*.jpg'):
img = cv2.imread(filename)
height, width, layers = img.shape
size = (width,height)
img_array.append(img)
out = cv2.VideoWriter('hw.mp4',cv2.VideoWriter_fourcc(*'MP4V'), 24, size)
for i in range(len(img_array)):
out.write(img_array[i])
out.release()