HLS WebVtt End-to-End Tests

Created end-to-end tests for the segmented webvtt text in HLS. The
text stream is longer than both audio and video, so there are more
text segments than video/audio.

Change-Id: Ib860ccd3f2ac0048983fdeebe3847a0b9dcbc160
This commit is contained in:
Aaron Vaage 2018-02-06 09:07:10 -08:00
parent 393f989839
commit 7096ca8998
19 changed files with 93 additions and 0 deletions

View File

@ -1371,6 +1371,16 @@ class PackagerFunctionalTest(PackagerAppTest):
self._AssertStreamInfo(self.output[0], 'is_encrypted: true') self._AssertStreamInfo(self.output[0], 'is_encrypted: true')
self._AssertStreamInfo(self.output[1], 'is_encrypted: true') self._AssertStreamInfo(self.output[1], 'is_encrypted: true')
def testHlsSegmentedWebVtt(self):
streams = self._GetStreams(['audio', 'video'], segmented=True)
streams += self._GetStreams(
['text'], test_files=['bear-subtitle-english.vtt'], segmented=True)
flags = self._GetFlags(output_hls=True)
self.assertPackageSuccess(streams, flags)
self._DiffDir('hls-segmented-webvtt')
def _AssertStreamInfo(self, stream, info): def _AssertStreamInfo(self, stream, info):
stream_info = self.packager.DumpStreamInfo(stream) stream_info = self.packager.DumpStreamInfo(stream)
self.assertIn('Found 1 stream(s).', stream_info) self.assertIn('Found 1 stream(s).', stream_info)

View File

@ -0,0 +1,9 @@
#EXTM3U
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_1.m3u8",GROUP-ID="default-audio-group",NAME="stream_1",AUTOSELECT=YES,CHANNELS="2"
#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES
#EXT-X-STREAM-INF:BANDWIDTH=1105163,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group",SUBTITLES="default-text-group"
stream_2.m3u8

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
WEBVTT
00:00:00.000 --> 00:00:00.800
Yup, that's a bear, eh.

View File

@ -0,0 +1,5 @@
WEBVTT
00:00:01.000 --> 00:00:04.700
He 's... um... doing bear-like stuff.

View File

@ -0,0 +1,5 @@
WEBVTT
00:00:01.000 --> 00:00:04.700
He 's... um... doing bear-like stuff.

View File

@ -0,0 +1,5 @@
WEBVTT
00:00:01.000 --> 00:00:04.700
He 's... um... doing bear-like stuff.

View File

@ -0,0 +1,5 @@
WEBVTT
00:00:01.000 --> 00:00:04.700
He 's... um... doing bear-like stuff.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
#EXT-X-TARGETDURATION:2
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:1.000,
output_text-1.vtt
#EXTINF:1.000,
output_text-2.vtt
#EXTINF:1.000,
output_text-3.vtt
#EXTINF:1.000,
output_text-4.vtt
#EXTINF:1.000,
output_text-5.vtt
#EXT-X-ENDLIST

View File

@ -0,0 +1,13 @@
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
#EXT-X-TARGETDURATION:2
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="output_audio-init.mp4"
#EXTINF:0.998,
output_audio-1.m4s
#EXTINF:0.998,
output_audio-2.m4s
#EXTINF:0.766,
output_audio-3.m4s
#EXT-X-ENDLIST

View File

@ -0,0 +1,13 @@
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
#EXT-X-TARGETDURATION:2
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="output_video-init.mp4"
#EXTINF:1.001,
output_video-1.m4s
#EXTINF:1.001,
output_video-2.m4s
#EXTINF:0.734,
output_video-3.m4s
#EXT-X-ENDLIST

View File

@ -0,0 +1,7 @@
WEBVTT
00:00:00.000 --> 00:00:00.800
Yup, that's a bear, eh.
00:00:01.000 --> 00:00:04.700
He 's... um... doing bear-like stuff.