Skip to content

Instantly share code, notes, and snippets.

@Flojomojo
Created June 16, 2022 14:06
Show Gist options
  • Select an option

  • Save Flojomojo/658fc691ff55d0217e51a69e31ec98a3 to your computer and use it in GitHub Desktop.

Select an option

Save Flojomojo/658fc691ff55d0217e51a69e31ec98a3 to your computer and use it in GitHub Desktop.
build script for opencv using a custom ffmpeg installation
#!/bin/bash
# Note: You need to replace the path accordingly
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/insert/path/here/ffmpeg-4.4.1-5/lib
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/insert/path/here/ffmpeg-4.4.1-5/lib/pkgconfig
export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:/insert/path/here/ffmpeg-4.4.1-5/lib
cmake \
-D BUILD_EXAMPLES=ON \
-D BUILD_TESTS=OFF \
-D OPENCV_EXTRA_EXE_LINKER_FLAGS="-Wl,-rpath,/insert/path/here/ffmpeg-4.4.1-5/lib" \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=$HOME/Applications/opencv \
/insert/path/here/opencv-python/opencv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment