How to solve warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:556) ?
Once I execute the following code I get this error:
warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:556)
I have looked at all of the similar answers on stackoverflow and they were not applicable to my problem. Thank you
import numpy as np
import cv2
import cv
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()