opencv / opencv/opencv-python

Providing Openh264 file on Windows and MacOS works but linux doesn't

Aperta
#650 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@asenyaev ci sta già lavorando.

Dal 7/4/2022.

Lingua principale
Python
Stelle
5.4k
Fork
1k
Merge medio
22h 17m
PR unite (30g)
3

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.