import cv2 import os
dir_path = '/home/ji/YouTubeClips'
for name in os.listdir(dir_path): #count=count+1 video_id = name.split('.')[0] single_frame = '/home/frame_single/image/'+video_id+'.jpg' if not (os.path.isfile(single_frame) ):
video_file_path=os.path.join(dir_path, name)
print(video_file_path)
if (cap.isOpened()== False):
print("Error opening video stream or file")
total = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
if success:
cv2.imwrite(video_id+'.jpg',image)
vidcap.set(cv2.CAP_PROP_POS_MSEC,(count*65000)) # added this line
# save frame as JPEG file
help me to solve this issue