1 Star 0 Fork 4

bestluck2021/UDP_video_terminal

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bmp2mp4.py 452 Bytes
一键复制 编辑 原始数据 按行查看 历史
楚歌大人 提交于 2022-07-20 10:59 . 完成功能:
import cv2
img = cv2.imread('./testvideo/0.bmp')
imgInfo = img.shape
size = (imgInfo[1], imgInfo[0])
print(size)
videoWrite = cv2.VideoWriter('./video_mp4/CameraIrRaw.mp4', -1, 15, size)# 写入对象
# 参数:1 file name 2 编码器 3 帧率 4 size
# 1-50张图片
for i in range(841):
fileName = './testvideo/'+str(i)+'.bmp'
img = cv2.imread(fileName)
videoWrite.write(img) # 写入方法 1 jpg data
videoWrite.release()
print('end!')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/bestluck2021/udp_video_terminal.git
git@gitee.com:bestluck2021/udp_video_terminal.git
bestluck2021
udp_video_terminal
UDP_video_terminal
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385