Skip to content

Commit 297dc5e

Browse files
icbakercopybara-github
authored andcommitted
Add a test for an MP4 file with an HEVC SEI NAL unit
This is a follow-up to Issue: #2457 using the test file provided in Issue: #2456. PiperOrigin-RevId: 762387987
1 parent 9e9a2a8 commit 297dc5e

12 files changed

+1096
-0
lines changed

libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ public void mp4sampleWithIamfTrack() throws Exception {
228228
assertExtractorBehavior("media/mp4/sample_iamf.mp4");
229229
}
230230

231+
// https://github.com/androidx/media/issues/2456
232+
@Test
233+
public void mp4SampleWithUnrecognizedHevcSeiType() throws Exception {
234+
assertExtractorBehavior("media/mp4/sample_unrecognized_hevc_sei.mp4");
235+
}
236+
231237
@Test
232238
public void mp4SampleWithMvHevc8bit() throws Exception {
233239
assertExtractorBehavior("media/mp4/water_180_mvhevc_5frames.mov");
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
seekMap:
2+
isSeekable = true
3+
duration = 439000
4+
getPosition(0) = [[timeUs=0, position=2083]]
5+
getPosition(1) = [[timeUs=0, position=2083]]
6+
getPosition(219500) = [[timeUs=0, position=2083]]
7+
getPosition(439000) = [[timeUs=0, position=2083]]
8+
numberOfTracks = 2
9+
track 0:
10+
total output bytes = 18676
11+
sample count = 3
12+
track duration = 101000
13+
format 0:
14+
averageBitrate = 1492587
15+
peakBitrate = 1492587
16+
id = 1
17+
containerMimeType = video/mp4
18+
sampleMimeType = video/hevc
19+
codecs = hvc1.1.6.L120.90
20+
maxInputSize = 18533
21+
maxNumReorderSamples = 4
22+
width = 1080
23+
height = 720
24+
decodedWidth = 1080
25+
decodedHeight = 720
26+
frameRate = 29.97
27+
maxSubLayers = 4
28+
colorInfo:
29+
lumaBitdepth = 8
30+
chromaBitdepth = 8
31+
language = und
32+
metadata = entries=[TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
33+
initializationData:
34+
data = length 511, hash 6D49F3C4
35+
sample 0:
36+
time = 0
37+
flags = 1
38+
data = length 18503, hash F7436CC0
39+
sample 1:
40+
time = 66733
41+
flags = 0
42+
data = length 156, hash 585D6B61
43+
sample 2:
44+
time = 33366
45+
flags = 536870912
46+
data = length 17, hash 1190AD26
47+
track 1:
48+
total output bytes = 5155
49+
sample count = 17
50+
track duration = 439000
51+
format 0:
52+
averageBitrate = 94042
53+
peakBitrate = 128000
54+
id = 2
55+
containerMimeType = video/mp4
56+
sampleMimeType = audio/mp4a-latm
57+
codecs = mp4a.40.2
58+
maxInputSize = 485
59+
channelCount = 1
60+
sampleRate = 44100
61+
language = und
62+
metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
63+
initializationData:
64+
data = length 5, hash 2B7623A
65+
sample 0:
66+
time = 43000
67+
flags = 1
68+
data = length 22, hash F5D5E5D7
69+
sample 1:
70+
time = 66219
71+
flags = 1
72+
data = length 4, hash EEDBF
73+
sample 2:
74+
time = 89439
75+
flags = 1
76+
data = length 113, hash 36A80FCB
77+
sample 3:
78+
time = 112659
79+
flags = 1
80+
data = length 455, hash 8CE44CEF
81+
sample 4:
82+
time = 135879
83+
flags = 1
84+
data = length 387, hash 3F9FB0FA
85+
sample 5:
86+
time = 159099
87+
flags = 1
88+
data = length 345, hash ABE5F4DD
89+
sample 6:
90+
time = 182319
91+
flags = 1
92+
data = length 324, hash 541F8DBE
93+
sample 7:
94+
time = 205539
95+
flags = 1
96+
data = length 369, hash 336865EB
97+
sample 8:
98+
time = 228759
99+
flags = 1
100+
data = length 350, hash 22C98A72
101+
sample 9:
102+
time = 251979
103+
flags = 1
104+
data = length 362, hash E1945F60
105+
sample 10:
106+
time = 275199
107+
flags = 1
108+
data = length 346, hash C44D0DBB
109+
sample 11:
110+
time = 298419
111+
flags = 1
112+
data = length 353, hash 4CC84655
113+
sample 12:
114+
time = 321639
115+
flags = 1
116+
data = length 346, hash 5A2B92A2
117+
sample 13:
118+
time = 344859
119+
flags = 1
120+
data = length 356, hash B0AD62B6
121+
sample 14:
122+
time = 368079
123+
flags = 1
124+
data = length 352, hash 935D5964
125+
sample 15:
126+
time = 391299
127+
flags = 1
128+
data = length 350, hash 432D3CAF
129+
sample 16:
130+
time = 414519
131+
flags = 536870913
132+
data = length 321, hash AC4F3C87
133+
tracksEnded = true
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
seekMap:
2+
isSeekable = true
3+
duration = 439000
4+
getPosition(0) = [[timeUs=0, position=2083]]
5+
getPosition(1) = [[timeUs=0, position=2083]]
6+
getPosition(219500) = [[timeUs=0, position=2083]]
7+
getPosition(439000) = [[timeUs=0, position=2083]]
8+
numberOfTracks = 2
9+
track 0:
10+
total output bytes = 18676
11+
sample count = 3
12+
track duration = 101000
13+
format 0:
14+
averageBitrate = 1492587
15+
peakBitrate = 1492587
16+
id = 1
17+
containerMimeType = video/mp4
18+
sampleMimeType = video/hevc
19+
codecs = hvc1.1.6.L120.90
20+
maxInputSize = 18533
21+
maxNumReorderSamples = 4
22+
width = 1080
23+
height = 720
24+
decodedWidth = 1080
25+
decodedHeight = 720
26+
frameRate = 29.97
27+
maxSubLayers = 4
28+
colorInfo:
29+
lumaBitdepth = 8
30+
chromaBitdepth = 8
31+
language = und
32+
metadata = entries=[TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
33+
initializationData:
34+
data = length 511, hash 6D49F3C4
35+
sample 0:
36+
time = 0
37+
flags = 1
38+
data = length 18503, hash F7436CC0
39+
sample 1:
40+
time = 66733
41+
flags = 0
42+
data = length 156, hash 585D6B61
43+
sample 2:
44+
time = 33366
45+
flags = 536870912
46+
data = length 17, hash 1190AD26
47+
track 1:
48+
total output bytes = 4561
49+
sample count = 13
50+
track duration = 439000
51+
format 0:
52+
averageBitrate = 94042
53+
peakBitrate = 128000
54+
id = 2
55+
containerMimeType = video/mp4
56+
sampleMimeType = audio/mp4a-latm
57+
codecs = mp4a.40.2
58+
maxInputSize = 485
59+
channelCount = 1
60+
sampleRate = 44100
61+
language = und
62+
metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
63+
initializationData:
64+
data = length 5, hash 2B7623A
65+
sample 0:
66+
time = 135879
67+
flags = 1
68+
data = length 387, hash 3F9FB0FA
69+
sample 1:
70+
time = 159099
71+
flags = 1
72+
data = length 345, hash ABE5F4DD
73+
sample 2:
74+
time = 182319
75+
flags = 1
76+
data = length 324, hash 541F8DBE
77+
sample 3:
78+
time = 205539
79+
flags = 1
80+
data = length 369, hash 336865EB
81+
sample 4:
82+
time = 228759
83+
flags = 1
84+
data = length 350, hash 22C98A72
85+
sample 5:
86+
time = 251979
87+
flags = 1
88+
data = length 362, hash E1945F60
89+
sample 6:
90+
time = 275199
91+
flags = 1
92+
data = length 346, hash C44D0DBB
93+
sample 7:
94+
time = 298419
95+
flags = 1
96+
data = length 353, hash 4CC84655
97+
sample 8:
98+
time = 321639
99+
flags = 1
100+
data = length 346, hash 5A2B92A2
101+
sample 9:
102+
time = 344859
103+
flags = 1
104+
data = length 356, hash B0AD62B6
105+
sample 10:
106+
time = 368079
107+
flags = 1
108+
data = length 352, hash 935D5964
109+
sample 11:
110+
time = 391299
111+
flags = 1
112+
data = length 350, hash 432D3CAF
113+
sample 12:
114+
time = 414519
115+
flags = 536870913
116+
data = length 321, hash AC4F3C87
117+
tracksEnded = true
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
seekMap:
2+
isSeekable = true
3+
duration = 439000
4+
getPosition(0) = [[timeUs=0, position=2083]]
5+
getPosition(1) = [[timeUs=0, position=2083]]
6+
getPosition(219500) = [[timeUs=0, position=2083]]
7+
getPosition(439000) = [[timeUs=0, position=2083]]
8+
numberOfTracks = 2
9+
track 0:
10+
total output bytes = 18676
11+
sample count = 3
12+
track duration = 101000
13+
format 0:
14+
averageBitrate = 1492587
15+
peakBitrate = 1492587
16+
id = 1
17+
containerMimeType = video/mp4
18+
sampleMimeType = video/hevc
19+
codecs = hvc1.1.6.L120.90
20+
maxInputSize = 18533
21+
maxNumReorderSamples = 4
22+
width = 1080
23+
height = 720
24+
decodedWidth = 1080
25+
decodedHeight = 720
26+
frameRate = 29.97
27+
maxSubLayers = 4
28+
colorInfo:
29+
lumaBitdepth = 8
30+
chromaBitdepth = 8
31+
language = und
32+
metadata = entries=[TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
33+
initializationData:
34+
data = length 511, hash 6D49F3C4
35+
sample 0:
36+
time = 0
37+
flags = 1
38+
data = length 18503, hash F7436CC0
39+
sample 1:
40+
time = 66733
41+
flags = 0
42+
data = length 156, hash 585D6B61
43+
sample 2:
44+
time = 33366
45+
flags = 536870912
46+
data = length 17, hash 1190AD26
47+
track 1:
48+
total output bytes = 2424
49+
sample count = 7
50+
track duration = 439000
51+
format 0:
52+
averageBitrate = 94042
53+
peakBitrate = 128000
54+
id = 2
55+
containerMimeType = video/mp4
56+
sampleMimeType = audio/mp4a-latm
57+
codecs = mp4a.40.2
58+
maxInputSize = 485
59+
channelCount = 1
60+
sampleRate = 44100
61+
language = und
62+
metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf58.76.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
63+
initializationData:
64+
data = length 5, hash 2B7623A
65+
sample 0:
66+
time = 275199
67+
flags = 1
68+
data = length 346, hash C44D0DBB
69+
sample 1:
70+
time = 298419
71+
flags = 1
72+
data = length 353, hash 4CC84655
73+
sample 2:
74+
time = 321639
75+
flags = 1
76+
data = length 346, hash 5A2B92A2
77+
sample 3:
78+
time = 344859
79+
flags = 1
80+
data = length 356, hash B0AD62B6
81+
sample 4:
82+
time = 368079
83+
flags = 1
84+
data = length 352, hash 935D5964
85+
sample 5:
86+
time = 391299
87+
flags = 1
88+
data = length 350, hash 432D3CAF
89+
sample 6:
90+
time = 414519
91+
flags = 536870913
92+
data = length 321, hash AC4F3C87
93+
tracksEnded = true

0 commit comments

Comments
 (0)