學(xué)習(xí)筆記
#coding=utf-8
import cv2
fps = 24
fourcc = cv2.VideoWriter_fourcc(*'MJPG')
videoWriter = cv2.VideoWriter('test3678.avi', fourcc, fps, (1080,1920))
for i in range(1,100):
p2=i
img12 = cv2.imread('image/IMG_3678/'+str(p2)+'.jpg')
# cv2.imshow('img', img12)
# cv2.waitKey(1000/int(fps))
print(str(p2))
videoWriter.write(img12)
videoWriter.release()
成功合成了視頻萌焰,然而視頻打不開