其他分享
首页 > 其他分享> > video

video

作者:互联网

cap = cv2.VideoCapture("./data/2020-10-22-14-09-22.mp4")

frame = cap.read()

fourcc = cv2.VideoWriter_fourcc(*'MJPG')

videoname = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

# vout = cv2.VideoWriter('output/' + videoname + '.avi', fourcc, 30.0, (1280, 720))

vout = cv2.VideoWriter('output/'+videoname + '_tusimple.avi', fourcc, 20.0, (1280, 720))

while(1)

  rval,frame= cap.rean()

  if rval== false:

   break

 vout.write(frame)

 

标签:videoname,vout,frame,cap,cv2,video,fourcc
来源: https://www.cnblogs.com/ymec/p/14377542.html