📅  最后修改于: 2022-03-11 14:45:41.399000             🧑  作者: Mango
# python 3.7
# Version of code that worked with CV2 version 3.4.10.37
import cv2
...
target_video = "name.mp4"
...
fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v')
outputStream = cv2.VideoWriter(target_video, fourcc, 20.0, (500,500))
...
outputStream.write(frame)
...
outputStream.release()