-
win10+python38+opencv454+pyinstaller451 python code worked in both case:
but after package by pyinstaller, only work when and opecv_vidoeio_ffmepg454_64.dll is there. error like:
test code like:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hmm, judging by
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 Or, you can also try listing all available video stream backends at the start of your program, to see if the ffmpeg one is properly recognized: Example
import cv2
backends = cv2.videoio_registry.getStreamBackends()
print("Video stream backends:", backends)
for backend in backends:
print(f"Backend {backend}")
print(f" - name: {cv2.videoio_registry.getBackendName(backend)}")
built_in = cv2.videoio_registry.isBackendBuiltIn(backend)
print(f" - built-in: {built_in}")
if not built_in:
try:
print(f" - plugin version: {cv2.videoio_registry.getStreamBackendPluginVersion(backend)}")
except cv2.error:
print(f" - plugin version: failed to query") |
Beta Was this translation helpful? Give feedback.
Hmm, judging by
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…