Configure and Build Opencv to Custom Ffmpeg Install

Configure and Build OpenCV to Custom FFMPEG Install

Something like

export LD_LIBRARY_PATH=/ffmpeg_install_path/lib/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/ffmpeg_install_path/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:/ffmpeg_install_path/lib/

should work. At least it works for OpenCV 2.4.x on my Ubuntu.

OpenCV-Python installation (missing ffmpeg) - Windows

The latest conda-forge build contains FFMPEG now. Having miniconda or Anaconda in your computer, everything will be installed by running in the cmd or terminal:

conda install -c conda-forge opencv ffmpeg

Alternatively, menpo's channel recipes can also be used:

conda install -c menpo opencv3 ffmpeg

How to build OpenCV from source with python binding?

cmake -DBUILD_LIST=python3 .. solved the problem: getting clean install directory including python site-packages directory.

build python opencv with ffmpeg support on Heroku

The heroku-buildpack-python-opencv-scipy buildpack does not actually compile anything. It downloads already compiled environment and just plugs in into Heroku app.

But what you can do is to modify https://github.com/diogojc/heroku-buildpack-python-opencv-scipy/blob/master/Dockerfile to include ffmpeg. Then you can rebuild this container and change buildpack to download your modified version. It will require a lot of work, but I think that's the best option. Or you can find a another buildpack that will have all required libraries.

CMake Error at modules/videoio/cmake/detect_ffmpeg.cmake:16

I solved this error by building and installing OpenCV 4.4.0-pre + OpenCV-contrib (cloned the projects from GitHub) and built using CMake GUI and Visual Studio 2019 (with VS 2017 as C++ toolset platform).

  1. Open CMake GUI and choose the OpenCV sources and OpenCV build folder (output folder).

  2. Click on Configure and choose the Visual Studio 2019 or 2017, depends on what you have.

  3. Start the Configure process.

  4. Set WITH_CUDA and OPENCV_EXTRA_MODULES_PATH to path/to/opencv_contrib/modules

  5. Click on Configure.

  6. WITH_CUDNN option should now appear. Set WITH_CUDNN and OPENCV_DNN_CUDA.

  7. Click on Configure.

  8. Click on Generate.

  9. Open OpenCV.sln.

  10. Set Build to Release instead of Debug.

  11. Right-click on All_build and click on build.

  12. After finishing this process, click on INSTALL and repeat the same task (right-click and choose build).

  13. Close OpenCV.sln solution, open CMD and write python.

  14. Write >>import cv2 and hit enter, then write >>print(cv2.__version__).

  15. If you get OpenCV 4-4.0-pre (or another version) that means everything should work.

Build and Compile OpenCV with Python and GPU Support on Windows 10 VS2015

If you are following the guide correctly, this error wouldn't show up. Sometimes the windows registry entries may not be set correctly. This post is a useful one to check if your registry entries are set correctly.

After changing the registry entries, delete all the cmake files in the opencv directory, restart the cmake GUI and follow the guide again. You can also use this guide, that's what I used.



Related Topics



Leave a reply



Submit