From 172b65c263eba8c4f9a9ce8cd77f9201ef98fbfb Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 11 Nov 2024 01:46:28 -0800 Subject: [PATCH] chore: Move Packager options (#204) I was confused about the placement of --use_dovi_supplemental_codecs, so this moves it to a place where I would expect to find common options that are always enabled. --- streamer/packager_node.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index b5d81f0..e80019b 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -89,6 +89,8 @@ def start(self) -> None: args += [ # Segment duration given in seconds. '--segment_duration', str(self._pipeline_config.segment_size), + # Signal DolbyVision using the modern supplemental codecs approach + '--use_dovi_supplemental_codecs', ] if self._pipeline_config.streaming_mode == StreamingMode.LIVE: @@ -169,6 +171,7 @@ def _setup_stream(self, stream: OutputStream) -> str: def _setup_manifest_format(self) -> List[str]: args: List[str] = [] + if ManifestFormat.DASH in self._pipeline_config.manifest_format: if self._pipeline_config.utc_timings: args += [ @@ -176,19 +179,23 @@ def _setup_manifest_format(self) -> List[str]: ','.join(timing.scheme_id_uri + '=' + timing.value for timing in self._pipeline_config.utc_timings) ] + if self._pipeline_config.low_latency_dash_mode: args += [ '--low_latency_dash_mode=true', ] + if self._pipeline_config.streaming_mode == StreamingMode.VOD: args += [ '--generate_static_live_mpd', ] + args += [ # Generate DASH manifest file. '--mpd_output', build_path(self.output_location, self._pipeline_config.dash_output), ] + if ManifestFormat.HLS in self._pipeline_config.manifest_format: if self._pipeline_config.streaming_mode == StreamingMode.LIVE: args += [ @@ -198,16 +205,13 @@ def _setup_manifest_format(self) -> List[str]: args += [ '--hls_playlist_type', 'VOD', ] + args += [ # Generate HLS playlist file(s). '--hls_master_playlist_output', build_path(self.output_location, self._pipeline_config.hls_output), ] - # Common arguments - args.extend([ - '--use_dovi_supplemental_codecs', - ]) return args def _setup_encryption_keys(self) -> List[str]: