From 686f76bc95838c0300089dfcc3b13e517fb097e6 Mon Sep 17 00:00:00 2001 From: "Josh.5" Date: Sat, 17 Sep 2022 20:41:20 +1200 Subject: [PATCH] Disable HW accelration on Neko (not sure why this is not working) --- Dockerfile | 11 ++++++++++- overlay/etc/cont-init.d/90-configure_neko.sh | 17 ++++++++++++----- overlay/etc/supervisor.d/neko.ini | 3 +++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dba256e..d6bc8e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -374,11 +374,17 @@ RUN \ && \ echo -# Setup browser audio streaming deps +# Setup video/audio streaming deps RUN \ echo "**** Update apt database ****" \ && apt-get update \ && \ + echo "**** Install Intel media drivers and VAAPI ****" \ + && apt-get install -y --no-install-recommends \ + intel-media-va-driver-non-free \ + libva2 \ + vainfo \ + && \ echo "**** Install audio streaming deps ****" \ && apt-get install -y --no-install-recommends \ bzip2 \ @@ -386,11 +392,14 @@ RUN \ gstreamer1.0-gl \ gstreamer1.0-gtk3 \ gstreamer1.0-libav \ + gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-base \ gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-ugly \ gstreamer1.0-pulseaudio \ gstreamer1.0-qt5 \ gstreamer1.0-tools \ + gstreamer1.0-vaapi \ gstreamer1.0-x \ libgstreamer1.0-0 \ libncursesw5 \ diff --git a/overlay/etc/cont-init.d/90-configure_neko.sh b/overlay/etc/cont-init.d/90-configure_neko.sh index a57a4de..6549d70 100644 --- a/overlay/etc/cont-init.d/90-configure_neko.sh +++ b/overlay/etc/cont-init.d/90-configure_neko.sh @@ -21,11 +21,18 @@ if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then fi # Configure hardware acceleration if it is not already set - if [[ -z ${NEKO_HWENC} ]]; then - # Enable VAAPI if device available - if [[ ! -z $(stat -c "%g" /dev/dri/render* | tail -n 1) ]]; then - export NEKO_HWENC=vaapi - fi + # if [[ -z ${NEKO_HWENC} ]]; then + # # Enable VAAPI if device available + # if [[ ! -z $(stat -c "%g" /dev/dri/render* | tail -n 1) ]]; then + # echo "Setting Neko to use VAAPI encoder" + # export NEKO_HWENC="VAAPI" + # # Check for vp8 vaapi encoder + # echo "Setting Neko to use 264 encoding" + # # export NEKO_VP8="false" + # # export NEKO_VP9="false" + # export NEKO_H264="true" + # fi + # fi fi else echo "Disable Neko server" diff --git a/overlay/etc/supervisor.d/neko.ini b/overlay/etc/supervisor.d/neko.ini index 5edb142..b77bb61 100644 --- a/overlay/etc/supervisor.d/neko.ini +++ b/overlay/etc/supervisor.d/neko.ini @@ -4,6 +4,9 @@ autostart=false autorestart=true priority=30 user=%(ENV_USER)s +# /usr/bin/neko serve --static "/var/www" --display ${DISPLAY} --bind :${PORT_NOVNC_WEB} +# /usr/bin/neko serve --static "/var/www" --display ${DISPLAY} --bind :${PORT_NOVNC_WEB} --nat1to1 $(ip route get 1 | awk '{print $(NF-2);exit}') --screen 1280x720@30 --hwenc VAAPI --h264 +# /usr/bin/neko serve --static "/var/www" --display ${DISPLAY} --bind :${PORT_NOVNC_WEB} --nat1to1 $(ip route get 1 | awk '{print $(NF-2);exit}') --screen 1280x720@30 --vp8 command=/usr/bin/neko serve --static "/var/www" --display %(ENV_DISPLAY)s --bind :%(ENV_PORT_NOVNC_WEB)s environment=HOME="/home/%(ENV_USER)s",USER="%(ENV_USER)s",DISPLAY="%(ENV_DISPLAY)s",XDG_RUNTIME_DIR="%(ENV_XDG_RUNTIME_DIR)s" stopsignal=INT