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

Could not find encoder for codec id 27: Encoder not found #207

Closed
acodercat opened this issue May 29, 2019 · 7 comments
Closed

Could not find encoder for codec id 27: Encoder not found #207

acodercat opened this issue May 29, 2019 · 7 comments

Comments

@acodercat
Copy link

OpenCV: FFMPEG: tag 0x34363258/'X264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'
Could not find encoder for codec id 27: Encoder not found

@skvark
Copy link
Member

skvark commented May 29, 2019

H264 encoding is not supported because it falls under GPL license. See: #100

You must build OpenCV yourself and link it with system FFmpeg.

About licensing:

If I ship GPL'ed components with opencv-python I would have to re-license the whole package under GPL license and any package using opencv-python, respectively, would have to be licensed under GPL. This would also mean that this package or any package which uses opencv-python could not be used for commercial purposes / proprietary applications unless you are willing to publish your software source code.

@skvark skvark closed this as completed May 29, 2019
@leimao
Copy link

leimao commented Jul 29, 2020

This helps. Thank you.

@sunnie-star
Copy link

H264 encoding is not supported because it falls under GPL license. See: #100

You must build OpenCV yourself and link it with system FFmpeg.

About licensing:

If I ship GPL'ed components with opencv-python I would have to re-license the whole package under GPL license and any package using opencv-python, respectively, would have to be licensed under GPL. This would also mean that this package or any package which uses opencv-python could not be used for commercial purposes / proprietary applications unless you are willing to publish your software source code.

But how can I do?

@skvark
Copy link
Member

skvark commented Mar 31, 2021

H264 encoding is not supported because it falls under GPL license. See: #100
You must build OpenCV yourself and link it with system FFmpeg.
About licensing:
If I ship GPL'ed components with opencv-python I would have to re-license the whole package under GPL license and any package using opencv-python, respectively, would have to be licensed under GPL. This would also mean that this package or any package which uses opencv-python could not be used for commercial purposes / proprietary applications unless you are willing to publish your software source code.

But how can I do?

Follow the manual build instructions in the readme: https://github.com/opencv/opencv-python#manual-builds

@sunnie-star
Copy link

sunnie-star commented Mar 31, 2021 via email

@rajkundu
Copy link

If you are using conda, uninstalling OpenCV through pip and instead using conda install -c conda-forge opencv worked for me! I can run cv2.VideoWriter('out.mp4', cv2.VideoWriter_fourcc(*'avc1'), FPS, (WIDTH, HEIGHT)) without issues.

@relaxandcodezjmo
Copy link

If you are using conda, uninstalling OpenCV through pip and instead using conda install -c conda-forge opencv worked for me! I can run cv2.VideoWriter('out.mp4', cv2.VideoWriter_fourcc(*'avc1'), FPS, (WIDTH, HEIGHT)) without issues.

Thank you so much you saved my day! This IS the SOLUTION!

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

6 participants