Saundersx Apprentice
Joined: 11 Apr 2005 Posts: 290
|
Posted: Thu Sep 29, 2016 5:07 am Post subject: Steam fix for using vaapi for in-house streaming |
|
|
I was looking into some streaming issues and saw that steam was falling back to VDPAU on the receiving linux client. This script will substitute your version of vaapi over steam's. For me it lowered latency by about 5ms on average (according to their built in graph).
Run after every time steam updates itself. First make sure the directory structure is the same and all the files exist. No promises this will work for non-gentoo distros. If your missing files you probably need x11-libs/libva x11-libs/libvdpau
Code: | #!/bin/bash
# fix steams vaapi not working
# do not run as root
[[ "$(whoami)" == "root" ]] && su YOURUSERNAME -c $0 && exit
# check if steam has since updated itself
[[ -f ~/.steam/steam/ubuntu12_32/steam-runtime/fixup ]] && exit
cd ~/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/ || exit
echo "fixing 32bit."
mv vdpau{,.org}
ln -s /usr/lib64/vdpau
mv libvdpau.so.1.0.0{,.org}
ln -s /usr/lib64/libvdpau.so.1.0.0
rename .0 .0.org libva-glx.so.1.????.0 libva.so.1.????.0 libva-x11.so.1.????.0
rename .so.1 .so.1.org libva*.so.1
ln -s /usr/lib64/libva-glx.so.1.????.0
ln -s /usr/lib64/libva.so.1.????.0
ln -s /usr/lib64/libva-x11.so.1.????.0
ln -s libva-glx.so.1.????.0 libva-glx.so.1
ln -s libva.so.1.????.0 libva.so.1
ln -s libva-x11.so.1.????.0 libva-x11.so.1
cd ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ || exit
echo "fixing 64bit."
mv vdpau{,.org}
ln -s /usr/lib32/vdpau
mv libvdpau.so.1.0.0{,.org}
ln -s /usr/lib32/libvdpau.so.1.0.0
rename .0 .0.org libva-glx.so.1.????.0 libva.so.1.????.0 libva-x11.so.1.????.0
rename .so.1 .so.1.org libva*.so.1
ln -s /usr/lib32/libva-glx.so.1.????.0
ln -s /usr/lib32/libva.so.1.????.0
ln -s /usr/lib32/libva-x11.so.1.????.0
ln -s libva-glx.so.1.????.0 libva-glx.so.1
ln -s libva.so.1.????.0 libva.so.1
ln -s libva-x11.so.1.????.0 libva-x11.so.1
touch ~/.steam/steam/ubuntu12_32/steam-runtime/fixup
echo "done..."
|
Nothing is deleted only renamed, so if this messes everything up you can roll back easily. |
|