From c169c836136a8add870145c840d620c291211851 Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Mon, 19 Oct 2020 10:52:31 -0700 Subject: [PATCH] Add integration test for WebVTT in MP4. Change-Id: Ic8cd785d1fefde4004f27cfce346df2b2a8f643e --- packager/app/test/packager_test.py | 8 ++++++++ .../bear-english-text-1.m4s | Bin 0 -> 243 bytes .../bear-english-text-2.m4s | Bin 0 -> 241 bytes .../bear-english-text-3.m4s | Bin 0 -> 241 bytes .../bear-english-text-4.m4s | Bin 0 -> 241 bytes .../bear-english-text-5.m4s | Bin 0 -> 257 bytes .../bear-english-text-init.mp4 | Bin 0 -> 728 bytes .../testdata/segmented-webvtt-mp4/output.m3u8 | 6 ++++++ .../testdata/segmented-webvtt-mp4/output.mpd | 16 ++++++++++++++++ .../segmented-webvtt-mp4/stream_0.m3u8 | 17 +++++++++++++++++ 10 files changed, 47 insertions(+) create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-1.m4s create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-2.m4s create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-3.m4s create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-4.m4s create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-5.m4s create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-init.mp4 create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/output.mpd create mode 100644 packager/app/test/testdata/segmented-webvtt-mp4/stream_0.m3u8 diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index 512251f4bd..3c83be4eb2 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -848,6 +848,14 @@ class PackagerFunctionalTest(PackagerAppTest): self.assertPackageSuccess(streams, flags) self._CheckTestResults('single-file-webvtt-text') + def testSegmentedWebVttMp4(self): + streams = self._GetStreams(['text'], test_files=['bear-english.vtt'], + output_format='mp4', segmented=True) + flags = self._GetFlags(output_hls=True, output_dash=True) + + self.assertPackageSuccess(streams, flags) + self._CheckTestResults('segmented-webvtt-mp4') + def testMp4TrailingMoov(self): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-1.m4s b/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-1.m4s new file mode 100644 index 0000000000000000000000000000000000000000..7f6fea5f0301b5140ec26bede2b97e8ca57b12d4 GIT binary patch literal 243 zcmXv`K?=e!5M0}f#~!^Iq|i$d1VJC-#baz5QfO>Qwqk$bAN-6@@fprq9hmIw%ua}? zOgsf2_B#T)G#o)MyV1!t-X_>}>dakoU_q3>XZhdhDc)l?dp`^ovhdcK-yJ%1;;6-6 zvG^Hnpv4yo3bux4`F%@{;}!o(o`J}6g;{|wa0wo~(bB1I%njx`=&3)Cp;qiPS4nAg OX?3hs>$XzCS^EL1E-Re? literal 0 HcmV?d00001 diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-2.m4s b/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-2.m4s new file mode 100644 index 0000000000000000000000000000000000000000..a59e2a79add424b7aa7307d6577b63fbc9931d2b GIT binary patch literal 241 zcmXv{T?)c5436^xd+-2#5PWe3!GQ?A``{(&y1L@BmNgT13$NhqJcfyLA0*#TLIMEm zL}SFb-vPs?aNt7m)}*FFmpI-gZ=W(}EC80Dsb&vv@vol+iy=6cIl9J95oF94>W$=z zB+uZ;ns3ebpkyt`$yu7D{DBqqL&yBzg_iXRt&yGbK~ymp(Twf6R-2@?Rs%}6!FM-x PtxaFF{$8s@gLC=|%_T4# literal 0 HcmV?d00001 diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-3.m4s b/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-3.m4s new file mode 100644 index 0000000000000000000000000000000000000000..08140209f9e829b7e4888d39439138e7b6f8d64f GIT binary patch literal 241 zcmXYqK@Ng25Jg8>xMkr1x-fAgO-v*qChlE$iAt$7GL+E4$Su5rH}V)B!x`Zx?fn1x z+XBEQ(%4~l*aOSQQ1C*@*2KC*7a8xOw@*1|EdY`)!0Iza$?z8Tnt;U+9NQFKZRbwH z^FqB5u1NS2j_l>`{2t`&MJYK;ll}j(rhaHS&s}KPpU@iVd7|z%}NanpS zF9`r_kcKw2hdr=7#v`vF*%~bK;E?eSy?x3#YX-3R0<1n`lnifSuMyY~qhp%{SK6tw z0}S0oM+map}rJqi&|^d V2ia}(&0XCJ)1|eq3Wd}=r+=jhFU|k} literal 0 HcmV?d00001 diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-5.m4s b/packager/app/test/testdata/segmented-webvtt-mp4/bear-english-text-5.m4s new file mode 100644 index 0000000000000000000000000000000000000000..5c8f82c5da402b4ecbd1634ce793eae6566bb949 GIT binary patch literal 257 zcmXX;Q3`@k5ZsKQzx?b|Lg+_@AfXEc9iR)me7=-?D!w)H79F80^xuIxMziL^?99&Y z4iSZpht{_H9id9s8~`h`R<6jbaj+v->WA!6GotyIX!RPWai+I;&%aUGrZJGdHHDsT z7T_~?O8hm8@6iStStCH?v(YSK$_}~fYvjs}2Vm!Yz$soL@Dey$t>h=YGiTtqRYP^k ggRM)FBTA(|SlPpE@ieEuc=j-g2>XOu!_x zv9BkHsE<2cgRi?^op-PLUJh+8Ru;JPXIWvB+a5*B;P(GFeEF#t?Bs6(*c9^H^pVf# z*bcB2j4$quN0@7NlDF)LDORCQQ=UYDk?J=I!vJ+xg4AC)^&59FWbaUG))0@bPP&7B zAE_D#bST9nve+#urgo@E0EsyZWQqUKEUL&4GfD)`u|&=*OGs`3y(W*@6mx~M%v*m! RHXzczTBc5hqhu&h@e8T#bLjv8 literal 0 HcmV?d00001 diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 b/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 new file mode 100644 index 0000000000..ad00c97c90 --- /dev/null +++ b/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 @@ -0,0 +1,6 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-INDEPENDENT-SEGMENTS + +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/output.mpd b/packager/app/test/testdata/segmented-webvtt-mp4/output.mpd new file mode 100644 index 0000000000..2979d0fbe8 --- /dev/null +++ b/packager/app/test/testdata/segmented-webvtt-mp4/output.mpd @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/stream_0.m3u8 b/packager/app/test/testdata/segmented-webvtt-mp4/stream_0.m3u8 new file mode 100644 index 0000000000..a6990bdc74 --- /dev/null +++ b/packager/app/test/testdata/segmented-webvtt-mp4/stream_0.m3u8 @@ -0,0 +1,17 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:1 +#EXT-X-PLAYLIST-TYPE:VOD +#EXT-X-MAP:URI="bear-english-text-init.mp4" +#EXTINF:1.000, +bear-english-text-1.m4s +#EXTINF:1.000, +bear-english-text-2.m4s +#EXTINF:1.000, +bear-english-text-3.m4s +#EXTINF:1.000, +bear-english-text-4.m4s +#EXTINF:1.000, +bear-english-text-5.m4s +#EXT-X-ENDLIST