Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoder for codec_id=27 not found? #1

Open
almarri0 opened this issue Oct 13, 2021 · 1 comment
Open

Encoder for codec_id=27 not found? #1

almarri0 opened this issue Oct 13, 2021 · 1 comment

Comments

@almarri0
Copy link

Hello, currently I am having this error as I run the code normally with aforementioned packages installed, my guess is it requires ffmpeg, and the could be by building an open-cv version which has ffmpeg, but still I am not quite sure, please advise

[ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2719) open Could not find encoder for codec_id=27, error: Encoder not found
[ERROR:0] global /tmp/pip-req-build-afu9cjzs/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2791) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter

@lanzani
Copy link
Owner

lanzani commented Oct 13, 2021

Hi!
The problem is related to the h264 codec, in fact due to a license incompatibility opencv can't be distributed with that. As alternative is used openh264 by cisco. But installing it alone didn't do much for me in order to solve the problem.

On windows I had a similar problem that I solved with this method.

On linux, after some research, I found out this where someone seems to have found a solution: here.
I have not tested this on my linux machine yet because it's having some other problems, but I will test it soon.

In conclusion, I think that if you need to use h264 video there are no workarounds, you need to compile opencv and use openh264.

Let me know if you have any problems :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants