diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index e1821e3826..e77e0bced8 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -304,8 +304,8 @@ class PackagerAppTest(unittest.TestCase): include_pssh_in_stream=True, dash_if_iop=True, output_media_info=False, - output_hls=False, output_dash=False, + output_hls=False, hls_playlist_type=None, time_shift_buffer_depth=0.0, preserved_segments_outside_live_window=0, @@ -370,12 +370,12 @@ class PackagerAppTest(unittest.TestCase): if output_media_info: flags.append('--output_media_info') + if output_dash: + flags += ['--mpd_output', self.mpd_output] if output_hls: flags += ['--hls_master_playlist_output', self.hls_master_playlist_output] if hls_playlist_type: flags += ['--hls_playlist_type', hls_playlist_type] - if output_dash: - flags += ['--mpd_output', self.mpd_output] if time_shift_buffer_depth != 0.0: flags += ['--time_shift_buffer_depth={0}'.format(time_shift_buffer_depth)] @@ -658,32 +658,36 @@ class PackagerFunctionalTest(PackagerAppTest): def testAudioVideoWithLanguageOverride(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], language='por'), - self._GetFlags(default_language='por', output_dash=True)) + self._GetStreams(['audio', 'video'], language='por', hls=True), + self._GetFlags(default_language='por', output_dash=True, + output_hls=True)) self._CheckTestResults('audio-video-with-language-override') def testAudioVideoWithLanguageOverrideUsingMixingCode(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], language='por'), - self._GetFlags(default_language='pt', output_dash=True)) + self._GetStreams(['audio', 'video'], language='por', hls=True), + self._GetFlags(default_language='pt', output_dash=True, + output_hls=True)) self._CheckTestResults('audio-video-with-language-override') def testAudioVideoWithLanguageOverrideUsingMixingCode2(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], language='pt'), - self._GetFlags(default_language='por', output_dash=True)) + self._GetStreams(['audio', 'video'], language='pt', hls=True), + self._GetFlags(default_language='por', output_dash=True, + output_hls=True)) self._CheckTestResults('audio-video-with-language-override') def testAudioVideoWithLanguageOverrideUsingTwoCharacterCode(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], language='pt'), - self._GetFlags(default_language='pt', output_dash=True)) + self._GetStreams(['audio', 'video'], language='pt', hls=True), + self._GetFlags(default_language='pt', output_dash=True, + output_hls=True)) self._CheckTestResults('audio-video-with-language-override') def testAudioVideoWithLanguageOverrideWithSubtag(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], language='por-BR'), - self._GetFlags(output_dash=True)) + self._GetStreams(['audio', 'video'], language='por-BR', hls=True), + self._GetFlags(output_dash=True, output_hls=True)) self._CheckTestResults('audio-video-with-language-override-with-subtag') def testAacHe(self): @@ -711,35 +715,9 @@ class PackagerFunctionalTest(PackagerAppTest): segmented=True, hls=True, test_files=['bear-640x360.ts']), - self._GetFlags(output_hls=True, output_dash=True)) + self._GetFlags(output_dash=True, output_hls=True)) self._CheckTestResults('avc-aac-ts') - def testAvcAacTsLanguage(self): - # Currently we only support live packaging for ts. - self.assertPackageSuccess( - self._GetStreams( - ['audio', 'video'], - output_format='ts', - segmented=True, - hls=True, - language='por', - test_files=['bear-640x360.ts']), - self._GetFlags(output_hls=True, default_language='por')) - self._CheckTestResults('avc-aac-ts-language') - - def testAvcAacTsLanguageUsingTwoCharacterCode(self): - # Currently we only support live packaging for ts. - self.assertPackageSuccess( - self._GetStreams( - ['audio', 'video'], - output_format='ts', - segmented=True, - hls=True, - language='pt', - test_files=['bear-640x360.ts']), - self._GetFlags(output_hls=True, default_language='pt')) - self._CheckTestResults('avc-aac-ts-language') - def testAvcAc3Ts(self): # Currently we only support live packaging for ts. self.assertPackageSuccess( @@ -803,37 +781,6 @@ class PackagerFunctionalTest(PackagerAppTest): time_shift_buffer_depth=0.5)) self._CheckTestResults('avc-ts-event-playlist') - def testAvcTsLivePlaylistWithSegmentDeletion(self): - self.assertPackageSuccess( - self._GetStreams( - ['audio'], - output_format='mp4', - segmented=True, - hls=True, - test_files=['bear-640x360.ts']), - self._GetFlags( - output_hls=True, - hls_playlist_type='LIVE', - segment_duration=0.5, - time_shift_buffer_depth=0.5, - preserved_segments_outside_live_window=1)) - self._CheckTestResults('avc-ts-live-playlist-with-segment-deletion') - - def testAvcTsDashDynamicWithSegmentDeletion(self): - self.assertPackageSuccess( - self._GetStreams( - ['audio'], - output_format='mp4', - segmented=True, - hls=True, - test_files=['bear-640x360.ts']), - self._GetFlags( - output_dash=True, - segment_duration=0.5, - time_shift_buffer_depth=0.5, - preserved_segments_outside_live_window=1)) - self._CheckTestResults('avc-ts-dash-dynamic-with-segment-deletion') - def testAvcTsLivePlaylistAndDashDynamicWithSegmentDeletion(self): self.assertPackageSuccess( self._GetStreams( @@ -1017,8 +964,9 @@ class PackagerFunctionalTest(PackagerAppTest): def testEncryptionAndAdCues(self): self.assertPackageSuccess( - self._GetStreams(['audio', 'video']), - self._GetFlags(encryption=True, output_dash=True, ad_cues='1.5')) + self._GetStreams(['audio', 'video'], hls=True), + self._GetFlags(encryption=True, output_dash=True, output_hls=True, + ad_cues='1.5')) self._CheckTestResults('encryption-and-ad-cues') def testEncryptionAndAdCuesSplitContent(self): @@ -1060,7 +1008,8 @@ class PackagerFunctionalTest(PackagerAppTest): test_file='bear-subtitle-english.vtt', output_format='mp4') ] - flags = self._GetFlags(output_hls=True, ad_cues='1.5') + flags = self._GetFlags(output_dash=True, output_hls=True, + generate_static_mpd=True, ad_cues='1.5') self.assertPackageSuccess(streams, flags) self._CheckTestResults('vtt-text-to-mp4-with-ad-cues') @@ -1350,12 +1299,6 @@ class PackagerFunctionalTest(PackagerAppTest): self.assertPackageSuccess(streams, flags) self._CheckTestResults('ec3-packed-audio-encrypted') - def testHlsSingleSegmentMp4EncryptedAndAdCues(self): - self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], hls=True), - self._GetFlags(encryption=True, output_hls=True, ad_cues='1.5')) - self._CheckTestResults('hls-single-segment-mp4-encrypted-and-ad-cues') - # Test HLS with multi-segment mp4 and content in subdirectories. def testHlsMultiSegmentMp4WithCustomPath(self): test_file = os.path.join(self.test_data_dir, 'bear-640x360.mp4') @@ -1406,13 +1349,6 @@ class PackagerFunctionalTest(PackagerAppTest): self._GetFlags(output_dash=True, generate_static_mpd=True)) self._CheckTestResults('live-static-profile') - def testLiveStaticProfileAndAdCues(self): - self.assertPackageSuccess( - self._GetStreams(['audio', 'video'], segmented=True), - self._GetFlags( - output_dash=True, generate_static_mpd=True, ad_cues='1.5')) - self._CheckTestResults('live-static-profile-and-ad-cues') - def testLiveProfileAndEncryption(self): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), @@ -1532,27 +1468,16 @@ class PackagerFunctionalTest(PackagerAppTest): self.assertPackageSuccess(streams, flags) self._CheckTestResults('hls-segmented-webvtt') - def testHlsWithBandwidthOverride(self): + def testBandwidthOverride(self): streams = [ - self._GetStream('audio', segmented=True, bandwidth=11111), - self._GetStream('video', segmented=True, bandwidth=44444) + self._GetStream('audio', hls=True, bandwidth=11111), + self._GetStream('video', hls=True, bandwidth=44444) ] - flags = self._GetFlags(output_hls=True) + flags = self._GetFlags(output_dash=True, output_hls=True) self.assertPackageSuccess(streams, flags) - self._CheckTestResults('hls-with-bandwidth-override') - - def testDashWithBandwidthOverride(self): - streams = [ - self._GetStream('audio', bandwidth=11111), - self._GetStream('video', bandwidth=44444) - ] - - flags = self._GetFlags(output_dash=True) - - self.assertPackageSuccess(streams, flags) - self._CheckTestResults('dash-with-bandwidth-override') + self._CheckTestResults('bandwidth-override') class PackagerCommandParsingTest(PackagerAppTest): diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.m3u8 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.m3u8 new file mode 100644 index 0000000000..c74b3c4fe8 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-audio.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-audio.mp4",BYTERANGE="757@0" +#EXTINF:1.022, +#EXT-X-BYTERANGE:16655@825 +bear-640x360-audio.mp4 +#EXTINF:0.998, +#EXT-X-BYTERANGE:16253 +bear-640x360-audio.mp4 +#EXTINF:0.743, +#EXT-X-BYTERANGE:9963 +bear-640x360-audio.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video-iframe.m3u8 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video-iframe.m3u8 new file mode 100644 index 0000000000..51f3772ba6 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video-iframe.m3u8 @@ -0,0 +1,17 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-I-FRAMES-ONLY +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.001, +#EXT-X-BYTERANGE:15581@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:18221@100204 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:19663@222011 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video.m3u8 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video.m3u8 new file mode 100644 index 0000000000..8e86067e42 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/bear-640x360-video.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.068, +#EXT-X-BYTERANGE:99313@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:121807 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:79662 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 new file mode 100644 index 0000000000..f6106994c1 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 @@ -0,0 +1,9 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",LANGUAGE="pt-BR",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-STREAM-INF:BANDWIDTH=1103896,AVERAGE-BANDWIDTH=982641,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" +bear-640x360-video.m3u8 + +#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8" diff --git a/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.m3u8 b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.m3u8 new file mode 100644 index 0000000000..c74b3c4fe8 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-audio.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-audio.mp4",BYTERANGE="757@0" +#EXTINF:1.022, +#EXT-X-BYTERANGE:16655@825 +bear-640x360-audio.mp4 +#EXTINF:0.998, +#EXT-X-BYTERANGE:16253 +bear-640x360-audio.mp4 +#EXTINF:0.743, +#EXT-X-BYTERANGE:9963 +bear-640x360-audio.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video-iframe.m3u8 b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video-iframe.m3u8 new file mode 100644 index 0000000000..51f3772ba6 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video-iframe.m3u8 @@ -0,0 +1,17 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-I-FRAMES-ONLY +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.001, +#EXT-X-BYTERANGE:15581@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:18221@100204 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:19663@222011 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video.m3u8 b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video.m3u8 new file mode 100644 index 0000000000..8e86067e42 --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override/bear-640x360-video.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.068, +#EXT-X-BYTERANGE:99313@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:121807 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:79662 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/audio-video-with-language-override/output.m3u8 b/packager/app/test/testdata/audio-video-with-language-override/output.m3u8 new file mode 100644 index 0000000000..68679aaf8f --- /dev/null +++ b/packager/app/test/testdata/audio-video-with-language-override/output.m3u8 @@ -0,0 +1,9 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",LANGUAGE="pt",NAME="stream_0",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-STREAM-INF:BANDWIDTH=1103896,AVERAGE-BANDWIDTH=982641,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" +bear-640x360-video.m3u8 + +#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8" diff --git a/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.m3u8 b/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.m3u8 new file mode 100644 index 0000000000..c74b3c4fe8 --- /dev/null +++ b/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-audio.mp4",BYTERANGE="757@0" +#EXTINF:1.022, +#EXT-X-BYTERANGE:16655@825 +bear-640x360-audio.mp4 +#EXTINF:0.998, +#EXT-X-BYTERANGE:16253 +bear-640x360-audio.mp4 +#EXTINF:0.743, +#EXT-X-BYTERANGE:9963 +bear-640x360-audio.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.mp4 b/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.mp4 new file mode 100644 index 0000000000..1cc7fbb5f5 Binary files /dev/null and b/packager/app/test/testdata/bandwidth-override/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/bandwidth-override/bear-640x360-video-iframe.m3u8 b/packager/app/test/testdata/bandwidth-override/bear-640x360-video-iframe.m3u8 new file mode 100644 index 0000000000..51f3772ba6 --- /dev/null +++ b/packager/app/test/testdata/bandwidth-override/bear-640x360-video-iframe.m3u8 @@ -0,0 +1,17 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-I-FRAMES-ONLY +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.001, +#EXT-X-BYTERANGE:15581@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:18221@100204 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:19663@222011 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/bandwidth-override/bear-640x360-video.m3u8 b/packager/app/test/testdata/bandwidth-override/bear-640x360-video.m3u8 new file mode 100644 index 0000000000..8e86067e42 --- /dev/null +++ b/packager/app/test/testdata/bandwidth-override/bear-640x360-video.m3u8 @@ -0,0 +1,16 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="823@0" +#EXTINF:1.068, +#EXT-X-BYTERANGE:99313@891 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:121807 +bear-640x360-video.mp4 +#EXTINF:0.734, +#EXT-X-BYTERANGE:79662 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/bandwidth-override/bear-640x360-video.mp4 b/packager/app/test/testdata/bandwidth-override/bear-640x360-video.mp4 new file mode 100644 index 0000000000..9ea15d763d Binary files /dev/null and b/packager/app/test/testdata/bandwidth-override/bear-640x360-video.mp4 differ diff --git a/packager/app/test/testdata/bandwidth-override/output.m3u8 b/packager/app/test/testdata/bandwidth-override/output.m3u8 new file mode 100644 index 0000000000..5046e63538 --- /dev/null +++ b/packager/app/test/testdata/bandwidth-override/output.m3u8 @@ -0,0 +1,9 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-STREAM-INF:BANDWIDTH=55555,AVERAGE-BANDWIDTH=982641,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" +bear-640x360-video.m3u8 + +#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=44444,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8" diff --git a/packager/app/test/testdata/bandwidth-override/output.mpd b/packager/app/test/testdata/bandwidth-override/output.mpd new file mode 100644 index 0000000000..f4f60aba84 --- /dev/null +++ b/packager/app/test/testdata/bandwidth-override/output.mpd @@ -0,0 +1,23 @@ + + + + + + + bear-640x360-video.mp4 + + + + + + + + + bear-640x360-audio.mp4 + + + + + + + diff --git a/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.m3u8 new file mode 100644 index 0000000000..987ccd02d9 --- /dev/null +++ b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-audio.m3u8 @@ -0,0 +1,21 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-audio.mp4",BYTERANGE="967@0" +#EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",KEYFORMAT="identity" +#EXTINF:1.022, +#EXT-X-BYTERANGE:16655@1047 +bear-640x360-audio.mp4 +#EXTINF:0.998, +#EXT-X-BYTERANGE:16650 +bear-640x360-audio.mp4 +#EXTINF:0.046, +#EXT-X-BYTERANGE:1014 +bear-640x360-audio.mp4 +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:0.697, +#EXT-X-BYTERANGE:9415 +bear-640x360-audio.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video-iframe.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video-iframe.m3u8 new file mode 100644 index 0000000000..be3f071a9c --- /dev/null +++ b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video-iframe.m3u8 @@ -0,0 +1,19 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-I-FRAMES-ONLY +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="1091@0" +#EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",KEYFORMAT="identity" +#EXTINF:1.001, +#EXT-X-BYTERANGE:15581@1159 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:18754@100472 +bear-640x360-video.mp4 +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:0.734, +#EXT-X-BYTERANGE:20068@222812 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video.m3u8 new file mode 100644 index 0000000000..f81460f81e --- /dev/null +++ b/packager/app/test/testdata/encryption-and-ad-cues/bear-640x360-video.m3u8 @@ -0,0 +1,18 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-640x360-video.mp4",BYTERANGE="1091@0" +#EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",KEYFORMAT="identity" +#EXTINF:1.068, +#EXT-X-BYTERANGE:99313@1159 +bear-640x360-video.mp4 +#EXTINF:1.001, +#EXT-X-BYTERANGE:122340 +bear-640x360-video.mp4 +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:0.734, +#EXT-X-BYTERANGE:80067 +bear-640x360-video.mp4 +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 new file mode 100644 index 0000000000..5e64e17586 --- /dev/null +++ b/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 @@ -0,0 +1,9 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-STREAM-INF:BANDWIDTH=1152421,AVERAGE-BANDWIDTH=987816,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" +bear-640x360-video.m3u8 + +#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8" diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-mult-files/output.mpd b/packager/app/test/testdata/live-profile-and-encryption-and-mult-files/output.mpd index 3a76f99796..9c99427031 100644 --- a/packager/app/test/testdata/live-profile-and-encryption-and-mult-files/output.mpd +++ b/packager/app/test/testdata/live-profile-and-encryption-and-mult-files/output.mpd @@ -7,16 +7,7 @@ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA== - - - - - - - - - - + @@ -25,7 +16,16 @@ - + + + + + + + + + + @@ -40,7 +40,7 @@ AAAANHBzc2gBAAAAEHfv7MCyTQKs4zweUuL7SwAAAAExMjM0NTY3ODkwMTIzNDU2AAAAAA== - + diff --git a/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.mpd b/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.mpd new file mode 100644 index 0000000000..7fd32e26d7 --- /dev/null +++ b/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.mpd @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +