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

VideoWriter: failed to load codec library, yet video is processed and saved #1712

Open
michalgrzyska opened this issue Oct 16, 2024 · 0 comments

Comments

@michalgrzyska
Copy link

Summary of your issue

I receive an error that a codec lib is not found, yet my video is processed correctly.

Environment

win-64

What did you do when you faced the problem?

I am just trying to use VideoCapture with avc1, process frames and use VideoWriter. Regular operation.
I was using mp4v but those videos cannot be used in Messenger, WhatsApp etc.

Example code:

using VideoCapture capture = new(inputPath);
using VideoWriter writer = new(outputPath, FourCC.FromString("avc1"), capture.Fps, captureSize);

using Mat frame = new();

// ... blah blah blah, some loop processing video
{
    writer.Write(frame);
}

Output:

Failed to load OpenH264 library: openh264-1.8.0-win64.dll
        Please check environment and/or download library: https://github.com/cisco/openh264/releases

[libopenh264 @ 000002500358f440] Incorrect library version loaded
[ERROR:[email protected]] global cap_ffmpeg_impl.hpp:3194 open Could not open codec libopenh264, error: Unspecified error (-22)
[ERROR:[email protected]] global cap_ffmpeg_impl.hpp:3211 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter

What did you intend to be?

No error output. Video is processed anyway.

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

1 participant