opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.95k stars 55.62k forks source link

avc1 cap_ffmpeg_impl.hpp (3002) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter #22903

Open 3d-illusions opened 1 year ago

3d-illusions commented 1 year ago

System Information

cv2 version 4.6 windows 10 pro python 3.10.8 64bit

Detailed description

[libopenh264 @ 00000244d260ecc0] Incorrect library version loaded [ERROR:0@826.008] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2985) open Could not open codec libopenh264, error: Unspecified error (-22)
[ERROR:0@826.008] global /build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (3002) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter

Steps to reproduce

update to latest nvidia studio driver (maybe this is related as it only happened after installing)

526.98-desktop-win10-win11-64bit-international-nsd-dch-whql

try and open a video writer:

codec = 'avc1'
format = cv.VideoWriter_fourcc(*codec)

Issue submission checklist

3d-illusions commented 1 year ago

by the way, it still outputs a file. So possibly it looks somewhere else and finds it, or maybe it's falling back to another codec?

3d-illusions commented 1 year ago

doesn't this indicate the dll included with opencv needs updating to support latest gpu drivers?

3d-illusions commented 1 year ago

I'm downloading via pip opencv contrib, not building myself.

turbotimon commented 2 weeks ago

I have the same problem, does anybody have a solution for this?

Also, this ticket is marked as "dublicate" but the issue is not mentioned..