Providing Openh264 file on Windows and MacOS works but linux doesn't
@asenyaev is already working on this.
Since Apr 7, 2022.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
Expected behaviour
Writing to VideoWriter with fourcc avc1 while providing a openh264 file should be able to use the file on Linux and output via h264
Providing openh264-1.8.0-win64.dll on Windows allows this without issue
Providing libopenh264-1.8.0-osx64.4.dylib on MacOS allows this without issue
Providing libopenh264-1.8.0-linux64.4.so on Linux provides the error below
Related: #100
Actual behaviour
[ERROR:0@11.944] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2767) open Could not find encoder for codec_id=27, error: Encoder not found
[ERROR:0@11.944] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2839) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
Steps to reproduce
import cv2
video_out = cv2.VideoWriter('test.mp4', cv2.VideoWriter_fourcc(*'avc1'), 25.0, (640, 480))
5.16.0-kali1-amd64
OpenCV 4.5.5 installed via Pip
Issue submission checklist
- This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
- 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)
- 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")
- I'm using the latest version of
opencv-python
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.