Files
twitch4steamdeck/flatpak/tv.twitch4steamdeck.App.yml
T
Andre 028e56e2cb Fix für Resume und R2-Seeking bei fMP4-VODs auf dem Steam Deck
- ffmpeg-full im Flatpak eingebunden für vollständiges H.264/VAAPI-Decoding
  - Trigger-Repeat für L2/R2 deaktiviert, um gestapelte 300s-Seeks zu vermeiden
  - fMP4-HLS-Playlists über EXT-X-MAP erkannt
  - große fMP4-Seeks nicht mehr per In-Stream-Seek, sondern per Reload einer getrimmten Playlist
  - getrimmte Playlists über localhost statt file:// ausgeliefert
  - absoluten Playback-Offset eingeführt, damit mehrfaches R2 korrekt weiter vorspult
  - B Button ermöglicht, mit der selektierung zurück zum sidemenu zurückzukehren
  - Logging Schalter dem Einstellungs Screen hinzugefügt
2026-04-12 15:19:26 +02:00

216 lines
12 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
app-id: tv.twitch4steamdeck.App
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
# Stellt Chrome-Runtime-Bibliotheken (GTK, GLib, etc.) + zypak-wrapper bereit.
# Das Electron-Binary selbst kommt aus node_modules/electron/dist/electron (npm install in WSL2).
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
command: twitch4steamdeck
# ffmpeg-full: Stellt den vollen FFmpeg-Codec-Stack bereit (h264, h264_vaapi, etc.).
# Das freedesktop SDK 24.08 liefert nur ein reduziertes FFmpeg ohne patentbehaftete Codecs,
# daher hat mpv sonst nur libopenh264 — zu langsam fuer Seek-Recovery bei HLS-VODs.
add-extensions:
org.freedesktop.Platform.ffmpeg-full:
directory: lib/ffmpeg
version: '24.08'
add-ld-path: .
no-autodownload: false
autodelete: false
finish-args:
- --share=network # Twitch Helix-API + Streamlink (HLS)
- --share=ipc # X11 shared memory (Wayland-Fallback)
- --socket=wayland
- --socket=fallback-x11
- --socket=pulseaudio # Audio für mpv
- --device=all # GPU + /dev/input/* (Gamepad API braucht Input-Devices)
- --talk-name=org.freedesktop.Notifications
# Electron userData liegt automatisch in ~/.var/app/tv.twitch4steamdeck.App/config/
# Kein extra --filesystem nötig.
# Build-Voraussetzung (WSL2, VOR flatpak-builder):
# cd /mnt/c/Projekte/twitch4steamdeck
# npm install # installiert Electron 33 für Linux + alle Deps
# npx @electron/rebuild # rebuildet better-sqlite3 für Linux x64
# npm run build # kompiliert TS → out/
# Das Projektverzeichnis (inkl. out/ und node_modules/) wird als type:dir Source
# in den Manifest-Build-Schritt kopiert.
modules:
# ─────────────────────────────────────────────────────────────────────────────
# 1a) libass — Untertitel-Rendering (nicht im freedesktop SDK 24.08 enthalten)
# ─────────────────────────────────────────────────────────────────────────────
- name: libass
config-opts:
- --disable-static
- --libdir=/app/lib
sources:
- type: archive
url: https://github.com/libass/libass/releases/download/0.17.3/libass-0.17.3.tar.gz
sha256: da7c348deb6fa6c24507afab2dee7545ba5dd5bbf90a137bfe9e738f7df68537
# ─────────────────────────────────────────────────────────────────────────────
# 1b) libplacebo — Pflicht-Abhängigkeit für mpv 0.38+ (gpu-next renderer)
# vulkan=disabled: kein Vulkan-Renderer, OpenGL/EGL+VAAPI reicht für uns.
# shaderc + lcms2 kommen aus dem freedesktop SDK 24.08.
# ─────────────────────────────────────────────────────────────────────────────
- name: libplacebo
buildsystem: meson
config-opts:
- -Dlibdir=lib
- -Dvulkan=disabled
- -Dglslang=disabled
- -Dshaderc=enabled
- -Dlcms=enabled
- -Ddemos=false
- -Dtests=false
sources:
- type: archive
# Lokaler Tarball mit glad2-Submodul (GitHub-Tarball enthält Submodule nicht).
# Erstellen: siehe flatpak/build-flatpak.sh oder README.
# In WSL2: liegt unter ~/twitch4steamdeck/flatpak/libplacebo-6.338.2-full.tar.gz
path: libplacebo-6.338.2-full.tar.gz
sha256: 7f5da41b872302208f0e10c22d3e108ab9fdb1f253eb47c18651698c65d6b426
# ─────────────────────────────────────────────────────────────────────────────
# 1c) libXpresent — X11-Extension für VSync/Frame-Timing (mpv X11-Dependency)
# ─────────────────────────────────────────────────────────────────────────────
- name: libxpresent
buildsystem: autotools
sources:
- type: archive
url: https://xorg.freedesktop.org/releases/individual/lib/libXpresent-1.0.1.tar.xz
sha256: b964df9e5a066daa5e08d2dc82692c57ca27d00b8cc257e8e960c9f1cf26231b
# ─────────────────────────────────────────────────────────────────────────────
# 1d) Lua 5.2 — Laufzeit + Dev-Dateien für mpv-Scripts/OSC/ytdl-Hooks
# ─────────────────────────────────────────────────────────────────────────────
- name: lua
buildsystem: simple
build-commands:
- make clean
- make linux MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS"
- make INSTALL_TOP=/app INSTALL_INC=/app/include/lua5.2 INSTALL_LIB=/app/lib INSTALL_MAN=/app/share/man install
- mkdir -p /app/lib/pkgconfig
- |
cat > /app/lib/pkgconfig/lua52.pc <<'EOF'
prefix=/app
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/lua5.2
Name: Lua
Description: Embedded scripting language
Version: 5.2.4
Libs: -L${libdir} -llua -lm -ldl
Cflags: -I${includedir}
EOF
- cp /app/lib/pkgconfig/lua52.pc /app/lib/pkgconfig/lua5.2.pc
- cp /app/lib/pkgconfig/lua52.pc /app/lib/pkgconfig/lua-5.2.pc
sources:
- type: archive
url: https://www.lua.org/ftp/lua-5.2.4.tar.gz
sha256: b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b
# ─────────────────────────────────────────────────────────────────────────────
# 1e) mpv — Media-Player für Live-Streams und VODs
# ffmpeg, libass, libplacebo, libva (VAAPI), X11 verfügbar.
# Lua aktiviert, damit das Bundle näher am Desktop-mpv liegt.
# ─────────────────────────────────────────────────────────────────────────────
- name: mpv
buildsystem: meson
config-opts:
- -Dvaapi=enabled
- -Dpulse=enabled
- -Dx11=enabled
- -Degl-x11=enabled
- -Dalsa=disabled
- -Dlua=enabled
- -Djavascript=disabled
- -Drubberband=disabled
- -Dvapoursynth=disabled
- -Dbuild-date=false
sources:
- type: archive
url: https://github.com/mpv-player/mpv/archive/refs/tags/v0.41.0.tar.gz
sha256: ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209
# ─────────────────────────────────────────────────────────────────────────────
# 2) streamlink (Python) — liefert HLS-URLs aus Twitch-Streams
# Wird von build-flatpak.sh via flatpak-pip-generator generiert:
# python3 -m flatpak_pip_generator streamlink==6.11.0 \
# --output flatpak/python3-streamlink
# Das erzeugt flatpak/python3-streamlink.json mit allen Deps + sha256-Hashes.
# flatpak-builder lädt alle Sources offline herunter und installiert sie sauber.
# ─────────────────────────────────────────────────────────────────────────────
- !include python3-streamlink.json
# ─────────────────────────────────────────────────────────────────────────────
# 2b) Mountpoint fuer ffmpeg-full Extension (muss vor App-Modul existieren)
# ─────────────────────────────────────────────────────────────────────────────
- name: ffmpeg-full-mountpoint
buildsystem: simple
build-commands:
- mkdir -p /app/lib/ffmpeg
# ─────────────────────────────────────────────────────────────────────────────
# 3) Haupt-App
# Voraussetzung: npm install + @electron/rebuild + npm run build wurden
# AUSSERHALB (in WSL2) ausgeführt. Dieses Modul kopiert nur die Artefakte.
# ─────────────────────────────────────────────────────────────────────────────
- name: twitch4steamdeck
buildsystem: simple
build-commands:
# App-Artefakte installieren
- mkdir -p /app/lib/twitch4steamdeck
- cp -r out /app/lib/twitch4steamdeck/out
# node_modules wird für better-sqlite3 (native .node-Datei) zur Laufzeit benötigt.
# Nur die notwendigen Teile kopieren, um die Paketgröße zu begrenzen.
- mkdir -p /app/lib/twitch4steamdeck/node_modules
- cp -r node_modules/better-sqlite3 /app/lib/twitch4steamdeck/node_modules/
- cp -r node_modules/bindings /app/lib/twitch4steamdeck/node_modules/
- cp -r node_modules/file-uri-to-path /app/lib/twitch4steamdeck/node_modules/
# Electron-Binary (Linux, via npm install in WSL2)
- cp -r node_modules/electron /app/lib/twitch4steamdeck/node_modules/
# package.json für node require-Resolution
- cp package.json /app/lib/twitch4steamdeck/
# Launcher-Skript
- install -Dm755 flatpak/twitch4steamdeck.sh /app/bin/twitch4steamdeck
# Icon (512×512 PNG, aus SVG konvertiert oder direkt abgelegt)
- |
if [ -f resources/icons/icon.png ]; then
install -Dm644 resources/icons/icon.png \
/app/share/icons/hicolor/512x512/apps/tv.twitch4steamdeck.App.png
elif [ -f resources/icons/icon.svg ]; then
rsvg-convert -w 512 -h 512 resources/icons/icon.svg \
-o /tmp/icon.png
install -Dm644 /tmp/icon.png \
/app/share/icons/hicolor/512x512/apps/tv.twitch4steamdeck.App.png
fi
# .desktop-Eintrag
- install -Dm644 flatpak/tv.twitch4steamdeck.App.desktop \
/app/share/applications/tv.twitch4steamdeck.App.desktop
# WSL/Windows-Checkouts können 0777 an viele Dateien vererben; OSTree lehnt das ab.
- find /app -type d -exec chmod 755 {} +
- find /app -type f -exec chmod 644 {} +
- find /app/bin -type f -exec chmod 755 {} +
- find /app/lib -type f -name '*.so*' -exec chmod 755 {} +
- |
if [ -d /app/libexec ]; then
find /app/libexec -type f -exec chmod 755 {} +
fi
- |
if [ -f /app/lib/twitch4steamdeck/node_modules/electron/dist/electron ]; then
chmod 755 /app/lib/twitch4steamdeck/node_modules/electron/dist/electron
fi
- |
if [ -f /app/lib/twitch4steamdeck/node_modules/electron/dist/chrome-sandbox ]; then
chmod 755 /app/lib/twitch4steamdeck/node_modules/electron/dist/chrome-sandbox
fi
sources:
# Gesamtes Projektverzeichnis (inkl. aus/ + node_modules/ aus WSL2-Prebuild)
- type: dir
path: ..