opencv-python icon indicating copy to clipboard operation
opencv-python copied to clipboard

open Could not find decoder for codec_id=56

Open liunx7594 opened this issue 2 years ago • 1 comments

Expected behaviour

I want to get the frame rate.

Actual behaviour

[ERROR:[email protected]] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1108) open Could not find decoder for codec_id=56 [ERROR:[email protected]] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (1140) open VIDEOIO/FFMPEG: Failed to initialize VideoCapture The frame rate obtained is 0.0

Steps to reproduce

import cv2

cap=cv2.VideoCapture(r"1.avi")
print(cap.get(5))

Windows 10 X64 python3.7.3 opencv-python 4.5.5.64

Issue submission checklist
  • [x] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • [x] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • [x] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • [x] I'm using the latest version of opencv-python

liunx7594 avatar Mar 29 '22 14:03 liunx7594

@liunx7594 Please provide more details on your setup: python version, opencv version, how you install it. Also video file is required for the issue debugging. OpenCV supports different back-ends for video decoding. Please run the reproducer with OPENCV_VIDEOIO_DEBUG=1 environment variable and share logs. See https://github.com/opencv/opencv/wiki/OpenCV-Debugging-Facilities for more details.

asmorkalov avatar Mar 30 '22 13:03 asmorkalov