📌  相关文章
📜  OpenCV: FFMPEG: tag 0x4745504d 'MPEG' is not supported with codec id 2 and format 'mp4 MP4 (MPEG-4 Part 14)' - Python Code Example

📅  最后修改于: 2022-03-11 14:45:41.399000             🧑  作者: Mango

代码示例1
# 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()