Python + Opencv
import cv2
import os
import pdb
cap = cv2.VideoCapture('xx.mp4')
image_dir ='xxx'
fps =cap.get(cv2.CAP_PROP_FPS)
size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)))
fourcc = cv2.VideoWriter_fourcc(*'XVID')
ii=0
while(cap.isOpened()):
ret, frame = cap.read()
#ii=ii+1
aa =str(ii)
s = aa.zfill(6)
image_name=os.path.join(image_dir+'/'+s+'.jpg')
print(image_name)
if ret==True:
#cv2.imwrite(frame,image_name)
cv2.imwrite(image_name,frame)
else:
break
ii=ii+1
cap.release()