Skip to content

Commit

Permalink
chore: Move Packager options (shaka-project#204)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joeyparrish authored Nov 11, 2024
1 parent 6fc9386 commit 172b65c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions streamer/packager_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -169,26 +171,31 @@ 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 += [
'--utc_timings',
','.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 += [
Expand All @@ -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]:
Expand Down

0 comments on commit 172b65c

Please sign in to comment.