From 8393c6f82356e77e77e78e474df6ad4419758604 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 14 Mar 2025 10:31:17 +0000 Subject: [PATCH] go2tv: partially fix the -tc option --- overlays/preferences.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/overlays/preferences.nix b/overlays/preferences.nix index de5f0517e..8b75d1ae1 100644 --- a/overlays/preferences.nix +++ b/overlays/preferences.nix @@ -81,7 +81,31 @@ in # done as overlay instead of in hosts/common/programs/go2tv.nix so that python consumers like sane-cast also get this fix. postPatch = (upstream.postPatch or "") + '' substituteInPlace devices/devices.go --replace-fail "port := 1900" "port := 1901" + + # by default, go2tv passes `ffmpeg -re`, which limits ffmpeg to never stream faster than realtime. + # patch that out to let the receiver stream as fast as it wants. + # maybe not necessary, was added during debugging. + substituteInPlace soapcalls/utils/transcode.go --replace-fail '"-re",' "" ''; + + patches = (upstream.patches or []) ++ [ + (fetchpatch { + name = "enable ffmpeg functionality outside the GUI paths"; + url = "https://git.uninsane.org/colin/go2tv/commit/9afa10dd2e2ef16def26be07eb72fbc5b0382ddd.patch"; + hash = "sha256-PW989bb/xHk7EncZ3Ra69y2p1U1XeePKq2h7v5O47go="; + }) + (fetchpatch { + # this causes it to advertize that weird `video/vnd.dlna.mpeg-tts` MIME type. + # TODO: try `video/mpeg`. + # the following were tried, and failed: + # - video/mp2t + # - video/x-mpegts + # - video/MP2T + name = "advertise the correct MediaType when transcoding"; + url = "https://git.uninsane.org/colin/go2tv/commit/3bbb98318df2fc3d1a61cecd2b06d1bec9964651.patch"; + hash = "sha256-9n43QXfCWyEn5qw1rWnmFb8oTY6xgkih5ySAcxdBVZo="; + }) + ]; }); # gnome-control-center = super.gnome-control-center.override {