diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index 99716f242c..67d70d6131 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -1006,6 +1006,23 @@ class PackagerFunctionalTest(PackagerAppTest): self._VerifyDecryption(self.output[0], 'bear-640x360-a-demuxed-golden.mp4') self._VerifyDecryption(self.output[1], 'bear-640x360-v-golden.mp4') + def testHlsAudioVideoTextWithAdCues(self): + streams = [ + self._GetStream('audio', + hls=True, + segmented=True), + self._GetStream('video', + hls=True, + segmented=True), + self._GetStream('text', + hls=True, + segmented=True, + test_file='bear-subtitle-english.vtt') + ] + flags = self._GetFlags(output_hls=True, ad_cues='1.5') + self.assertPackageSuccess(streams, flags) + self._CheckTestResults('hls-audio-video-text-with-ad-cues') + def testPackageWebmSubsampleEncryption(self): streams = [ self._GetStream('video', diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-1.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-1.m4s new file mode 100644 index 0000000000..c4b4ac03d9 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-1.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-2.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-2.m4s new file mode 100644 index 0000000000..8504387c99 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-2.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-3.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-3.m4s new file mode 100644 index 0000000000..692408ca70 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-3.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-4.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-4.m4s new file mode 100644 index 0000000000..cd5f00f50c Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-4.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 new file mode 100644 index 0000000000..f725c309e7 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio-init.mp4 differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-audio.m3u8 new file mode 100644 index 0000000000..5e114bac78 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/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-init.mp4" +#EXTINF:1.022, +bear-640x360-audio-1.m4s +#EXTINF:0.998, +bear-640x360-audio-2.m4s +#EXTINF:0.046, +bear-640x360-audio-3.m4s +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:0.697, +bear-640x360-audio-4.m4s +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-1.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-1.m4s new file mode 100644 index 0000000000..82605ec2c3 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-1.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-2.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-2.m4s new file mode 100644 index 0000000000..311f93260e Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-2.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-3.m4s b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-3.m4s new file mode 100644 index 0000000000..71e371e17a Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-3.m4s differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-iframe.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-iframe.m3u8 new file mode 100644 index 0000000000..09f586e629 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-iframe.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-I-FRAMES-ONLY +#EXT-X-MAP:URI="bear-640x360-video-init.mp4" +#EXTINF:1.001, +#EXT-X-BYTERANGE:15581@80 +bear-640x360-video-1.m4s +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:1.001, +#EXT-X-BYTERANGE:18221@80 +bear-640x360-video-2.m4s +#EXTINF:0.734, +#EXT-X-BYTERANGE:19663@80 +bear-640x360-video-3.m4s +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-init.mp4 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-init.mp4 new file mode 100644 index 0000000000..5ed12ec053 Binary files /dev/null and b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video-init.mp4 differ diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video.m3u8 new file mode 100644 index 0000000000..ed69bc21bf --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-640x360-video.m3u8 @@ -0,0 +1,14 @@ +#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-init.mp4" +#EXTINF:1.068, +bear-640x360-video-1.m4s +#EXTINF:1.001, +bear-640x360-video-2.m4s +#EXT-X-PLACEMENT-OPPORTUNITY +#EXTINF:0.734, +bear-640x360-video-3.m4s +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-1.vtt b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-1.vtt new file mode 100644 index 0000000000..81150bae25 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-1.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00:00.000 --> 00:00:00.800 +Yup, that's a bear, eh. + diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-2.vtt b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-2.vtt new file mode 100644 index 0000000000..933e153959 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-2.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00:01.000 --> 00:00:04.700 +He 's... um... doing bear-like stuff. + diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-3.vtt b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-3.vtt new file mode 100644 index 0000000000..933e153959 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-3.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00:01.000 --> 00:00:04.700 +He 's... um... doing bear-like stuff. + diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-4.vtt b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-4.vtt new file mode 100644 index 0000000000..933e153959 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-4.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00:01.000 --> 00:00:04.700 +He 's... um... doing bear-like stuff. + diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-5.vtt b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-5.vtt new file mode 100644 index 0000000000..933e153959 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text-5.vtt @@ -0,0 +1,5 @@ +WEBVTT + +00:00:01.000 --> 00:00:04.700 +He 's... um... doing bear-like stuff. + diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text.m3u8 new file mode 100644 index 0000000000..6ddb2b074a --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/bear-subtitle-english-text.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 +#EXTINF:1.000, +bear-subtitle-english-text-1.vtt +#EXTINF:1.000, +bear-subtitle-english-text-2.vtt +#EXTINF:1.000, +bear-subtitle-english-text-3.vtt +#EXTINF:1.000, +bear-subtitle-english-text-4.vtt +#EXTINF:1.000, +bear-subtitle-english-text-5.vtt +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 new file mode 100644 index 0000000000..05803d55d5 --- /dev/null +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 @@ -0,0 +1,11 @@ +#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_1",AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="bear-subtitle-english-text.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES + +#EXT-X-STREAM-INF:BANDWIDTH=1150004,CODECS="avc1.64001e,mp4a.40.2,wvtt",RESOLUTION=640x360,AUDIO="default-audio-group",SUBTITLES="default-text-group" +bear-640x360-video.m3u8 + +#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214291,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"