OpenCv in a project where ffmpeg already used

asked 2018-06-27 08:27:36 -0600

Binbin gravatar image

Hi there,

I'm using openCv C++ at work since 7 years with success for video capture, video writing and many other image porcessing stuffs. I've been recently forced to include a specific code for video capture that also uses ffmpeg. I managed to make it work but realized the video writing now produce a non valid video of few kbytes. It seems that only base DShow codecs are working. It always looked quite strange for me on how opencv_ffmpegxxx.dll is loaded because I never see it using "Dependency Walker". The result is the same as not having this dll. I'm facing this problems since several days and ti makes me crazy. Another problem is the Mat::copyTo or Mat::resize function doesn't work anymore when the target is a ROI of a Mat.

Any help would be appreciate

I'm using custom built OpenCv 3.4.1 for Windows & Msvc2013

Thanks

edit retag flag offensive close merge delete

Comments

because I never see it using "Dependency Walker".

yea, it's really loaded "dynamically", using LoadLibrary(), GetProcAddress(), etc. there is no "stub lib" linked, thus dependancy walker cannot see it.

but you need to have the opencv_ffmpg.dll on the PATH for anything video (file) related, all functionality for this is in there.

berak gravatar imageberak ( 2018-06-27 08:46:07 -0600 )edit

Thanks for the answer, I also load some libraries like this, haven't thought about it ... I have it and it worked for years, but since I've included ffmpeg, it's acting the same way the opencv_ffmpeg.dll file isn't present.

Binbin gravatar imageBinbin ( 2018-06-27 08:50:58 -0600 )edit

Do you think it worth trying to build OpenCv with GStreamer and no ffmpeg ?

Binbin gravatar imageBinbin ( 2018-06-27 08:52:30 -0600 )edit

only if you explicitly want to use gstreamer pipelines (imho)

berak gravatar imageberak ( 2018-06-27 09:19:29 -0600 )edit

it's acting the same way the opencv_ffmpeg.dll file isn't present.

yea, known problem.

berak gravatar imageberak ( 2018-06-27 09:21:28 -0600 )edit

So if it's a known problem and GStreamer not the solution, do you have any solution ?

Binbin gravatar imageBinbin ( 2018-06-29 04:18:47 -0600 )edit