0

Once I run the following code I receive: warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:545)

import cv2
import numpy as np
cap = cv2.VideoCapture('camera10.h264') #Captures h264 file from folder
while(cap.isOpened()):
    ret, frame = cap.read()

    gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

    cv2.imshow('frame', gray)
    if cv2.waitKey(20) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

The code was working about a week ago. It appears to be a ffmpeg issue. I have looked at the other ffmpeg issue on stackoverflow AND that did not help! Thank you.

kylel95
  • 139
  • 1
  • 6
  • 14
  • 1
    Since code is not eaten by bacteria or fungi, something has changed in that week... Does your program have the right privileges? Do you run it from the same user account? Could something have changed there? Is it really the same file your trying to read, not a new copy with different access rights? – Jacques de Hooge Jun 29 '15 at 20:03
  • Have you tried? http://stackoverflow.com/questions/12279833/videocapture-opencv-2-4-2-error-in-windows – Leb Jun 29 '15 at 20:17

0 Answers0