首先安装  

pip install opencv-python -i https://pypi.douban.com/simple/

code

import cv2
vidcap = cv2.VideoCapture('%93%81%E7%BB%8F%E7%90%86.mp4')
success,image = vidcap.read()
n=1
while n < 30:
    success, image = vidcap.read()
    n+=1
imag = cv2.imwrite('fdfd2.jpg',image)
if imag ==True:
    print('ok')

 

 

 

 

相关文章:

  • 2021-11-07
  • 2022-02-14
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-10-12
  • 2021-08-08
相关资源
相似解决方案