Actually I was loading a video Using k=cv2.VideoCapture("it.mp4")
which is in the same folder but when I check it is opened or not it shows "False". and when i use k.open()
to open it, it shows me this error:
Traceback (most recent call last):
File "", line 1, in
TypeError: Required argument 'filename' (pos 1) not found
As I think it is not getting the file but the video is in the same folder. I am stuck on this since a long time.
Here is the code:-
import numpy as np
import cv2
cap=cv2.VideoCapture("it.mp4")
k=cap.isOpened()
if k==False:
cap.open()
And it shows the below error:-
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Required argument 'filename' (pos 1) not found