alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.52k stars 488 forks source link

driver_alvr_server.so: undefined symbol: av_vkfmt_from_pixfmt #1555

Closed literally-anything closed 1 year ago

literally-anything commented 1 year ago

Description

General Troubleshooting

Environment

Hardware

Note: for Linux, an upload to the hw-probe database is preferred: hw-probe -all -upload https://linux-hardware.org/?probe=7eeea6ba29

CPU: Ryzen 7 3700X

GPU: RTX 3080

Audio:

Installation

ALVR Version: 18.2.3

SteamVR Version: 1.26.1

Install Type:

OS Name and Version: Ubuntu 22.04.2 LTS

I have gotten the latest version on ALVR running on my pc, but i am trying to use ALXR which requires version 18.2.3. Every time I start steamvr, I get this message in the vrserver.txt:

Unable to load driver alvr_server from /home/hbaker/Documents/alvr_server_linux/lib64/alvr/bin/linux64/driver_alvr_server.so (/home/hbaker/Documents/alvr_server_linux/lib64/alvr/bin/linux64/driver_alvr_server.so: undefined symbol: av_vkfmt_from_pixfmt, version LIBAVUTIL_56)
Tue Apr 04 2023 15:34:08.621806 - ASSERT: "DriverManager alvr_server load error /home/hbaker/Documents/alvr_server_linux/lib64/alvr/bin/linux64/driver_alvr_server.so: undefined symbol: av_vkfmt_from_pixfmt, version LIBAVUTIL_56u" at /data/src/common/vrcommon/drivermanager.cpp:405.
Tue Apr 04 2023 15:34:08.621825 - Unable to load driver alvr_server because of error VRInitError_Init_FileNotFound(103). Skipping.
Tue Apr 04 2023 15:34:08.621887 - No connected devices found. Returning best error VRInitError_Init_HmdNotFound
Tue Apr 04 2023 15:34:08.621901 - Allowing driver load failure VRInitError_Init_HmdNotFound for application vrmonitor (155066) because it is VRApplication_VRMonitor

av_vkfmt_from_pixfmt seems to be part of ffmpeg, so i tried compiling and installing ffmpeg with these arguments:

./configure --prefix="/usr/local" --pkg-config-flags="--static" --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib" --extra-libs="-lpthread -lm" --ld="g++" --bindir="/usr/local/bin" --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-vulkan --enable-sdl2 --enable-shared --enable-static
mittorn commented 1 year ago

You need vulkan support in ffmpeg. ALVR uses direct vulkan image import in encoder

mittorn commented 1 year ago

ALSO pre-0.20 versions does not have frame renderer on linux, without FFR ALVR is nut much useful. I've made patch to ALXR that makes it compatible with 0.20.0-dev2, but did not try to build for android yet: https://github.com/mittorn/ALVR-ALXR/commit/14e3aed7faa0701b1148108c6ce0539ea9d881be ALVR protocol breaks in dev versions too often, mostly without a real reason, so i'm not sure if i update it again before final 0.20 release. Also protocol may someday break on rust stdlib update, because of DefaultHasher used in protocol, when docs forbids to rely on it XD Someone forget to read docs maybe

literally-anything commented 1 year ago

Thanks, ive gotten it working. I had two versions of ffmpeg installed, one with vulkan support, one without. Uninstalling ffmpeg using apt fixed it.