Add end to end test for ac3
Also updated bear-640x360.ts test files. Change-Id: Iff53800b7b4706fb2f6d94682b9446406a94cd6f
This commit is contained in:
parent
435d69c3a6
commit
53892c7467
|
@ -429,7 +429,7 @@ class PackagerFunctionalTest(PackagerAppTest):
|
||||||
self._DiffGold(self.output[2], 'subtitle-english-golden.vtt')
|
self._DiffGold(self.output[2], 'subtitle-english-golden.vtt')
|
||||||
self._DiffGold(self.mpd_output, 'bear-640x360-avt-golden.mpd')
|
self._DiffGold(self.mpd_output, 'bear-640x360-avt-golden.mpd')
|
||||||
|
|
||||||
def testPackageAvcTs(self):
|
def testPackageAvcAacTs(self):
|
||||||
# Currently we only support live packaging for ts.
|
# Currently we only support live packaging for ts.
|
||||||
self.assertPackageSuccess(
|
self.assertPackageSuccess(
|
||||||
self._GetStreams(
|
self._GetStreams(
|
||||||
|
@ -452,6 +452,46 @@ class PackagerFunctionalTest(PackagerAppTest):
|
||||||
self._DiffGold(
|
self._DiffGold(
|
||||||
os.path.join(self.tmp_dir, 'video.m3u8'), 'bear-640x360-v-golden.m3u8')
|
os.path.join(self.tmp_dir, 'video.m3u8'), 'bear-640x360-v-golden.m3u8')
|
||||||
|
|
||||||
|
def testPackageAvcAc3Ts(self):
|
||||||
|
# Currently we only support live packaging for ts.
|
||||||
|
self.assertPackageSuccess(
|
||||||
|
self._GetStreams(
|
||||||
|
['audio', 'video'],
|
||||||
|
output_format='ts',
|
||||||
|
live=True,
|
||||||
|
hls=True,
|
||||||
|
test_files=['bear-640x360-ac3.ts']),
|
||||||
|
self._GetFlags(output_hls=True))
|
||||||
|
self._DiffLiveGold(self.output[0],
|
||||||
|
'bear-640x360-ac3-golden',
|
||||||
|
output_format='ts')
|
||||||
|
self._DiffLiveGold(self.output[1],
|
||||||
|
'bear-640x360-v-golden',
|
||||||
|
output_format='ts')
|
||||||
|
self._DiffGold(self.hls_master_playlist_output,
|
||||||
|
'bear-640x360-av-ac3-master-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'audio.m3u8'),
|
||||||
|
'bear-640x360-ac3-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'video.m3u8'), 'bear-640x360-v-golden.m3u8')
|
||||||
|
|
||||||
|
def testPackageAvcAc3TsToMp4(self):
|
||||||
|
self.assertPackageSuccess(
|
||||||
|
self._GetStreams(
|
||||||
|
['audio', 'video'], hls=True, test_files=['bear-640x360-ac3.ts']),
|
||||||
|
self._GetFlags(output_hls=True))
|
||||||
|
self._DiffGold(self.output[0], 'bear-640x360-ac3-from-ts-golden.mp4')
|
||||||
|
self._DiffGold(self.output[1], 'bear-640x360-v-from-ts-golden.mp4')
|
||||||
|
self._DiffGold(self.hls_master_playlist_output,
|
||||||
|
'bear-640x360-av-ac3-ts-to-mp4-master-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'audio.m3u8'),
|
||||||
|
'bear-640x360-ac3-ts-to-mp4-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'video.m3u8'),
|
||||||
|
'bear-640x360-v-ts-to-mp4-golden.m3u8')
|
||||||
|
|
||||||
def testPackageAvcTsLivePlaylist(self):
|
def testPackageAvcTsLivePlaylist(self):
|
||||||
self.assertPackageSuccess(
|
self.assertPackageSuccess(
|
||||||
self._GetStreams(
|
self._GetStreams(
|
||||||
|
@ -806,6 +846,31 @@ class PackagerFunctionalTest(PackagerAppTest):
|
||||||
os.path.join(self.tmp_dir, 'video.m3u8'),
|
os.path.join(self.tmp_dir, 'video.m3u8'),
|
||||||
'bear-640x360-v-fairplay-enc-golden.m3u8')
|
'bear-640x360-v-fairplay-enc-golden.m3u8')
|
||||||
|
|
||||||
|
def testPackageAvcAc3TsWithEncryption(self):
|
||||||
|
# Currently we only support live packaging for ts.
|
||||||
|
self.assertPackageSuccess(
|
||||||
|
self._GetStreams(
|
||||||
|
['audio', 'video'],
|
||||||
|
output_format='ts',
|
||||||
|
live=True,
|
||||||
|
hls=True,
|
||||||
|
test_files=['bear-640x360-ac3.ts']),
|
||||||
|
self._GetFlags(encryption=True, output_hls=True))
|
||||||
|
self._DiffLiveGold(self.output[0],
|
||||||
|
'bear-640x360-ac3-enc-golden',
|
||||||
|
output_format='ts')
|
||||||
|
self._DiffLiveGold(self.output[1],
|
||||||
|
'bear-640x360-v-enc-golden',
|
||||||
|
output_format='ts')
|
||||||
|
self._DiffGold(self.hls_master_playlist_output,
|
||||||
|
'bear-640x360-av-ac3-master-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'audio.m3u8'),
|
||||||
|
'bear-640x360-ac3-enc-golden.m3u8')
|
||||||
|
self._DiffGold(
|
||||||
|
os.path.join(self.tmp_dir, 'video.m3u8'),
|
||||||
|
'bear-640x360-v-enc-golden.m3u8')
|
||||||
|
|
||||||
def testPackageAvcTsWithEncryptionExerciseEmulationPrevention(self):
|
def testPackageAvcTsWithEncryptionExerciseEmulationPrevention(self):
|
||||||
self.encryption_key = 'ad7e9786def9159db6724be06dfcde7a'
|
self.encryption_key = 'ad7e9786def9159db6724be06dfcde7a'
|
||||||
# Currently we only support live packaging for ts.
|
# Currently we only support live packaging for ts.
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,14 @@
|
||||||
|
#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:0.975,
|
||||||
|
output_audio-1.ts
|
||||||
|
#EXTINF:1.010,
|
||||||
|
output_audio-2.ts
|
||||||
|
#EXT-X-DISCONTINUITY
|
||||||
|
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",IV=0x3334353637383930,KEYFORMAT="identity"
|
||||||
|
#EXTINF:0.801,
|
||||||
|
output_audio-3.ts
|
||||||
|
#EXT-X-ENDLIST
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,12 @@
|
||||||
|
#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:0.975,
|
||||||
|
output_audio-1.ts
|
||||||
|
#EXTINF:1.010,
|
||||||
|
output_audio-2.ts
|
||||||
|
#EXTINF:0.801,
|
||||||
|
output_audio-3.ts
|
||||||
|
#EXT-X-ENDLIST
|
|
@ -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
|
||||||
|
#EXT-X-MAP:URI="output_audio.mp4",BYTERANGE="726@0"
|
||||||
|
#EXTINF:0.975,
|
||||||
|
#EXT-X-BYTERANGE:23728@794
|
||||||
|
output_audio.mp4
|
||||||
|
#EXTINF:1.010,
|
||||||
|
#EXT-X-BYTERANGE:24574
|
||||||
|
output_audio.mp4
|
||||||
|
#EXTINF:0.801,
|
||||||
|
#EXT-X-BYTERANGE:19510
|
||||||
|
output_audio.mp4
|
||||||
|
#EXT-X-ENDLIST
|
|
@ -0,0 +1,5 @@
|
||||||
|
#EXTM3U
|
||||||
|
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
|
||||||
|
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio.m3u8",GROUP-ID="audio",NAME="stream_0",CHANNELS="2"
|
||||||
|
#EXT-X-STREAM-INF:BANDWIDTH=1242861,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,AUDIO="audio"
|
||||||
|
video.m3u8
|
|
@ -0,0 +1,5 @@
|
||||||
|
#EXTM3U
|
||||||
|
## Generated with https://github.com/google/shaka-packager version <tag>-<hash>-<test>
|
||||||
|
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio.m3u8",GROUP-ID="audio",NAME="stream_0",CHANNELS="2"
|
||||||
|
#EXT-X-STREAM-INF:BANDWIDTH=1168319,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,AUDIO="audio"
|
||||||
|
video.m3u8
|
Binary file not shown.
|
@ -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
|
||||||
|
#EXT-X-MAP:URI="output_video.mp4",BYTERANGE="823@0"
|
||||||
|
#EXTINF:1.001,
|
||||||
|
#EXT-X-BYTERANGE:99313@891
|
||||||
|
output_video.mp4
|
||||||
|
#EXTINF:1.001,
|
||||||
|
#EXT-X-BYTERANGE:121807
|
||||||
|
output_video.mp4
|
||||||
|
#EXTINF:0.734,
|
||||||
|
#EXT-X-BYTERANGE:79662
|
||||||
|
output_video.mp4
|
||||||
|
#EXT-X-ENDLIST
|
Binary file not shown.
Loading…
Reference in New Issue