OpenCV中cv2.VideoWriter_fourcc()函数和cv2.VideoWriter()函数的结合使用
opencv
OpenCV: 开源计算机视觉库
项目地址:https://gitcode.com/gh_mirrors/opencv31/opencv
免费下载资源
·
一、VideoWriter_fourcc()常见的编码参数
| |
| |
| |
| |
| |
| |
| |
二、使用案例
import cv2
vid = cv2.VideoCapture('./ship.mp4')
video_frame_cnt = int(vid.get(7))
video_width = int(vid.get(3))
video_height = int(vid.get(4))
video_fps = int(vid.get(5))
f = cv2.VideoWriter_fourcc('M', 'P', '4', 'V')#VideoWriter_fourcc为视频编解码器
videoWriter = cv2.VideoWriter('./result.mp4', f, video_fps, (video_width, video_height))
GitHub 加速计划 / opencv31 / opencv
77.38 K
55.71 K
下载
OpenCV: 开源计算机视觉库
最近提交(Master分支:2 个月前 )
48668119
dnn: use dispatching for Winograd optimizations 2 天前
3dace76c
flann: remove unused hdf5 header 2 天前
更多推荐
已为社区贡献2条内容
所有评论(0)