First time here? Check out the FAQ!

Ask Your Question
0

Build OpenCV with my own ffmpeg build

asked Jul 19 '13

SergioBasurco gravatar image

Hi, The ffmpeg version OpenCV 246 is using has a bug reading h.264 streams. I'm trying it via RTSP from a IP camera. This bug has been reported to ffmpeg but I'm not sure it's been pulled yet to the latest release. http://ffmpeg.org/trac/ffmpeg/ticket/697

I want to build ffmpeg on my own patching the file they mention. Using this ffmpeg build I'd like to build OpenCV to support this fix. Maybe it can be included in the next version.

How do I build OpenCV using the ffmpeg build? Should I just replace the .dll files?

Thanks.

Preview: (hide)

2 answers

Sort by » oldest newest most voted
0

answered Jul 19 '13

Posted the answer for @SergioBasurco, so that he can accept the topic with a solution.

I just tried to answer to my own question but I can't since I'm a new user... it was a long post and went away :( Anyways, for those who need a solution asap, I solved it using gstreamer + openCV, which uses ffdec_h264 (from ffmpeg) as decoder, so I don't know where the bug is coming from and don't have time to debug it all over OpenCV. Gstreamer getting started How to merge it with OpenCV. I hope it helps someone, I'll file a report and answer here with the feedback when I have some time.

Preview: (hide)
1

answered Jul 19 '13

A better way to actually help out everyone is creating 2 things:

  1. A bug report at the correct section of the developer forum. Be sure to first check if any bugs concerning this problem exist. If so, add comments to that bug report.
  2. Provide a bugfix solution at the bugforum.
  3. Create a pull request from github, if you got the time.

This way, merging will go considerably faster. Most information on how to handle this is on the How to contribute page. This way it will get fixed in the next 2.4.7 release, and you don't have to wait until the new ffmpeg files are added to the openCV sourcecode base.

Preview: (hide)

Comments

And to answer your original problem, use the cmake, and build again, replacing the ffmpeg dll files. However, I am not sure if this won't create tons of extra files getting corrupted. Doing it the way I mentioned, will get an autobot to check against the code base and see if new problems arise.

StevenPuttemans gravatar imageStevenPuttemans (Jul 19 '13)edit
1

I'm currently in the process of building OpenCV with my own ffmpeg build. I'll try to formally report the bug, but it might not be an OpenCV issue but only ffmpeg's.

SergioBasurco gravatar imageSergioBasurco (Jul 19 '13)edit

I know, but this way it will get changed faster in the openCV supported ffmpeg files also.

StevenPuttemans gravatar imageStevenPuttemans (Jul 19 '13)edit

I just tried to answer to my own question but I can't since I'm a new user... it was a long post and went away :( Anyways, for those who need a solution asap, I solved it using gstreamer + openCV, which uses ffdec_h264 (from ffmpeg) as decoder, so I don't know where the bug is coming from and don't have time to debug it all over OpenCV. Gstreamer getting startedHow to merge it with OpenCV. I hope it helps someone, I'll file a report and answer here with the feedback when I have some time.

SergioBasurco gravatar imageSergioBasurco (Jul 19 '13)edit

Question Tools

Stats

Asked: Jul 19 '13

Seen: 2,681 times

Last updated: Jul 19 '13