Skip to content

Commit dc6196d

Browse files
authored
feat: Add IAMF support (#1415) (#1416)
1 parent d88ed27 commit dc6196d

37 files changed

+858
-3
lines changed

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Daniel Cantarín <[email protected]>
3232
David Cavar <[email protected]>
3333
Dennis E. Mungai (Brainiarc7) <[email protected]>
3434
Evgeny Zajcev <[email protected]>
35+
Felicia Lim <[email protected]>
3536
Gabe Kopley <[email protected]>
3637
Geoff Jukes <[email protected]>
3738
Haoming Chen <[email protected]>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Shaka Packager supports:
4646
| FLAC | I / O | - | - | - | - |
4747
| Opus | I / O³ | I / O | - | - | - |
4848
| Vorbis | - | I / O | - | - | - |
49+
| IAMF | I / O | - | - | - | - |
4950

5051
NOTES:
5152
- I for input and O for output.

packager/app/test/packager_test.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,38 @@ def testAv1WebM(self):
11041104
self._GetFlags(output_dash=True, output_hls=True))
11051105
self._CheckTestResults('av1-webm')
11061106

1107+
def testIamfWithBaseProfileAndPcm(self):
1108+
self.assertPackageSuccess(
1109+
self._GetStreams(['audio'],
1110+
output_format='mp4',
1111+
test_files=['bear-iamf-base-pcm.mp4']),
1112+
self._GetFlags(output_dash=True, output_hls=True))
1113+
self._CheckTestResults('iamf-base-pcm-mp4')
1114+
1115+
def testIamfWithBaseProfileAndOpus(self):
1116+
self.assertPackageSuccess(
1117+
self._GetStreams(['audio'],
1118+
output_format='mp4',
1119+
test_files=['bear-iamf-base-opus.mp4']),
1120+
self._GetFlags(output_dash=True, output_hls=True))
1121+
self._CheckTestResults('iamf-base-opus-mp4')
1122+
1123+
def testIamfWithSimpleProfileAndAacLc(self):
1124+
self.assertPackageSuccess(
1125+
self._GetStreams(['audio'],
1126+
output_format='mp4',
1127+
test_files=['bear-iamf-simple-aac-lc.mp4']),
1128+
self._GetFlags(output_dash=True, output_hls=True))
1129+
self._CheckTestResults('iamf-simple-aac-lc-mp4')
1130+
1131+
def testIamfWithSimpleProfileAndFlac(self):
1132+
self.assertPackageSuccess(
1133+
self._GetStreams(['audio'],
1134+
output_format='mp4',
1135+
test_files=['bear-iamf-simple-flac.mp4']),
1136+
self._GetFlags(output_dash=True, output_hls=True))
1137+
self._CheckTestResults('iamf-simple-flac-mp4')
1138+
11071139
def testEncryption(self):
11081140
self.assertPackageSuccess(
11091141
self._GetStreams(['audio', 'video']),
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#EXTM3U
2+
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test>
3+
4+
#EXT-X-INDEPENDENT-SEGMENTS
5+
6+
#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="0"
7+
8+
#EXT-X-STREAM-INF:BANDWIDTH=136796,AVERAGE-BANDWIDTH=134443,CODECS="iamf.001.001.Opus",AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE
9+
stream_0.m3u8
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test>-->
3+
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT2.739958S">
4+
<Period id="0">
5+
<AdaptationSet id="0" contentType="audio" subsegmentAlignment="true">
6+
<Representation id="0" bandwidth="136796" codecs="iamf.001.001.Opus" mimeType="audio/mp4" audioSamplingRate="0">
7+
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="0"/>
8+
<BaseURL>bear-iamf-base-opus-audio.mp4</BaseURL>
9+
<SegmentBase indexRange="892-959" timescale="48000">
10+
<Initialization range="0-891"/>
11+
</SegmentBase>
12+
</Representation>
13+
</AdaptationSet>
14+
</Period>
15+
</MPD>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#EXTM3U
2+
#EXT-X-VERSION:6
3+
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test>
4+
#EXT-X-TARGETDURATION:2
5+
#EXT-X-PLAYLIST-TYPE:VOD
6+
#EXT-X-MAP:URI="bear-iamf-base-opus-audio.mp4",BYTERANGE="892@0"
7+
#EXTINF:1.014,
8+
#EXT-X-BYTERANGE:16835@960
9+
bear-iamf-base-opus-audio.mp4
10+
#EXTINF:1.000,
11+
#EXT-X-BYTERANGE:16789
12+
bear-iamf-base-opus-audio.mp4
13+
#EXTINF:0.726,
14+
#EXT-X-BYTERANGE:12422
15+
bear-iamf-base-opus-audio.mp4
16+
#EXT-X-ENDLIST
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#EXTM3U
2+
## Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test>
3+
4+
#EXT-X-INDEPENDENT-SEGMENTS
5+
6+
#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="0"
7+
8+
#EXT-X-STREAM-INF:BANDWIDTH=2177226,AVERAGE-BANDWIDTH=1803234,CODECS="iamf.001.001.ipcm",AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE
9+
stream_0.m3u8
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--Generated with https://github.com/shaka-project/shaka-packager version <tag>-<hash>-<test>-->
3+
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT2.739958S">
4+
<Period id="0">
5+
<AdaptationSet id="0" contentType="audio" subsegmentAlignment="true">
6+
<Representation id="0" bandwidth="2177226" codecs="iamf.001.001.ipcm" mimeType="audio/mp4" audioSamplingRate="0">
7+
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="0"/>
8+
<BaseURL>bear-iamf-base-pcm-audio.mp4</BaseURL>
9+
<SegmentBase indexRange="850-917" timescale="48000">
10+
<Initialization range="0-849"/>
11+
</SegmentBase>
12+
</Representation>
13+
</AdaptationSet>
14+
</Period>
15+
</MPD>

0 commit comments

Comments
 (0)