Skip to content

cv2.videoCapture(0) worked but cv2.videoCapture("./camera_test.avi") not work in package exe #6679

Answered by rokm
xiang-zhe asked this question in Help
Discussion options

You must be logged in to vote

Hmm, judging by

[ERROR:0] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap.cpp (166) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.5.4-dev) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): ./camera_test.avi in function 'cv::icvExtractPattern'

OpenCV is for some reason treating the given file as image filename pattern instead of the video file (i.e., trying to use CV_IMAGES backend instead of ffmpeg one).


Can you setting OPENCV_VIDEOIO_DEBUG=1 environment variable to see more related debug messages and see what's going…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@rokm
Comment options

@rokm
Comment options

@xiang-zhe
Comment options

@rokm
Comment options

@xiang-zhe
Comment options

Answer selected by xiang-zhe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants