Building gstreamer-vaapi headless, against current libva/i965 build

He Junyan junyan.he at hotmail.com
Mon Mar 7 05:34:19 UTC 2022


If you want to build a pure headless vaapi plugin, it is better to
enable "drm" option only in gstreamer-vaapi module, disable
x11,wayland,glx, and elg(see gstreamer-vaapi's meson_options.txt).So
far as I know, the udev lib is required for the drm only mode.  I guess
that your build may fail to build with the drm mode and continue with
the other modes(maybe your system has X11 headers installed).


On Sun, 2022-03-06 at 21:20 +0100, Philipp B via gstreamer-devel wrote:
> Hi!
> I am trying to build gstreamer 1.20 from source with gstreamer-
> vaapi,in headless mode (drm only), against all required vaapi
> dependenciesbuilt from source, provided in non-system directories.
> vainfo seems happy so far:
> -------------------------------------------------------------------
> ------------libva info: VA-API version 1.15.0libva info: User
> environment variable requested driver 'i965'libva info: Trying to
> open/home/ubuntu/streamer-
> bot/build/install_libva/lib/dri//i965_drv_video.solibva info: Found
> init function __vaDriverInit_1_15libva info: va_openDriver() returns
> 0vainfo: VA-API version: 1.15 (libva 2.15.0.pre1)vainfo: Driver
> version: Intel i965 driver for Intel(R) Haswell Mobile- 2.4.0.pre1
> (2.4.0.pre1)vainfo: Supported profile and
> entrypoints      VAProfileMPEG2Simple            :
> VAEntrypointVLD      VAProfileMPEG2Simple            :
> VAEntrypointEncSlice      VAProfileMPEG2Main              :
> VAEntrypointVLD      VAProfileMPEG2Main              :
> VAEntrypointEncSlice      VAProfileH264ConstrainedBaseline:
> VAEntrypointVLD      VAProfileH264ConstrainedBaseline:
> VAEntrypointEncSlice      VAProfileH264Main               :
> VAEntrypointVLD      VAProfileH264Main               :
> VAEntrypointEncSlice      VAProfileH264High               :
> VAEntrypointVLD      VAProfileH264High               :
> VAEntrypointEncSlice      VAProfileH264MultiviewHigh      :
> VAEntrypointVLD      VAProfileH264MultiviewHigh      :
> VAEntrypointEncSlice      VAProfileH264StereoHigh         :
> VAEntrypointVLD      VAProfileH264StereoHigh         :
> VAEntrypointEncSlice      VAProfileVC1Simple              :
> VAEntrypointVLD      VAProfileVC1Main                :
> VAEntrypointVLD      VAProfileVC1Advanced            :
> VAEntrypointVLD      VAProfileNone                   :
> VAEntrypointVideoProc      VAProfileJPEGBaseline           :
> VAEntrypointVLD----------------------------------------------------
> ---------------------------
> For gstreamer build, I am pointing meson to the correct path
> viaPKG_CONFIG_PATH. I set -Dvaapi=enabled.
> However, gstreamer-vaapi seems not to work. I do see
> libgstvaapi.sothat has been build.
> All tests are done with proper LD_LIBRARY_PATH set. VA driver path
> hasbeen set at libva built time, so that libva finds the driver
> withoutLIBVA_DRIVERS_PATH being set at runtime. (I tested with and
> withoutLIBVA_DRIVERS_PATH set).
> gst-inspect-1.0 does not list anything containing vaapi, no matter
> ifI add -a option or not.
> At runtime of my application (that kinda worked, to some point,
> withoutdated drivers, but never really rendered frames), I spot
> > Added plugin 'libgstvaapi.so' plugin with 0 features from binary
> > registry
> (with verbose logs, grepping for vaapi).
> Is this a clear indication that libgstvaapi.so is just something
> likean empty shell?
> Looking in the meson logs, I see
> 
> -------------------------------------------------------------------
> ------------Determining dependency 'libva' with pkg-config executable
> '/usr/bin/pkg-config'env[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> modversion libva` ->
> 01.15.0env[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> cflags libva` -> 0-I/home/ubuntu/streamer-
> bot/build/install_libva/includeenv[PKG_CONFIG_PATH]:/home/ubuntu/stre
> amer-
> bot/build/install_libva/lib/pkgconfigenv[PKG_CONFIG_ALLOW_SYSTEM_LIBS
> ]: 1Called `/usr/bin/pkg-config --libs libva` -> 0-
> L/home/ubuntu/streamer-bot/build/install_libva/lib
> -lvaenv[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> libs libva` -> 0-L/home/ubuntu/streamer-bot/build/install_libva/lib
> -lvaRun-time dependency libva found: YES 1.15.0Pkg-config binary for
> 1 is cached.Determining dependency 'libva-drm' with pkg-config
> executable'/usr/bin/pkg-
> config'env[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> modversion libva-drm` ->
> 01.15.0env[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> cflags libva-drm` -> 0-I/home/ubuntu/streamer-
> bot/build/install_libva/includeenv[PKG_CONFIG_PATH]:/home/ubuntu/stre
> amer-
> bot/build/install_libva/lib/pkgconfigenv[PKG_CONFIG_ALLOW_SYSTEM_LIBS
> ]: 1Called `/usr/bin/pkg-config --libs libva-drm` -> 0-
> L/home/ubuntu/streamer-bot/build/install_libva/lib -lva-drm
> -lvaenv[PKG_CONFIG_PATH]:/home/ubuntu/streamer-
> bot/build/install_libva/lib/pkgconfigCalled `/usr/bin/pkg-config --
> libs libva-drm` -> 0-L/home/ubuntu/streamer-
> bot/build/install_libva/lib -lva-drm -lvaRun-time dependency libva-
> drm found: YES 1.15.0Pkg-config binary for 1 is cached.------------
> -------------------------------------------------------------------
> but also
> h264_vaapi_encoder=0h264_vaapi_hwaccel=0...vaapi_1=0...h264_vaapi_enc
> oder=cbs_h264,cbsh264_vaapi_hwaccel=h264_decoder,atsc_a53,cabac,golom
> b,h264chroma,h264dsp,h264parse,h264pred,h264qpel,videodsp,error_resil
> ience,me_cmp...gstreamer-vaapi           : YES 1 warnings----------
> ---------------------------------------------------------------------
> (h264enc is what I want to use)
> A few questions here:- am I correct this is a configure-time
> problem?- Is gstreamer expected to work with VA-API version: 1.15
> ?previous (bad) builds I tried were configured against outdated
> systemlibs, trying to load current driver with them ended in
> symbol__vaDriverInit_1_15 not being used, because gstreamer looked
> for__vaDriverInit_1_0 (although the matching libva version was
> loadedfine). am not a gstreamer expert, but with with that
> experience, seeing"vaapi_1=0" in the configure logs made me
> suspicous, meson still looksfor 1_0.- in case gstreamer is not
> expected to work with api version 1.15,whats the latest version of
> https://github.com/intel/intel-vaapi-driver gstreamer is expected
> towork with? Should I use a corresponding libav version?- If this is
> a configure-time problem, how can I debug best, what theactual
> problem is- if this is a run-time problem, how can I debug best why a
> moduledoes not initialize as expected?
> Thanks for any help!Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220307/87a9b934/attachment-0001.htm>


More information about the gstreamer-devel mailing list