Ffmpeg build from source11/8/2022 ![]() ![]() My Slackware package was built with USEPATENTSNO i.e. I repeated the steps a 3rd time with release/4.4 and that worked. output) when you build ffmpeg from source using this SlackBuild. I switched to the release/3.4 branch of FFMPEG and repeated the steps. I used git's search function and found this commit: Author: Andreas Rheinhardt Īvcodec: Remove deprecated avcodec_get_context_defaults3ĭeprecated in 04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f. The latest version does not have it, old versions do. I then confirmed that the function was removed from ffmpeg. Therefore I believe this is a version compatibility issue between ffmpeg and opencv. Upon linking libavcodec.so, the avcodec_version() is found, but avcodec_get_context_defaults3() is not. I wrote a short program that calls avcodec_get_context_defaults3(.), as well as avcodec_version(), which is another function that should be in there. I was able to determine that it's not a linking problem. By switching to the release/4.4 branch and repeating my previous build steps I was able to successfully build opencv. This version removed some deprecated functions and was incompatible with my opencv version. I was compiling the master branch of ffmpeg. How do check where opencv is looking when linking? And is there a way I can check the shared libraries that ffmpeg generated to make sure they work? so files appear to be there: ls /usr/lib | grep libav D CMAKE_INSTALL_PREFIX="$HOME/opencv_build" \ D CMAKE_SHARED_LINKER_FLAGS='-latomic -L/usr/lib' \ D OPENCV_EXTRA_MODULES_PATH= $PWD/./opencv_contrib/modules \ opencv_sources -D CMAKE_BUILD_TYPE=RELEASE \ Then configure opencv (ffmpeg is detected) sudo cmake. #FFMPEG BUILD FROM SOURCE INSTALL#Then install it as a package: (so opencv cmake will detect it) sudo checkinstall -y -deldoc=yes -pkgversion=9999 -pkgname=ffmpeg I believe I have ffmpeg correctly compiled and installed. #FFMPEG BUILD FROM SOURCE HOW TO#I'm new to Linux, so I'm not exactly sure how to get started troubleshooting this. /lib/libopencv_videoio.so.4.5.3: undefined reference to `av_register_all' ![]() /lib/libopencv_videoio.so.4.5.3: undefined reference to `av_lockmgr_register' /lib/libopencv_videoio.so.4.5.3: undefined reference to `avcodec_get_context_defaults3' However when compiling opencv, I'm consistently getting these linker errors: /usr/bin/ld. To do this I need to include ffmpeg, and also build that from source. I'm trying to build opencv on a raspberry pi 4 with x264 support. I've been stuck on this problem for weeks. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |