<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="text-align:left; direction:ltr;"><div>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).</div><div>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).</div><div><br></div><div><br></div><div><br></div><div>On Sun, 2022-03-06 at 21:20 +0100, Philipp B via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Hi!</pre><pre><br></pre><pre>I am trying to build gstreamer 1.20 from source with gstreamer-vaapi,</pre><pre>in headless mode (drm only), against all required vaapi dependencies</pre><pre>built from source, provided in non-system directories.</pre><pre><br></pre><pre>vainfo seems happy so far:</pre><pre><br></pre><pre>-------------------------------------------------------------------------------</pre><pre>libva info: VA-API version 1.15.0</pre><pre>libva info: User environment variable requested driver 'i965'</pre><pre>libva info: Trying to open</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/dri//i965_drv_video.so</pre><pre>libva info: Found init function __vaDriverInit_1_15</pre><pre>libva info: va_openDriver() returns 0</pre><pre>vainfo: VA-API version: 1.15 (libva 2.15.0.pre1)</pre><pre>vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile</pre><pre>- 2.4.0.pre1 (2.4.0.pre1)</pre><pre>vainfo: Supported profile and entrypoints</pre><pre> VAProfileMPEG2Simple : VAEntrypointVLD</pre><pre> VAProfileMPEG2Simple : VAEntrypointEncSlice</pre><pre> VAProfileMPEG2Main : VAEntrypointVLD</pre><pre> VAProfileMPEG2Main : VAEntrypointEncSlice</pre><pre> VAProfileH264ConstrainedBaseline: VAEntrypointVLD</pre><pre> VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice</pre><pre> VAProfileH264Main : VAEntrypointVLD</pre><pre> VAProfileH264Main : VAEntrypointEncSlice</pre><pre> VAProfileH264High : VAEntrypointVLD</pre><pre> VAProfileH264High : VAEntrypointEncSlice</pre><pre> VAProfileH264MultiviewHigh : VAEntrypointVLD</pre><pre> VAProfileH264MultiviewHigh : VAEntrypointEncSlice</pre><pre> VAProfileH264StereoHigh : VAEntrypointVLD</pre><pre> VAProfileH264StereoHigh : VAEntrypointEncSlice</pre><pre> VAProfileVC1Simple : VAEntrypointVLD</pre><pre> VAProfileVC1Main : VAEntrypointVLD</pre><pre> VAProfileVC1Advanced : VAEntrypointVLD</pre><pre> VAProfileNone : VAEntrypointVideoProc</pre><pre> VAProfileJPEGBaseline : VAEntrypointVLD</pre><pre>-------------------------------------------------------------------------------</pre><pre><br></pre><pre>For gstreamer build, I am pointing meson to the correct path via</pre><pre>PKG_CONFIG_PATH. I set -Dvaapi=enabled.</pre><pre><br></pre><pre>However, gstreamer-vaapi seems not to work. I do see libgstvaapi.so</pre><pre>that has been build.</pre><pre><br></pre><pre>All tests are done with proper LD_LIBRARY_PATH set. VA driver path has</pre><pre>been set at libva built time, so that libva finds the driver without</pre><pre>LIBVA_DRIVERS_PATH being set at runtime. (I tested with and without</pre><pre>LIBVA_DRIVERS_PATH set).</pre><pre><br></pre><pre>gst-inspect-1.0 does not list anything containing vaapi, no matter if</pre><pre>I add -a option or not.</pre><pre><br></pre><pre>At runtime of my application (that kinda worked, to some point, with</pre><pre>outdated drivers, but never really rendered frames), I spot</pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Added plugin 'libgstvaapi.so' plugin with 0 features from binary registry</pre></blockquote><pre>(with verbose logs, grepping for vaapi).</pre><pre><br></pre><pre>Is this a clear indication that libgstvaapi.so is just something like</pre><pre>an empty shell?</pre><pre><br></pre><pre>Looking in the meson logs, I see</pre><pre><br></pre><pre><br></pre><pre>-------------------------------------------------------------------------------</pre><pre>Determining dependency 'libva' with pkg-config executable '/usr/bin/pkg-config'</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --modversion libva` -> 0</pre><pre>1.15.0</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --cflags libva` -> 0</pre><pre>-I/home/ubuntu/streamer-bot/build/install_libva/include</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1</pre><pre>Called `/usr/bin/pkg-config --libs libva` -> 0</pre><pre>-L/home/ubuntu/streamer-bot/build/install_libva/lib -lva</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --libs libva` -> 0</pre><pre>-L/home/ubuntu/streamer-bot/build/install_libva/lib -lva</pre><pre>Run-time dependency libva found: YES 1.15.0</pre><pre>Pkg-config binary for 1 is cached.</pre><pre>Determining dependency 'libva-drm' with pkg-config executable</pre><pre>'/usr/bin/pkg-config'</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --modversion libva-drm` -> 0</pre><pre>1.15.0</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --cflags libva-drm` -> 0</pre><pre>-I/home/ubuntu/streamer-bot/build/install_libva/include</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1</pre><pre>Called `/usr/bin/pkg-config --libs libva-drm` -> 0</pre><pre>-L/home/ubuntu/streamer-bot/build/install_libva/lib -lva-drm -lva</pre><pre>env[PKG_CONFIG_PATH]:</pre><pre>/home/ubuntu/streamer-bot/build/install_libva/lib/pkgconfig</pre><pre>Called `/usr/bin/pkg-config --libs libva-drm` -> 0</pre><pre>-L/home/ubuntu/streamer-bot/build/install_libva/lib -lva-drm -lva</pre><pre>Run-time dependency libva-drm found: YES 1.15.0</pre><pre>Pkg-config binary for 1 is cached.</pre><pre>-------------------------------------------------------------------------------</pre><pre><br></pre><pre>but also</pre><pre><br></pre><pre>h264_vaapi_encoder=0</pre><pre>h264_vaapi_hwaccel=0</pre><pre>...</pre><pre>vaapi_1=0</pre><pre>...</pre><pre>h264_vaapi_encoder=cbs_h264,cbs</pre><pre>h264_vaapi_hwaccel=h264_decoder,atsc_a53,cabac,golomb,h264chroma,h264dsp,h264parse,h264pred,h264qpel,videodsp,error_resilience,me_cmp</pre><pre>...</pre><pre>gstreamer-vaapi : YES 1 warnings</pre><pre>-------------------------------------------------------------------------------</pre><pre><br></pre><pre>(h264enc is what I want to use)</pre><pre><br></pre><pre>A few questions here:</pre><pre>- am I correct this is a configure-time problem?</pre><pre>- Is gstreamer expected to work with VA-API version: 1.15 ?</pre><pre>previous (bad) builds I tried were configured against outdated system</pre><pre>libs, trying to load current driver with them ended in symbol</pre><pre>__vaDriverInit_1_15 not being used, because gstreamer looked for</pre><pre>__vaDriverInit_1_0 (although the matching libva version was loaded</pre><pre>fine).</pre><pre> am not a gstreamer expert, but with with that experience, seeing</pre><pre>"vaapi_1=0" in the configure logs made me suspicous, meson still looks</pre><pre>for 1_0.</pre><pre>- in case gstreamer is not expected to work with api version 1.15,</pre><pre>whats the latest version of</pre><a href="https://github.com/intel/intel-vaapi-driver"><pre>https://github.com/intel/intel-vaapi-driver</pre></a><pre> gstreamer is expected to</pre><pre>work with? Should I use a corresponding libav version?</pre><pre>- If this is a configure-time problem, how can I debug best, what the</pre><pre>actual problem is</pre><pre>- if this is a run-time problem, how can I debug best why a module</pre><pre>does not initialize as expected?</pre><pre><br></pre><pre>Thanks for any help!</pre><pre>Philipp</pre></blockquote></body></html>