Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg: added openvino support #21151

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ilya-lavrenov
Copy link
Contributor

Specify library name and version: lib/1.0


Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/ffmpeg//'.

👋 @MartinDelille you might be interested. 😉

@conan-center-bot

This comment has been minimized.

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -450,6 +457,7 @@ def opt_append_disable_if_set(args, what, v):
opt_enable_disable("iconv", self.options.with_libiconv),
opt_enable_disable("libopenjpeg", self.options.with_openjpeg),
opt_enable_disable("libopenh264", self.options.with_openh264),
opt_enable_disable("libopenvino", self.options.with_openvino),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In old versions or when avfilter is True, this breaks because the option has been deleted. Maybe using get_safe is enough?

@conan-center-bot

This comment has been minimized.

@MartinDelille
Copy link
Contributor

Hi @ilya-lavrenov ! For my personal culture, what do allow openvino and ffmpeg ?

@ilya-lavrenov
Copy link
Contributor Author

ilya-lavrenov commented Nov 20, 2023

Hi @ilya-lavrenov ! For my personal culture, what do allow openvino and ffmpeg ?

https://www.phoronix.com/news/FFmpeg-OpenVINO-GPU

Shortly, FFMPEG has AI blocks in avfilter, which can be speeded up with OpenVINO.

@MartinDelille
Copy link
Contributor

What does AI blocks in avfilter is about ?

@ghost ghost mentioned this pull request Nov 28, 2023
3 tasks
@ghost ghost mentioned this pull request Dec 4, 2023
3 tasks
@@ -125,6 +126,7 @@ class FFMpegConan(ConanFile):
"with_freetype": True,
"with_openjpeg": True,
"with_openh264": True,
"with_openvino": True,
Copy link
Contributor

@SpaceIm SpaceIm Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to enable openvino in ffmpeg by default:

  • there are already too many dependencies enabled in ffmpeg recipe, and it will leak to other recipes like opencv.
  • openvino is a C++ library while ffmpeg is a C library
  • openvino recipe has too many common cases of ConanInvalidConfiguration (build_type=Debug, clang with libc++, only recent compilers while ffmpeg supports many compilers), it will leak to downstream recipes, not good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was done for testing purposes.
I agree that adding heavy dependency like OpenVINO should be done with False by default

@ghost ghost mentioned this pull request Jan 7, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@uilianries
Copy link
Member

I just updated this branch to follow the hotfix in spdlog in master branch.

@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Jan 25, 2024
3 tasks
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 2 (248ee2313d0bd503e6a07fce5aaafaf81b50363f):

  • ffmpeg/6.1:
    CI failed to create some packages (All logs)

    Logs for packageID 36a6e9d4b43abc29124b25f39b6f5ca14f4787fe:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=7
    os=Linux
    [options]
    ffmpeg:shared=False
    
    [...]
    dpkg-query: no packages found matching libxmu-dev
    dpkg-query: no packages found matching libxmuu-dev
    dpkg-query: no packages found matching libxpm-dev
    dpkg-query: no packages found matching libxrandr-dev
    dpkg-query: no packages found matching libxrender-dev
    dpkg-query: no packages found matching libxres-dev
    dpkg-query: no packages found matching libxss-dev
    dpkg-query: no packages found matching libxt-dev
    dpkg-query: no packages found matching libxtst-dev
    dpkg-query: no packages found matching libxv-dev
    dpkg-query: no packages found matching libxxf86vm-dev
    dpkg-query: no packages found matching libxcb-glx0-dev
    dpkg-query: no packages found matching libxcb-render0-dev
    dpkg-query: no packages found matching libxcb-render-util0-dev
    dpkg-query: no packages found matching libxcb-xkb-dev
    dpkg-query: no packages found matching libxcb-icccm4-dev
    dpkg-query: no packages found matching libxcb-image0-dev
    dpkg-query: no packages found matching libxcb-keysyms1-dev
    dpkg-query: no packages found matching libxcb-randr0-dev
    dpkg-query: no packages found matching libxcb-shape0-dev
    dpkg-query: no packages found matching libxcb-sync-dev
    dpkg-query: no packages found matching libxcb-xfixes0-dev
    dpkg-query: no packages found matching libxcb-xinerama0-dev
    dpkg-query: no packages found matching libxcb-dri3-dev
    dpkg-query: no packages found matching uuid-dev
    dpkg-query: no packages found matching libxcb-cursor-dev
    dpkg-query: no packages found matching libxcb-dri2-0-dev
    dpkg-query: no packages found matching libxcb-dri3-dev
    dpkg-query: no packages found matching libxcb-present-dev
    dpkg-query: no packages found matching libxcb-composite0-dev
    dpkg-query: no packages found matching libxcb-ewmh-dev
    dpkg-query: no packages found matching libxcb-res0-dev
    debconf: delaying package configuration, since apt-utils is not installed
    dpkg-query: no packages found matching libxcb-util-dev
    debconf: delaying package configuration, since apt-utils is not installed
    WARN: *** Conan 1 is legacy and on a deprecation path ***
    WARN: *** Please upgrade to Conan 2 ***
    WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by ffmpeg/6.1 to zlib/1.3.1 
    WARN: libpng/1.6.43: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3.1 
    WARN: protobuf/3.21.12: requirement zlib/[>=1.2.11 <2] overridden by openvino/2023.2.0 to zlib/1.3.1 
    WARN: openssl/3.2.1: requirement zlib/[>=1.2.11 <2] overridden by ffmpeg/6.1 to zlib/1.3.1 
    WARN: pulseaudio/14.2: requirement openssl/[>=1.1 <4] overridden by ffmpeg/6.1 to openssl/3.2.1 
    openvino/2023.2.0: WARN: openvino recipe builds GPU plugin without oneDNN (dGPU) support during static build, because CPU plugin compiled with different oneDNN version may cause ODR violation. To enable oneDNN support for GPU plugin, please, either use shared build configuration or disable CPU plugin by setting 'enable_cpu' option to False.
    ffmpeg/6.1: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    ffmpeg/6.1: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
    ffmpeg/6.1: ERROR: Package '36a6e9d4b43abc29124b25f39b6f5ca14f4787fe' build failed
    ffmpeg/6.1: WARN: Build folder /home/conan/workspace/prod-v1/bsr/28347/abdbc/.conan/data/ffmpeg/6.1/_/_/build/36a6e9d4b43abc29124b25f39b6f5ca14f4787fe/build-release
    ERROR: ffmpeg/6.1: Error in build() method, line 726
    	autotools.configure()
    	ConanException: Error 1 while executing "/home/conan/workspace/prod-v1/bsr/28347/abdbc/.conan/data/ffmpeg/6.1/_/_/build/36a6e9d4b43abc29124b25f39b6f5ca14f4787fe/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-libaom' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--enable-libopenvino' '--disable-vulkan' '--enable-libsvtav1' '--enable-libdav1d' '--arch=x86_64' '--cc=gcc' '--cxx=g++' '--extra-cflags=-m64 -fPIC -O3' '--extra-ldflags=-m64' 
    
  • ffmpeg/6.0.1:
    Didn't run or was cancelled before finishing

  • ffmpeg/6.0:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.0.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.1.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.1:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4.4:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.0:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.3.2:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.2.1:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 2 (248ee2313d0bd503e6a07fce5aaafaf81b50363f):

  • ffmpeg/6.0.1:
    Didn't run or was cancelled before finishing

  • ffmpeg/6.1:
    CI failed to create some packages (All logs)

    Logs for packageID 997490e522ee4e58468e21e3575ee58ef920db58:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    libtool/2.4.7: Package installed b647c43bfefae3f830561ca202b6cfd935b56205
    libtool/2.4.7: Downloaded package revision f4c8da5bffcf49cdf1b4ce011cab7737
    openvino/2023.2.0: Retrieving package b753e3065a506464f1b6493d924951d379d926f3 from remote 'conan-center' 
    openvino/2023.2.0: Downloading 104.5MB conan_package.tgz
    openvino/2023.2.0: Decompressing 104.5MB conan_package.tgz
    openvino/2023.2.0: Package installed b753e3065a506464f1b6493d924951d379d926f3
    openvino/2023.2.0: Downloaded package revision 7250669d7f173c9331cefe0eae3eeb9a
    pulseaudio/14.2: Retrieving package 3ccd173ab917968fc66c7121dcd52e8388a1ed47 from remote 'conan-center' 
    pulseaudio/14.2: Downloading 13.4MB conan_package.tgz
    pulseaudio/14.2: Decompressing 13.4MB conan_package.tgz
    pulseaudio/14.2: Package installed 3ccd173ab917968fc66c7121dcd52e8388a1ed47
    pulseaudio/14.2: Downloaded package revision ed3c4fde2d64919af7562ba0acb46284
    yasm/1.3.0: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/25265/eafac/p/yasm6a26ef75fa025/p/bin
    pkgconf/2.1.0: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    mpg123/1.31.2: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/25265/eafac/p/mpg12d35da3a7a5ab9/p/bin
    flac/1.4.2: Appending PATH environment variable: /home/conan/workspace/prod-v2/bsr/25265/eafac/p/flac14b90fabbd015/p/bin
    libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
    ffmpeg/6.1: Calling source() in /home/conan/workspace/prod-v2/bsr/25265/eafac/p/ffmpe0d6e6d754a4ce/s/src
    ffmpeg/6.1: Downloading 12.6MB eb7da3de7dd3ce48a9946ab447a7346bd11a3a85e6efb8f2c2ce637e7f547611
    ffmpeg/6.1: Sources for http://ffmpeg.org/releases/ffmpeg-6.1.tar.bz2 found in remote backup https://c3i.jfrog.io/artifactory/conan-center-backup-sources/
    
    -------- Installing package ffmpeg/6.1 (49 of 49) --------
    ffmpeg/6.1: Building from source
    ffmpeg/6.1: Package ffmpeg/6.1:997490e522ee4e58468e21e3575ee58ef920db58
    ffmpeg/6.1: Copying sources to build folder
    ffmpeg/6.1: Building your package in /home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b
    ffmpeg/6.1: Calling generate()
    ffmpeg/6.1: Generators folder: /home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/build-release/conan
    ffmpeg/6.1: Generating aggregated env files
    ffmpeg/6.1: Generated aggregated env files: ['conanbuild.sh']
    ffmpeg/6.1: Calling build()
    ffmpeg/6.1: apply_conandata_patches(): No patches defined in conandata
    ffmpeg/6.1: Calling:
     > "/home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' --pkg-config-flags=--static --disable-doc --disable-cross-compile --enable-asm --disable-shared --enable-static --enable-pic --enable-avdevice --enable-avcodec --enable-avformat --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-bzlib --enable-zlib --enable-lzma --enable-iconv --enable-libopenjpeg --enable-libopenh264 --enable-libvorbis --enable-libopus --disable-libzmq --disable-sdl2 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libfdk-aac --enable-libwebp --enable-libaom --enable-openssl --enable-alsa --enable-libpulse --enable-vaapi --enable-vdpau --enable-libxcb --enable-libxcb-shm --enable-libxcb-shape --enable-libxcb-xfixes --disable-appkit --disable-avfoundation --disable-coreimage --disable-audiotoolbox --disable-videotoolbox --disable-securetransport --disable-cuda --disable-cuvid --enable-nonfree --enable-gpl --enable-libopenvino --disable-vulkan --enable-libsvtav1 --enable-libdav1d --arch=x86_64 --cc=gcc --cxx=g++ '--extra-cflags=-m64 -fPIC -O3' --extra-ldflags=-m64 
    ffmpeg/6.1: RUN: "/home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' --pkg-config-flags=--static --disable-doc --disable-cross-compile --enable-asm --disable-shared --enable-static --enable-pic --enable-avdevice --enable-avcodec --enable-avformat --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-bzlib --enable-zlib --enable-lzma --enable-iconv --enable-libopenjpeg --enable-libopenh264 --enable-libvorbis --enable-libopus --disable-libzmq --disable-sdl2 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libfdk-aac --enable-libwebp --enable-libaom --enable-openssl --enable-alsa --enable-libpulse --enable-vaapi --enable-vdpau --enable-libxcb --enable-libxcb-shm --enable-libxcb-shape --enable-libxcb-xfixes --disable-appkit --disable-avfoundation --disable-coreimage --disable-audiotoolbox --disable-videotoolbox --disable-securetransport --disable-cuda --disable-cuvid --enable-nonfree --enable-gpl --enable-libopenvino --disable-vulkan --enable-libsvtav1 --enable-libdav1d --arch=x86_64 --cc=gcc --cxx=g++ '--extra-cflags=-m64 -fPIC -O3' --extra-ldflags=-m64 
    ERROR: libopenvino not found
    
    If you think configure made a mistake, make sure you are using the latest
    version from Git.  If the latest version fails, report the problem to the
    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
    Include the log file "ffbuild/config.log" produced by configure as this will help
    solve the problem.
    
    ffmpeg/6.1: ERROR: 
    Package '997490e522ee4e58468e21e3575ee58ef920db58' build failed
    ffmpeg/6.1: WARN: Build folder /home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/build-release
    ERROR: ffmpeg/6.1: Error in build() method, line 726
    	autotools.configure()
    	ConanException: Error 1 while executing
    
  • ffmpeg/6.0:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.1.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.0:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4.4:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.1:
    Didn't run or was cancelled before finishing

  • ffmpeg/5.0.3:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.3.2:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.2.1:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@ghost ghost mentioned this pull request May 15, 2024
2 tasks
@uilianries
Copy link
Member

Hello @ilya-lavrenov! Thank you for submitting OpenVino support in FFMpeg.

As you can see, the FFMpeg is not able to find openvino: https://c3i.jfrog.io/c3i/misc-v2/logs/pr/21151/2-linux-gcc/ffmpeg/6.1//997490e522ee4e58468e21e3575ee58ef920db58-build.txt

ffmpeg/6.1: Calling build()
ffmpeg/6.1: apply_conandata_patches(): No patches defined in conandata
ffmpeg/6.1: Calling:
 > "/home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' --pkg-config-flags=--static --disable-doc --disable-cross-compile --enable-asm --disable-shared --enable-static --enable-pic --enable-avdevice --enable-avcodec --enable-avformat --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-bzlib --enable-zlib --enable-lzma --enable-iconv --enable-libopenjpeg --enable-libopenh264 --enable-libvorbis --enable-libopus --disable-libzmq --disable-sdl2 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libfdk-aac --enable-libwebp --enable-libaom --enable-openssl --enable-alsa --enable-libpulse --enable-vaapi --enable-vdpau --enable-libxcb --enable-libxcb-shm --enable-libxcb-shape --enable-libxcb-xfixes --disable-appkit --disable-avfoundation --disable-coreimage --disable-audiotoolbox --disable-videotoolbox --disable-securetransport --disable-cuda --disable-cuvid --enable-nonfree --enable-gpl --enable-libopenvino --disable-vulkan --enable-libsvtav1 --enable-libdav1d --arch=x86_64 --cc=gcc --cxx=g++ '--extra-cflags=-m64 -fPIC -O3' --extra-ldflags=-m64 
ffmpeg/6.1: RUN: "/home/conan/workspace/prod-v2/bsr/25265/eafac/p/b/ffmpeff18c2dc0b24b/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' --pkg-config-flags=--static --disable-doc --disable-cross-compile --enable-asm --disable-shared --enable-static --enable-pic --enable-avdevice --enable-avcodec --enable-avformat --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-bzlib --enable-zlib --enable-lzma --enable-iconv --enable-libopenjpeg --enable-libopenh264 --enable-libvorbis --enable-libopus --disable-libzmq --disable-sdl2 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libfdk-aac --enable-libwebp --enable-libaom --enable-openssl --enable-alsa --enable-libpulse --enable-vaapi --enable-vdpau --enable-libxcb --enable-libxcb-shm --enable-libxcb-shape --enable-libxcb-xfixes --disable-appkit --disable-avfoundation --disable-coreimage --disable-audiotoolbox --disable-videotoolbox --disable-securetransport --disable-cuda --disable-cuvid --enable-nonfree --enable-gpl --enable-libopenvino --disable-vulkan --enable-libsvtav1 --enable-libdav1d --arch=x86_64 --cc=gcc --cxx=g++ '--extra-cflags=-m64 -fPIC -O3' --extra-ldflags=-m64 
ERROR: libopenvino not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the

I found similar reports like openvinotoolkit/openvino#11502 (comment) and https://patchwork.ffmpeg.org/project/ffmpeg/patch/PH7PR11MB5887027AF6937DA80DB24F7EDAE29@PH7PR11MB5887.namprd11.prod.outlook.com/ where people had problems to find OpenVino too.

The current configure script in FFMpeg looks be expecting an older version of OpenVino:

https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/6.1:/configure#l6783

enabled libopenvino       && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
                                 { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
                                   require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }

I know some libraries and headers changed over OpenVino releases, so linference_engine_c_api and also those headers are no longer available. Do you know what would be the actual library names for OpenVino 2024.2.0? I suspect libopenvino and libopenvino_c would be enough, but I don't know about the required headers.

Regards.

@uilianries uilianries self-assigned this Aug 1, 2024
@uilianries uilianries self-requested a review August 1, 2024 07:32
@uilianries
Copy link
Member

Following the current state, is not possible to add OpenVino in FFMpeg without a workaround.

The ffmpeg uses pkg-config to find openvino package and execute a test to validate it: https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/6.1:/configure#l6783

enabled libopenvino  check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create

That test fails, because the PkgConfigDeps generated, contains an absolute path to a library, returning it with the prefix -l<full_library_path> and failing on the compiler:

test_cc -DOPENVINO_STATIC_LIBRARY -DONNX_NAMESPACE=onnx -DONNX_ML=1 -D__STDC_FORMAT_MACROS -DONNX_NAMESPACE=onnx -DONNX_ML=1 -I/home/uilian/.conan2/p/openv462c2a7ba054e/p/include -I/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/include -I/home/uilian/.conan2/p/pugix14536e1aea3cd/p/include -I/home/uilian/.conan2/p/onnx5531708fe2f75/p/include -I/home/uilian/.conan2/p/snappf03a313ae7db9/p/include -I/home/uilian/.conan2/p/proto5794f10f7a310/p/include -I/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/include -I/home/uilian/.conan2/p/flatbef5218bf3e91f/p/include -L/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib -L/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/lib -L/home/uilian/.conan2/p/pugix14536e1aea3cd/p/lib -L/home/uilian/.conan2/p/onnx5531708fe2f75/p/lib -L/home/uilian/.conan2/p/snappf03a313ae7db9/p/lib -L/home/uilian/.conan2/p/proto5794f10f7a310/p/lib -L/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/lib -L/home/uilian/.conan2/p/openc2ea044392b40b/p/lib -L/home/uilian/.conan2/p/flatbef5218bf3e91f/p/lib
BEGIN /tmp/ffconf.66KhXzBZ/test.c
    1   #include <openvino/c/openvino.h>
    2   #include <stdint.h>
    3   long check_ov_core_create(void) { return (long) ov_core_create; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_ov_core_create) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.66KhXzBZ/test.c
gcc -DNDEBUG -I/home/uilian/.conan2/p/pulse4a50d4ea2c960/p/include -I/home/uilian/.conan2/p/libto8cf95cb727c3e/p/include -I/home/uilian/.conan2/p/openv462c2a7ba054e/p/include -I/home/uilian/.conan2/p/libsn743a1fd7be774/p/include -I/home/uilian/.conan2/p/onnx5531708fe2f75/p/include -I/home/uilian/.conan2/p/b/freetbde98003b7b51/p/include -I/home/uilian/.conan2/p/b/freetbde98003b7b51/p/include/freetype2 -I/home/uilian/.conan2/p/libsve1ca55cc6dd0c/p/include/svt-av1 -I/home/uilian/.conan2/p/opens1de9f8fdb65e1/p/include -I/home/uilian/.conan2/p/flac4f88173f6a013/p/include -I/home/uilian/.conan2/p/vorbi041cdff42df09/p/include -I/home/uilian/.conan2/p/proto5794f10f7a310/p/include -I/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/include -I/home/uilian/.conan2/p/libpn6b29b1c60f5a1/p/include -I/home/uilian/.conan2/p/dav1dc81649b0aede5/p/include -I/home/uilian/.conan2/p/libaoea7eb68dad3b5/p/include -I/home/uilian/.conan2/p/cpuin9c4ab80d6e1fe/p/include -I/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/include -I/home/uilian/.conan2/p/libal3c0a2efe606f2/p/include -I/home/uilian/.conan2/p/libcafb022612e3ab6/p/include -I/home/uilian/.conan2/p/libmp2f875eaa31ebd/p/include -I/home/uilian/.conan2/p/mpg12d35da3a7a5ab9/p/include -I/home/uilian/.conan2/p/opus924254d63da33/p/include -I/home/uilian/.conan2/p/opus924254d63da33/p/include/opus -I/home/uilian/.conan2/p/oggaeaa6d18c3328/p/include -I/home/uilian/.conan2/p/libic416f7e699ba2c/p/include -I/home/uilian/.conan2/p/libwe0ab986b34fa07/p/include -I/home/uilian/.conan2/p/b/libfd7e4bc2c378073/p/include -I/home/uilian/.conan2/p/libvp47a83f24538b4/p/include -I/home/uilian/.conan2/p/b/libx2c512026d17645/p/include -I/home/uilian/.conan2/p/b/libx2f2545228434cf/p/include -I/home/uilian/.conan2/p/flatbef5218bf3e91f/p/include -I/home/uilian/.conan2/p/snappf03a313ae7db9/p/include -I/home/uilian/.conan2/p/pugix14536e1aea3cd/p/include -I/home/uilian/.conan2/p/hwloc1aef31f2e985f/p/include -I/home/uilian/.conan2/p/b/openheaa5395733641/p/include -I/home/uilian/.conan2/p/openj05fe213c4811c/p/include -I/home/uilian/.conan2/p/openj05fe213c4811c/p/include/openjpeg-2.5 -I/home/uilian/.conan2/p/brotl360211fabd5fd/p/include -I/home/uilian/.conan2/p/brotl360211fabd5fd/p/include/brotli -I/home/uilian/.conan2/p/bzip24ed69d4fecc16/p/include -I/home/uilian/.conan2/p/xz_ut29141f4de7ce5/p/include -D_REENTRANT -DOPENVINO_STATIC_LIBRARY -DONNX_NAMESPACE=onnx -DONNX_ML=1 -D__STDC_FORMAT_MACROS -DFLAC__NO_DLL -DLZMA_API_STATIC -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -m64 -fPIC -O3 -m64 -fPIC -O3 -std=c11 -fomit-frame-pointer -fPIC -pthread -I/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/include -I/home/uilian/.conan2/p/libaoea7eb68dad3b5/p/include -I/home/uilian/.conan2/p/dav1dc81649b0aede5/p/include -I/home/uilian/.conan2/p/b/libfd7e4bc2c378073/p/include -I/home/uilian/.conan2/p/b/openheaa5395733641/p/include -I/home/uilian/.conan2/p/openj05fe213c4811c/p/include -I/home/uilian/.conan2/p/openj05fe213c4811c/p/include/openjpeg-2.5 -DOPENVINO_STATIC_LIBRARY -DONNX_NAMESPACE=onnx -DONNX_ML=1 -D__STDC_FORMAT_MACROS -DONNX_NAMESPACE=onnx -DONNX_ML=1 -I/home/uilian/.conan2/p/openv462c2a7ba054e/p/include -I/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/include -I/home/uilian/.conan2/p/pugix14536e1aea3cd/p/include -I/home/uilian/.conan2/p/onnx5531708fe2f75/p/include -I/home/uilian/.conan2/p/snappf03a313ae7db9/p/include -I/home/uilian/.conan2/p/proto5794f10f7a310/p/include -I/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/include -I/home/uilian/.conan2/p/flatbef5218bf3e91f/p/include -L/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib -L/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/lib -L/home/uilian/.conan2/p/pugix14536e1aea3cd/p/lib -L/home/uilian/.conan2/p/onnx5531708fe2f75/p/lib -L/home/uilian/.conan2/p/snappf03a313ae7db9/p/lib -L/home/uilian/.conan2/p/proto5794f10f7a310/p/lib -L/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/lib -L/home/uilian/.conan2/p/openc2ea044392b40b/p/lib -L/home/uilian/.conan2/p/flatbef5218bf3e91f/p/lib -c -o /tmp/ffconf.66KhXzBZ/test.o /tmp/ffconf.66KhXzBZ/test.c
gcc -m64 -Wl,-Bsymbolic,-znoexecstack -L/home/uilian/.conan2/p/pulse4a50d4ea2c960/p/lib -L/home/uilian/.conan2/p/pulse4a50d4ea2c960/p/lib/pulseaudio -L/home/uilian/.conan2/p/libto8cf95cb727c3e/p/lib -L/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib -L/home/uilian/.conan2/p/libsn743a1fd7be774/p/lib -L/home/uilian/.conan2/p/onnx5531708fe2f75/p/lib -L/home/uilian/.conan2/p/b/freetbde98003b7b51/p/lib -L/home/uilian/.conan2/p/libsve1ca55cc6dd0c/p/lib -L/home/uilian/.conan2/p/opens1de9f8fdb65e1/p/lib -L/home/uilian/.conan2/p/flac4f88173f6a013/p/lib -L/home/uilian/.conan2/p/vorbi041cdff42df09/p/lib -L/home/uilian/.conan2/p/proto5794f10f7a310/p/lib -L/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/lib -L/home/uilian/.conan2/p/libpn6b29b1c60f5a1/p/lib -L/home/uilian/.conan2/p/dav1dc81649b0aede5/p/lib -L/home/uilian/.conan2/p/libaoea7eb68dad3b5/p/lib -L/home/uilian/.conan2/p/cpuin9c4ab80d6e1fe/p/lib -L/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/lib -L/home/uilian/.conan2/p/libal3c0a2efe606f2/p/lib -L/home/uilian/.conan2/p/libcafb022612e3ab6/p/lib -L/home/uilian/.conan2/p/libmp2f875eaa31ebd/p/lib -L/home/uilian/.conan2/p/mpg12d35da3a7a5ab9/p/lib -L/home/uilian/.conan2/p/opus924254d63da33/p/lib -L/home/uilian/.conan2/p/oggaeaa6d18c3328/p/lib -L/home/uilian/.conan2/p/libic416f7e699ba2c/p/lib -L/home/uilian/.conan2/p/libwe0ab986b34fa07/p/lib -L/home/uilian/.conan2/p/b/libfd7e4bc2c378073/p/lib -L/home/uilian/.conan2/p/libvp47a83f24538b4/p/lib -L/home/uilian/.conan2/p/b/libx2c512026d17645/p/lib -L/home/uilian/.conan2/p/b/libx2f2545228434cf/p/lib -L/home/uilian/.conan2/p/flatbef5218bf3e91f/p/lib -L/home/uilian/.conan2/p/snappf03a313ae7db9/p/lib -L/home/uilian/.conan2/p/openc2ea044392b40b/p/lib -L/home/uilian/.conan2/p/pugix14536e1aea3cd/p/lib -L/home/uilian/.conan2/p/hwloc1aef31f2e985f/p/lib -L/home/uilian/.conan2/p/b/openheaa5395733641/p/lib -L/home/uilian/.conan2/p/openj05fe213c4811c/p/lib -L/home/uilian/.conan2/p/brotl360211fabd5fd/p/lib -L/home/uilian/.conan2/p/bzip24ed69d4fecc16/p/lib -L/home/uilian/.conan2/p/xz_ut29141f4de7ce5/p/lib -m64 -Wl,--as-needed -Wl,-z,noexecstack -DOPENVINO_STATIC_LIBRARY -DONNX_NAMESPACE=onnx -DONNX_ML=1 -D__STDC_FORMAT_MACROS -DONNX_NAMESPACE=onnx -DONNX_ML=1 -I/home/uilian/.conan2/p/openv462c2a7ba054e/p/include -I/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/include -I/home/uilian/.conan2/p/pugix14536e1aea3cd/p/include -I/home/uilian/.conan2/p/onnx5531708fe2f75/p/include -I/home/uilian/.conan2/p/snappf03a313ae7db9/p/include -I/home/uilian/.conan2/p/proto5794f10f7a310/p/include -I/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/include -I/home/uilian/.conan2/p/flatbef5218bf3e91f/p/include -L/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib -L/home/uilian/.conan2/p/onetb4c5f56eddd2b6/p/lib -L/home/uilian/.conan2/p/pugix14536e1aea3cd/p/lib -L/home/uilian/.conan2/p/onnx5531708fe2f75/p/lib -L/home/uilian/.conan2/p/snappf03a313ae7db9/p/lib -L/home/uilian/.conan2/p/proto5794f10f7a310/p/lib -L/home/uilian/.conan2/p/zlibcdd5270f9ab9f/p/lib -L/home/uilian/.conan2/p/openc2ea044392b40b/p/lib -L/home/uilian/.conan2/p/flatbef5218bf3e91f/p/lib -o /tmp/ffconf.66KhXzBZ/test /tmp/ffconf.66KhXzBZ/test.o -lopenvino_c -lopenvino_onnx_frontend -lopenvino_paddle_frontend -lopenvino_tensorflow_frontend -lopenvino_pytorch_frontend -lopenvino_tensorflow_lite_frontend -lopenvino -lopenvino_intel_cpu_plugin -lopenvino_onednn_cpu -lopenvino_snippets -lmlas -lopenvino_intel_gpu_plugin -lopenvino_intel_gpu_graph -lopenvino_intel_gpu_runtime -lopenvino_intel_gpu_kernels -lopenvino_auto_plugin -lopenvino_hetero_plugin -lopenvino_auto_batch_plugin -lopenvino_ir_frontend -lopenvino_onnx_frontend -lopenvino_onnx_common -lopenvino_tensorflow_frontend -lopenvino_tensorflow_lite_frontend -lopenvino_tensorflow_common -lopenvino_paddle_frontend -lopenvino_pytorch_frontend -lopenvino_reference -lopenvino_shape_inference -lopenvino_itt -lopenvino_util -l/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib/libopenvino.a -lm -ldl -lpthread -ltbb -lm -ldl -lrt -lpthread -lpugixml -lm -lonnx -lonnx_proto -lsnappy -lm -lstdc++ -lprotobuf -lm -lpthread -lz -lOpenCL -ldl -lpthread -lflatbuffers -lm
/usr/bin/ld: cannot find -l/home/uilian/.conan2/p/openv462c2a7ba054e/p/lib/libopenvino.a: No such file or directory

It requires further investigation over OpenVino, if this is something to be fixed in the recipe, or the PkgConfDeps should be smart enough when handling absolute paths.

I opened an issue to ConanCenterIndex with more details: #24795

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants