mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add test file with metadata track
Mp4Muxer supports adding Metadata track.
Added test file to cover this scenario.
PiperOrigin-RevId: 531496409
(cherry picked from commit b3fd202e11)
This commit is contained in:
parent
2478b48997
commit
80aac22cf9
2 changed files with 87 additions and 1 deletions
|
|
@ -45,11 +45,12 @@ import org.junit.runners.Parameterized.Parameters;
|
||||||
public class Mp4MuxerEndToEndTest {
|
public class Mp4MuxerEndToEndTest {
|
||||||
private static final String H264_MP4 = "sample.mp4";
|
private static final String H264_MP4 = "sample.mp4";
|
||||||
private static final String H265_HDR10_MP4 = "hdr10-720p.mp4";
|
private static final String H265_HDR10_MP4 = "hdr10-720p.mp4";
|
||||||
|
private static final String H265_WITH_METADATA_TRACK_MP4 = "h265_with_metadata_track.mp4";
|
||||||
private static final String AV1_MP4 = "sample_av1.mp4";
|
private static final String AV1_MP4 = "sample_av1.mp4";
|
||||||
|
|
||||||
@Parameters(name = "{0}")
|
@Parameters(name = "{0}")
|
||||||
public static ImmutableList<String> mediaSamples() {
|
public static ImmutableList<String> mediaSamples() {
|
||||||
return ImmutableList.of(H264_MP4, H265_HDR10_MP4, AV1_MP4);
|
return ImmutableList.of(H264_MP4, H265_HDR10_MP4, H265_WITH_METADATA_TRACK_MP4, AV1_MP4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Parameter public String inputFile;
|
@Parameter public String inputFile;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
seekMap:
|
||||||
|
isSeekable = true
|
||||||
|
duration = 66700
|
||||||
|
getPosition(0) = [[timeUs=0, position=44]]
|
||||||
|
getPosition(1) = [[timeUs=0, position=44]]
|
||||||
|
getPosition(33350) = [[timeUs=0, position=44]]
|
||||||
|
getPosition(66700) = [[timeUs=0, position=44]]
|
||||||
|
numberOfTracks = 3
|
||||||
|
track 0:
|
||||||
|
total output bytes = 387
|
||||||
|
sample count = 3
|
||||||
|
format 0:
|
||||||
|
id = 1
|
||||||
|
sampleMimeType = application/meta
|
||||||
|
maxInputSize = 161
|
||||||
|
sample 0:
|
||||||
|
time = 0
|
||||||
|
flags = 1
|
||||||
|
data = length 131, hash 37A90BF3
|
||||||
|
sample 1:
|
||||||
|
time = 33344
|
||||||
|
flags = 1
|
||||||
|
data = length 125, hash 1F92C1BF
|
||||||
|
sample 2:
|
||||||
|
time = 66700
|
||||||
|
flags = 536870913
|
||||||
|
data = length 131, hash 47B06CA4
|
||||||
|
track 1:
|
||||||
|
total output bytes = 1726
|
||||||
|
sample count = 3
|
||||||
|
format 0:
|
||||||
|
averageBitrate = 192000
|
||||||
|
peakBitrate = 192000
|
||||||
|
id = 2
|
||||||
|
sampleMimeType = audio/mp4a-latm
|
||||||
|
codecs = mp4a.40.2
|
||||||
|
maxInputSize = 627
|
||||||
|
channelCount = 2
|
||||||
|
sampleRate = 48000
|
||||||
|
language = ```
|
||||||
|
initializationData:
|
||||||
|
data = length 2, hash 560
|
||||||
|
sample 0:
|
||||||
|
time = 0
|
||||||
|
flags = 1
|
||||||
|
data = length 597, hash 36BCB84D
|
||||||
|
sample 1:
|
||||||
|
time = 38041
|
||||||
|
flags = 1
|
||||||
|
data = length 571, hash FD73DCB0
|
||||||
|
sample 2:
|
||||||
|
time = 59375
|
||||||
|
flags = 536870913
|
||||||
|
data = length 558, hash 6A62DD7F
|
||||||
|
track 2:
|
||||||
|
total output bytes = 678996
|
||||||
|
sample count = 3
|
||||||
|
format 0:
|
||||||
|
id = 3
|
||||||
|
sampleMimeType = video/hevc
|
||||||
|
codecs = hvc1.1.6.L153.B0
|
||||||
|
maxInputSize = 420494
|
||||||
|
width = 1920
|
||||||
|
height = 1080
|
||||||
|
frameRate = 44.977512
|
||||||
|
colorInfo:
|
||||||
|
colorSpace = 2
|
||||||
|
colorRange = 1
|
||||||
|
colorTransfer = 3
|
||||||
|
hdrStaticInfo = length 0, hash 0
|
||||||
|
initializationData:
|
||||||
|
data = length 85, hash 6F3CAA16
|
||||||
|
sample 0:
|
||||||
|
time = 0
|
||||||
|
flags = 1
|
||||||
|
data = length 420464, hash 9C6E9B09
|
||||||
|
sample 1:
|
||||||
|
time = 33344
|
||||||
|
flags = 0
|
||||||
|
data = length 131591, hash A1895540
|
||||||
|
sample 2:
|
||||||
|
time = 66700
|
||||||
|
flags = 536870912
|
||||||
|
data = length 126941, hash 7B26BBA6
|
||||||
|
tracksEnded = true
|
||||||
Loading…
Reference in a new issue