def start(self):
now = dt.datetime.now()
if len(self.path) !=0 and self.path[len(self.path)-1] != '/':
self.path = self.path + '/'
output_name = self.path + str(dt.datetime.date(now))+ '-0.avi'
video_num = 1
while os.path.isfile(output_name):
output_name = self.path +str(dt.datetime.date(now)) + '-'+str(video_num)+'.avi'
video_num = video_num + 1
fourcc = cv2.cv.CV_FOURCC(*'XVID')
self.out = cv2.VideoWriter(output_name,fourcc,self.framerate,(self.width,self.height))
return self
recordedCamera.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录