From 278d775272d56ec4eccc437de76c002aac2b8317 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 11 Nov 2024 13:23:11 -0800 Subject: [PATCH] feat: Recover from upload failures (#211) Instruct Packager to ignore HTTP output failures, so that the pipeline overall doesn't fail during a live stream. Once the system recovers, segments will be missing, but the stream overall will survive. This requires a new release of Shaka Packager (v3.4.0). Closes #195 --- binaries/build_wheels.py | 2 +- streamer/min_versions.py | 2 +- streamer/packager_node.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/binaries/build_wheels.py b/binaries/build_wheels.py index 2e6a2d9..8eac9ba 100644 --- a/binaries/build_wheels.py +++ b/binaries/build_wheels.py @@ -27,7 +27,7 @@ # Version constants. # Change to download different versions. FFMPEG_VERSION = 'n7.1-2' -PACKAGER_VERSION = 'v3.3.0' +PACKAGER_VERSION = 'v3.4.0' # A map of suffixes that will be combined with the binary download links # to achieve a full download link. Different suffix for each platform. diff --git a/streamer/min_versions.py b/streamer/min_versions.py index 3edb7fd..0bf696e 100644 --- a/streamer/min_versions.py +++ b/streamer/min_versions.py @@ -16,4 +16,4 @@ # These are minimum semantic versions expressed as tuples of ints. FFMPEG = (7, 1) -PACKAGER = (3, 2, 0) +PACKAGER = (3, 4, 0) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index 37ec102..61e0a48 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -109,6 +109,10 @@ def start(self) -> None: # Number of seconds between manifest updates. '--minimum_update_period', str(self._pipeline_config.update_period), + # Ignore HTTP output failures so that the pipeline doesn't stop if we + # fail to upload one segment. Only enable this for live streams, + # since for VOD, we really should signal that failure to the user. + '--ignore_http_output_failures', ] args += self._setup_manifest_format()