Reading frame from video file and Install ffmpeg for window and python 2.7 ?
Hi. recently I am working on opencv python and I have a problem in reading a frame from video file. I tried many tutorial for this, but nothing works. I have ffmpeg installed, but still not worked. Plz, give any solution for this...... Here is a code i write for this:
import cv2 import numpy as np
cap = cv2.VideoCapture("video.mp4") while 1: _, frame = cap.read() cv2.imshow('videos',frame) #cv2.imwrite('logo.jpg',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break
cap.release() cv2.destroyAllWindows()
You must be logged in to post. Please login or register an account.