From 1969c3e40986196ea562de85e07b33acbf58a0d5 Mon Sep 17 00:00:00 2001 From: Tyler Marques Date: Mon, 17 Mar 2025 15:40:32 -0400 Subject: [PATCH] WIP: Fullscreen, working stream. Need to default to playing, as well as have a default game load --- docker-compose.yaml | 1 - twitch-streamer/Dockerfile | 3 ++- twitch-streamer/entrypoint.sh | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index e18fcba..88f9be4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,6 @@ services: - SYS_ADMIN environment: - DISPLAY=:99 - - SCREEN_GEOMETRY=1920x1080x24 diplomacy: build: ai_animation diff --git a/twitch-streamer/Dockerfile b/twitch-streamer/Dockerfile index 80dfa86..1b9496d 100644 --- a/twitch-streamer/Dockerfile +++ b/twitch-streamer/Dockerfile @@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ fonts-liberation \ pulseaudio \ + fluxbox \ dbus dbus-x11 \ && rm -rf /var/lib/apt/lists/* @@ -31,7 +32,7 @@ RUN groupadd --system chrome \ # Environment variables for the virtual display ENV DISPLAY=:1 -ENV SCREEN_GEOMETRY=1920x1280x30 +ENV SCREEN_GEOMETRY=1920x1080x24 # Copy PulseAudio and entrypoint scripts RUN mkdir /twitch-streamer/ diff --git a/twitch-streamer/entrypoint.sh b/twitch-streamer/entrypoint.sh index 3dbef76..0b5cb79 100755 --- a/twitch-streamer/entrypoint.sh +++ b/twitch-streamer/entrypoint.sh @@ -11,9 +11,8 @@ fi /twitch-streamer/pulse-virtual-audio.sh & # Start Xvfb (the in-memory X server) in the background -Xvfb $DISPLAY -screen 0 $SCREEN_GEOMETRY & +Xvfb $DISPLAY -screen 0 1920x1080x24 & echo "Display is ${DISPLAY}" -XVFB_PID=$! # Give Xvfb a moment to start sleep 2 @@ -25,14 +24,15 @@ mkdir -p /home/chrome # --no-sandbox / --disable-gpu often needed in Docker # --use-fake-device-for-media-stream / etc. if you need to simulate mic/cam DISPLAY=$DISPLAY google-chrome \ - --start-fullscreen \ --disable-gpu \ + --disable-dev-shm-usage \ --no-first-run \ - --diable-infobars \ + --disable-infobars \ --user-data-dir=/home/chrome/chrome-data \ - --app="http://diplomacy:4173" & + --window-size=1920,1080 --window-position=0,0 \ + --kiosk \ + "http://diplomacy:4173" & -CHROME_PID=$! sleep 5 # let the page load or animations start # Start streaming with FFmpeg.