From bf0d4b8aab98256556d0fd70abc424a337e72d3d Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 00:02:34 -0700 Subject: [PATCH 01/15] PipelineConfig fields for utc_timings and is_low_latency_dash to trigger LL-DASH streaming within Packager --- streamer/packager_node.py | 8 ++++++++ streamer/pipeline_configuration.py | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index 49006bb..405ce97 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -160,6 +160,14 @@ 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: + for timing in self._pipeline_config.utc_timings: + args += [ + '--utc_timings', str(timing), + ] + if self._pipeline_config.is_low_latency_dash: + args += [ + '--is_low_latency_dash=true', + ] if self._pipeline_config.streaming_mode == StreamingMode.VOD: args += [ '--generate_static_live_mpd', diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index 72379ab..5087aa4 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -309,6 +309,15 @@ class PipelineConfig(configuration.Base): default=EncryptionConfig({})).cast() """Encryption settings.""" + is_low_latency_dash = configuration.Field(bool, default=False).cast() + """If true, stream in low latency mode for DASH.""" + + utc_timings = configuration.Field(List[str], default=['']).cast() + """UTCTiming schemeIdUri and value pairs for the DASH MPD. + + Must be set for LL-DASH streaming. + """ + def __init__(self, *args) -> None: From a1d95b688f03be185fc66e9cb63a3bd176da5db1 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 00:32:11 -0700 Subject: [PATCH 02/15] WIP restrictions on LL-DASH input --- streamer/controller_node.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/streamer/controller_node.py b/streamer/controller_node.py index 005128d..7266335 100644 --- a/streamer/controller_node.py +++ b/streamer/controller_node.py @@ -36,7 +36,7 @@ from streamer.node_base import NodeBase, ProcessStatus from streamer.output_stream import AudioOutputStream, OutputStream, TextOutputStream, VideoOutputStream from streamer.packager_node import PackagerNode -from streamer.pipeline_configuration import PipelineConfig, StreamingMode +from streamer.pipeline_configuration import ManifestFormat, PipelineConfig, StreamingMode from streamer.transcoder_node import TranscoderNode from streamer.periodconcat_node import PeriodConcatNode import streamer.subprocessWindowsPatch # side-effects only @@ -143,6 +143,17 @@ def start(self, output_location: str, raise RuntimeError( 'Multiperiod input list support is incompatible with HTTP outputs.') + if (self._pipeline_config.is_low_latency_dash): + # Check some restrictions on LL-DASH ouput. + if ManifestFormat.DASH not in self._pipeline_config.manifest_format: + raise RuntimeError( + 'is_low_latency_dash is only compatible with DASH ouputs. ' + + 'manifest_format must include DASH') + + if not self._pipeline_config.utc_timings: + raise RuntimeError( + 'For is_low_latency_dash, the utc_timings must be set.') + # Note that we remove the trailing slash from the output location, because # otherwise GCS would create a subdirectory whose name is "". output_location = output_location.rstrip('/') From a6667ae61d707c9ba47c662660ef2d346fae1586 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 12:06:26 -0700 Subject: [PATCH 03/15] Logic and Config input cleanup --- streamer/packager_node.py | 9 ++++++--- streamer/pipeline_configuration.py | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index 405ce97..460133e 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -160,13 +160,16 @@ 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: - for timing in self._pipeline_config.utc_timings: + if self._pipeline_config.utc_timings: args += [ - '--utc_timings', str(timing), + '--utc_timings', + ','.join(timing.scheme_id_uri + '=' + + timing.value for timing in self._pipeline_config.utc_timings) ] + if self._pipeline_config.is_low_latency_dash: args += [ - '--is_low_latency_dash=true', + '--is_low_latency_dash=true', ] if self._pipeline_config.streaming_mode == StreamingMode.VOD: args += [ diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index 5087aa4..6de06ca 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -76,6 +76,16 @@ class EncryptionMode(enum.Enum): RAW = 'raw' """Raw key mode""" +class UtcTimingPair(configuration.Base): + """An object containing the attributes for a DASH MPD UTCTiming + element""" + + scheme_id_uri = configuration.Field(str).cast() + """SchemeIdUri attribute to be used for the UTCTiming element""" + + value = configuration.Field(str).cast() + """Value attribute to be used for the UTCTiming element""" + class RawKeyConfig(configuration.Base): """An object representing a list of keys for Raw key encryption""" @@ -312,9 +322,13 @@ class PipelineConfig(configuration.Base): is_low_latency_dash = configuration.Field(bool, default=False).cast() """If true, stream in low latency mode for DASH.""" - utc_timings = configuration.Field(List[str], default=['']).cast() + utc_timings = configuration.Field(List[UtcTimingPair]).cast() """UTCTiming schemeIdUri and value pairs for the DASH MPD. + If multiple UTCTiming pairs are provided for redundancy, + + list them the order of preference. + Must be set for LL-DASH streaming. """ From 7a383ea9b1db9accec23b284849bda40270afcdc Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 12:13:29 -0700 Subject: [PATCH 04/15] Unit test for UTCTiming and LL-DASH restriction --- tests/tests.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/tests.js b/tests/tests.js index e295309..cc9069b 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -378,6 +378,19 @@ function errorTests() { error_type: 'RuntimeError', })); }); + + it('fails when utc_timing is not set for low latency DASH', async () => { + const inputConfig = getBasicInputConfig(); + const pipelineConfig = { + is_low_latency_dash: true, + streaming_mode: 'live', + }; + + await expectAsync(startStreamer(inputConfig, pipelineConfig)) + .toBeRejectedWith(jasmine.objectContaining({ + error_type: 'RuntimeError', + })); + }); } function resolutionTests(manifestUrl, format) { From 75cdccbd86f1276651e2443a8035e42f095233ff Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 12:19:37 -0700 Subject: [PATCH 05/15] Unit test for LL-DASH and DASH manifest validation --- tests/tests.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/tests.js b/tests/tests.js index cc9069b..36af952 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -391,6 +391,20 @@ function errorTests() { error_type: 'RuntimeError', })); }); + + it('fails when is_low_latency_dash is set without a DASH manifest', async () => { + const inputConfig = getBasicInputConfig(); + const pipelineConfig = { + is_low_latency_dash: true, + manifest_format: ['hls'], + streaming_mode: 'live', + }; + + await expectAsync(startStreamer(inputConfig, pipelineConfig)) + .toBeRejectedWith(jasmine.objectContaining({ + error_type: 'RuntimeError', + })); + }); } function resolutionTests(manifestUrl, format) { From b6b2e7547e9afedade54d29909809566160bb0d5 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 13:45:27 -0700 Subject: [PATCH 06/15] WIP: Unit test to verify LL-DASH playout --- tests/tests.js | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/tests.js b/tests/tests.js index 36af952..165fe05 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -146,7 +146,7 @@ describe('Shaka Streamer', () => { // muxedTextTests(hlsManifestUrl, '(hls)'); muxedTextTests(dashManifestUrl, '(dash)'); - multiPeriodTests(dashManifestUrl, '(dash)'); + lowLatencyDashTests(dashManifestUrl, '(dash)'); }); function errorTests() { @@ -1423,4 +1423,44 @@ function multiPeriodTests(manifestUrl, format) { // Be more tolerant with float comparison, (D > 1.9 * length) instead of (D == 2 * length). expect(video.duration).toBeGreaterThan(1.9); }); +} + +function lowLatencyDashTests(manifestUrl, format) { + it('can process LL-DASH streaming ' + format, async() => { + const inputConfigDict = { + 'inputs': [ + { + 'name': TEST_DIR + 'BigBuckBunny.1080p.mp4', + 'media_type': 'video', + // Keep this test short by only encoding 4s of content. + 'end_time': '0:04', + } + ], + }; + const pipelineConfigDict = { + 'streaming_mode': 'live', + 'resolutions': ['144p'], + 'video_codecs': ['h264'], + 'manifest_format': ['dash'], + 'segment_size': 2, + 'is_low_latency_dash': true, + 'utc_timings': [ + { + 'scheme_id_uri':'urn:mpeg:dash:utc:http-xsdate:2014', + 'value':'https://time.akamai.com/?.iso' + }, + ], + 'debug_logs': true, + }; + await startStreamer(inputConfigDict, pipelineConfigDict); + // TODO(CaitlinO'Callaghan): fix so player loads and test passes + player.configure({ + streaming: { + lowLatencyMode: true, + inaccurateManifestTolerance: 0, + rebufferingGoal: 0.01, + } + }); + await player.load(manifestUrl); + }); } \ No newline at end of file From 7e69ed49fa59bf129ce223fe680dda47afb2b4e0 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 13:45:51 -0700 Subject: [PATCH 07/15] Remove unnecessary newline --- streamer/packager_node.py | 1 - 1 file changed, 1 deletion(-) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index 460133e..dc1a897 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -166,7 +166,6 @@ 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.is_low_latency_dash: args += [ '--is_low_latency_dash=true', From 40e6c55cb9f22c5c68d0d73ffd132be36840a3ec Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 14:14:04 -0700 Subject: [PATCH 08/15] Cleanup --- streamer/pipeline_configuration.py | 2 +- tests/tests.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index 6de06ca..8b48059 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -327,7 +327,7 @@ class PipelineConfig(configuration.Base): If multiple UTCTiming pairs are provided for redundancy, - list them the order of preference. + list the pairs in the order of preference. Must be set for LL-DASH streaming. """ diff --git a/tests/tests.js b/tests/tests.js index 165fe05..08a3680 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -398,6 +398,12 @@ function errorTests() { is_low_latency_dash: true, manifest_format: ['hls'], streaming_mode: 'live', + utc_timings: [ + { + scheme_id_uri:'urn:mpeg:dash:utc:http-xsdate:2014', + value:'https://time.akamai.com/?.iso' + }, + ], }; await expectAsync(startStreamer(inputConfig, pipelineConfig)) @@ -1450,7 +1456,6 @@ function lowLatencyDashTests(manifestUrl, format) { 'value':'https://time.akamai.com/?.iso' }, ], - 'debug_logs': true, }; await startStreamer(inputConfigDict, pipelineConfigDict); // TODO(CaitlinO'Callaghan): fix so player loads and test passes From 7723b85288166fb6d76801c4ba92af0d9bfd25d2 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Fri, 13 Aug 2021 14:52:42 -0700 Subject: [PATCH 09/15] More cleanup --- streamer/controller_node.py | 2 +- tests/tests.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/streamer/controller_node.py b/streamer/controller_node.py index 7266335..bd98ef4 100644 --- a/streamer/controller_node.py +++ b/streamer/controller_node.py @@ -144,7 +144,7 @@ def start(self, output_location: str, 'Multiperiod input list support is incompatible with HTTP outputs.') if (self._pipeline_config.is_low_latency_dash): - # Check some restrictions on LL-DASH ouput. + # Check some restrictions on LL-DASH packaing. if ManifestFormat.DASH not in self._pipeline_config.manifest_format: raise RuntimeError( 'is_low_latency_dash is only compatible with DASH ouputs. ' + diff --git a/tests/tests.js b/tests/tests.js index 08a3680..a63ca97 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -146,6 +146,8 @@ describe('Shaka Streamer', () => { // muxedTextTests(hlsManifestUrl, '(hls)'); muxedTextTests(dashManifestUrl, '(dash)'); + multiPeriodTests(dashManifestUrl, '(dash)'); + lowLatencyDashTests(dashManifestUrl, '(dash)'); }); From 19b9b8c6dfcf86b3031da404f8de71750d6d7616 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Sun, 15 Aug 2021 13:28:05 -0700 Subject: [PATCH 10/15] Fix to pass LL-DASH testcase: update dashStreamsReady() fn to account for LL-DASH MPD --- run_end_to_end_tests.py | 14 +++++++++++--- streamer/controller_node.py | 8 ++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/run_end_to_end_tests.py b/run_end_to_end_tests.py index 238d16f..47e4057 100755 --- a/run_end_to_end_tests.py +++ b/run_end_to_end_tests.py @@ -91,9 +91,17 @@ def dashStreamsReady(manifest_path): pattern = re.compile(r'') with open(manifest_path) as manifest_file: for representation in pattern.finditer(manifest_file.read()): - if not re.search(r'. + # Check for the availabilityTimeOffset attribute instead. + if not re.search(r'availabilityTimeOffset', representation.group()): + # This Representation does not have a availabilityTimeOffset yet, + # meaning the first chunk is not yet ready for playout. + return False + else: + if not re.search(r' bool: return self._pipeline_config.streaming_mode == StreamingMode.VOD + def is_low_latency_dash(self) -> bool: + """Returns True if the pipeline is running in LL-DASH mode. + + :rtype: bool + """ + + return self._pipeline_config.is_low_latency_dash + class VersionError(Exception): """A version error for one of Shaka Streamer's external dependencies. From 8b170588de41e0ffedbab01aa9b46331b08b9c35 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Mon, 16 Aug 2021 14:18:36 -0700 Subject: [PATCH 11/15] Style and typo fix --- streamer/controller_node.py | 4 ++-- streamer/pipeline_configuration.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/streamer/controller_node.py b/streamer/controller_node.py index 2b7bc4f..0d0eb90 100644 --- a/streamer/controller_node.py +++ b/streamer/controller_node.py @@ -143,8 +143,8 @@ def start(self, output_location: str, raise RuntimeError( 'Multiperiod input list support is incompatible with HTTP outputs.') - if (self._pipeline_config.is_low_latency_dash): - # Check some restrictions on LL-DASH packaing. + if self._pipeline_config.is_low_latency_dash: + # Check some restrictions on LL-DASH packaging. if ManifestFormat.DASH not in self._pipeline_config.manifest_format: raise RuntimeError( 'is_low_latency_dash is only compatible with DASH ouputs. ' + diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index 8b48059..9473a78 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -326,7 +326,6 @@ class PipelineConfig(configuration.Base): """UTCTiming schemeIdUri and value pairs for the DASH MPD. If multiple UTCTiming pairs are provided for redundancy, - list the pairs in the order of preference. Must be set for LL-DASH streaming. From 76505e4a892a84eeb8b3d07f34b90d3936c344fa Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Mon, 16 Aug 2021 17:21:06 -0700 Subject: [PATCH 12/15] Naming change for LL-DASH control hook --- run_end_to_end_tests.py | 2 +- streamer/controller_node.py | 10 +++++----- streamer/packager_node.py | 2 +- streamer/pipeline_configuration.py | 2 +- tests/tests.js | 10 +++++----- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/run_end_to_end_tests.py b/run_end_to_end_tests.py index 47e4057..ef99654 100755 --- a/run_end_to_end_tests.py +++ b/run_end_to_end_tests.py @@ -91,7 +91,7 @@ def dashStreamsReady(manifest_path): pattern = re.compile(r'') with open(manifest_path) as manifest_file: for representation in pattern.finditer(manifest_file.read()): - if controller.is_low_latency_dash(): + if controller.is_low_latency_dash_mode(): # LL-DASH manifests do not contain the segment reference tag . # Check for the availabilityTimeOffset attribute instead. if not re.search(r'availabilityTimeOffset', representation.group()): diff --git a/streamer/controller_node.py b/streamer/controller_node.py index 0d0eb90..29233c6 100644 --- a/streamer/controller_node.py +++ b/streamer/controller_node.py @@ -143,16 +143,16 @@ def start(self, output_location: str, raise RuntimeError( 'Multiperiod input list support is incompatible with HTTP outputs.') - if self._pipeline_config.is_low_latency_dash: + if self._pipeline_config.low_latency_dash_mode: # Check some restrictions on LL-DASH packaging. if ManifestFormat.DASH not in self._pipeline_config.manifest_format: raise RuntimeError( - 'is_low_latency_dash is only compatible with DASH ouputs. ' + + 'low_latency_dash_mode is only compatible with DASH ouputs. ' + 'manifest_format must include DASH') if not self._pipeline_config.utc_timings: raise RuntimeError( - 'For is_low_latency_dash, the utc_timings must be set.') + 'For low_latency_dash_mode, the utc_timings must be set.') # Note that we remove the trailing slash from the output location, because # otherwise GCS would create a subdirectory whose name is "". @@ -300,13 +300,13 @@ def is_vod(self) -> bool: return self._pipeline_config.streaming_mode == StreamingMode.VOD - def is_low_latency_dash(self) -> bool: + def is_low_latency_dash_mode(self) -> bool: """Returns True if the pipeline is running in LL-DASH mode. :rtype: bool """ - return self._pipeline_config.is_low_latency_dash + return self._pipeline_config.low_latency_dash_mode class VersionError(Exception): """A version error for one of Shaka Streamer's external dependencies. diff --git a/streamer/packager_node.py b/streamer/packager_node.py index dc1a897..42788c6 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -166,7 +166,7 @@ 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.is_low_latency_dash: + if self._pipeline_config.low_latency_dash_mode: args += [ '--is_low_latency_dash=true', ] diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index 9473a78..f4c635b 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -319,7 +319,7 @@ class PipelineConfig(configuration.Base): default=EncryptionConfig({})).cast() """Encryption settings.""" - is_low_latency_dash = configuration.Field(bool, default=False).cast() + low_latency_dash_mode = configuration.Field(bool, default=False).cast() """If true, stream in low latency mode for DASH.""" utc_timings = configuration.Field(List[UtcTimingPair]).cast() diff --git a/tests/tests.js b/tests/tests.js index a63ca97..5cf9706 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -381,10 +381,10 @@ function errorTests() { })); }); - it('fails when utc_timing is not set for low latency DASH', async () => { + it('fails when utc_timing is not set for low_latency_dash_mode', async () => { const inputConfig = getBasicInputConfig(); const pipelineConfig = { - is_low_latency_dash: true, + low_latency_dash_mode: true, streaming_mode: 'live', }; @@ -394,10 +394,10 @@ function errorTests() { })); }); - it('fails when is_low_latency_dash is set without a DASH manifest', async () => { + it('fails when low_latency_dash_mode is set without a DASH manifest', async () => { const inputConfig = getBasicInputConfig(); const pipelineConfig = { - is_low_latency_dash: true, + low_latency_dash_mode: true, manifest_format: ['hls'], streaming_mode: 'live', utc_timings: [ @@ -1451,7 +1451,7 @@ function lowLatencyDashTests(manifestUrl, format) { 'video_codecs': ['h264'], 'manifest_format': ['dash'], 'segment_size': 2, - 'is_low_latency_dash': true, + 'low_latency_dash_mode': true, 'utc_timings': [ { 'scheme_id_uri':'urn:mpeg:dash:utc:http-xsdate:2014', From a8e966134b7ec15c6e0fe23c60a77a8fcf9207b7 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Mon, 16 Aug 2021 17:24:26 -0700 Subject: [PATCH 13/15] Write TODOs --- streamer/pipeline_configuration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/streamer/pipeline_configuration.py b/streamer/pipeline_configuration.py index f4c635b..8ce8aba 100644 --- a/streamer/pipeline_configuration.py +++ b/streamer/pipeline_configuration.py @@ -80,6 +80,7 @@ class UtcTimingPair(configuration.Base): """An object containing the attributes for a DASH MPD UTCTiming element""" + # TODO: Use an enum for scheme_id_uri to simplify the config input scheme_id_uri = configuration.Field(str).cast() """SchemeIdUri attribute to be used for the UTCTiming element""" @@ -319,6 +320,7 @@ class PipelineConfig(configuration.Base): default=EncryptionConfig({})).cast() """Encryption settings.""" + # TODO: Generalize this to low_latency_mode once LL-HLS is supported by Packager low_latency_dash_mode = configuration.Field(bool, default=False).cast() """If true, stream in low latency mode for DASH.""" From 06ef3516711dd8bb3b6ede8bd717792e491aac81 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Tue, 17 Aug 2021 17:17:17 -0700 Subject: [PATCH 14/15] Change LL-DASH flag in PackagerNode to match new flag name in Shaka Packager --- streamer/packager_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streamer/packager_node.py b/streamer/packager_node.py index 42788c6..86e8c09 100644 --- a/streamer/packager_node.py +++ b/streamer/packager_node.py @@ -168,7 +168,7 @@ def _setup_manifest_format(self) -> List[str]: ] if self._pipeline_config.low_latency_dash_mode: args += [ - '--is_low_latency_dash=true', + '--low_latency_dash_mode=true', ] if self._pipeline_config.streaming_mode == StreamingMode.VOD: args += [ From fd1724d721e2ab12ae19da1de70b749ed82fb466 Mon Sep 17 00:00:00 2001 From: Caitlin O'Callaghan Date: Wed, 18 Aug 2021 11:43:22 -0700 Subject: [PATCH 15/15] Sample pipeline config file for LL-DASH mode --- .../pipeline_low_latency_dash_config.yaml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 config_files/pipeline_low_latency_dash_config.yaml diff --git a/config_files/pipeline_low_latency_dash_config.yaml b/config_files/pipeline_low_latency_dash_config.yaml new file mode 100644 index 0000000..f54cc37 --- /dev/null +++ b/config_files/pipeline_low_latency_dash_config.yaml @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This is a sample pipeline configuration file for Shaka Streamer in live mode. +# Here you configure resolutions, manifest formats, segment size, and more. + +# Streaming mode. Can be live or vod. +streaming_mode: live + +# A list of resolutions to encode. +resolutions: + - 720p + - 480p + +# A list of channel layouts to encode. +channel_layouts: + - stereo + +# The codecs to encode with. +audio_codecs: + - aac +video_codecs: + - h264 + +# Manifest format must be DASH for LL-DASH streaming +manifest_format: + - dash + +# Length of each segment in seconds. +segment_size: 2 + +# Availability window, or the number of seconds a segment remains available. +availability_window: 300 + +# Presentation delay, or how far back from the edge the player should be. +presentation_delay: 30 + +# Update period, or how often the player should fetch a new manifest. +update_period: 8 + +# Stream in low latency dash mode, or chunked +low_latency_dash_mode: True + +# UTC timing values, or the global timing source used for segment time stamps. +utc_timings: + - scheme_id_uri: urn:mpeg:dash:utc:http-xsdate:2014 + value: https://akamai.com/?.iso \ No newline at end of file