def shuffle2(self):
a=os.listdir(self.path)
filename=os.path.join(self.path,a[int(random.random()*len(a))])
self.video=cv2.VideoCapture(filename)
n=self.video.get(cv.CV_CAP_PROP_FRAME_COUNT)
self.currpos=int(random.random()*n)
self.video.set(cv.CV_CAP_PROP_POS_FRAMES,self.currpos)
评论列表
文章目录