diff --git a/RELEASENOTES.md b/RELEASENOTES.md index e5b3adfba6..6b80621e8e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -63,6 +63,8 @@ the `Format#id` field of the subtitle track created from the configuration ([#9673](https://github.com/google/ExoPlayer/issues/9673)). + * Add basic support for WebVTT subtitles in Matroska containers + ([#9886](https://github.com/google/ExoPlayer/issues/9886)). * DRM: * Remove `playbackLooper` from `DrmSessionManager.(pre)acquireSession`. When a `DrmSessionManager` is used by an app in a custom `MediaSource`, diff --git a/library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java b/library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java index c719cdfa00..4a8b550a15 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/e2etest/MkvPlaybackTest.java @@ -48,7 +48,9 @@ public final class MkvPlaybackTest { "sample_with_ssa_subtitles.mkv", "sample_with_null_terminated_ssa_subtitles.mkv", "sample_with_srt.mkv", - "sample_with_null_terminated_srt.mkv"); + "sample_with_null_terminated_srt.mkv", + "sample_with_vtt_subtitles.mkv", + "sample_with_null_terminated_vtt_subtitles.mkv"); } @ParameterizedRobolectricTestRunner.Parameter public String inputFile; diff --git a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java index e8876ca52c..3659f2270e 100644 --- a/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java +++ b/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java @@ -138,6 +138,7 @@ public class MatroskaExtractor implements Extractor { private static final String CODEC_ID_PCM_FLOAT = "A_PCM/FLOAT/IEEE"; private static final String CODEC_ID_SUBRIP = "S_TEXT/UTF8"; private static final String CODEC_ID_ASS = "S_TEXT/ASS"; + private static final String CODEC_ID_VTT = "S_TEXT/WEBVTT"; private static final String CODEC_ID_VOBSUB = "S_VOBSUB"; private static final String CODEC_ID_PGS = "S_HDMV/PGS"; private static final String CODEC_ID_DVBSUB = "S_DVBSUB"; @@ -323,6 +324,32 @@ public class MatroskaExtractor implements Extractor { /** The format of an SSA timecode. */ private static final String SSA_TIMECODE_FORMAT = "%01d:%02d:%02d:%02d"; + /** + * A template for the prefix that must be added to each VTT sample. + * + *
The display time of each subtitle is passed as {@code timeUs} to {@link + * TrackOutput#sampleMetadata}. The start and end timecodes in this template are relative to + * {@code timeUs}. Hence the start timecode is always zero. The 12 byte end timecode starting at + * {@link #VTT_PREFIX_END_TIMECODE_OFFSET} is set to a placeholder value, and must be replaced + * with the duration of the subtitle. + * + *
Equivalent to the UTF-8 string: "WEBVTT\n\n00:00:00.000 --> 00:00:00.000\n". + */ + private static final byte[] VTT_PREFIX = + new byte[] { + 87, 69, 66, 86, 84, 84, 10, 10, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 32, 45, 45, + 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 46, 48, 48, 48, 10 + }; + /** The byte offset of the end timecode in {@link #VTT_PREFIX}. */ + private static final int VTT_PREFIX_END_TIMECODE_OFFSET = 25; + /** + * The value by which to divide a time in microseconds to convert it to the unit of the last value + * in a VTT timecode (milliseconds). + */ + private static final long VTT_TIMECODE_LAST_VALUE_SCALING_FACTOR = 1000; + /** The format of a VTT timecode. */ + private static final String VTT_TIMECODE_FORMAT = "%02d:%02d:%02d.%03d"; + /** The length in bytes of a WAVEFORMATEX structure. */ private static final int WAVE_FORMAT_SIZE = 18; /** Format tag indicating a WAVEFORMATEXTENSIBLE structure. */ @@ -1342,7 +1369,9 @@ public class MatroskaExtractor implements Extractor { track.trueHdSampleRechunker.sampleMetadata( track.output, timeUs, flags, size, offset, track.cryptoData); } else { - if (CODEC_ID_SUBRIP.equals(track.codecId) || CODEC_ID_ASS.equals(track.codecId)) { + if (CODEC_ID_SUBRIP.equals(track.codecId) + || CODEC_ID_ASS.equals(track.codecId) + || CODEC_ID_VTT.equals(track.codecId)) { if (blockSampleCount > 1) { Log.w(TAG, "Skipping subtitle sample in laced block."); } else if (blockDurationUs == C.TIME_UNSET) { @@ -1415,6 +1444,9 @@ public class MatroskaExtractor implements Extractor { } else if (CODEC_ID_ASS.equals(track.codecId)) { writeSubtitleSampleData(input, SSA_PREFIX, size); return finishWriteSampleData(); + } else if (CODEC_ID_VTT.equals(track.codecId)) { + writeSubtitleSampleData(input, VTT_PREFIX, size); + return finishWriteSampleData(); } TrackOutput output = track.output; @@ -1641,7 +1673,8 @@ public class MatroskaExtractor implements Extractor { *
See documentation on {@link #SSA_DIALOGUE_FORMAT} and {@link #SUBRIP_PREFIX} for why we use * the duration as the end timecode. * - * @param codecId The subtitle codec; must be {@link #CODEC_ID_SUBRIP} or {@link #CODEC_ID_ASS}. + * @param codecId The subtitle codec; must be {@link #CODEC_ID_SUBRIP}, {@link #CODEC_ID_ASS} or + * {@link #CODEC_ID_VTT}. * @param durationUs The duration of the sample, in microseconds. * @param subtitleData The subtitle sample in which to overwrite the end timecode (output * parameter). @@ -1662,6 +1695,12 @@ public class MatroskaExtractor implements Extractor { durationUs, SSA_TIMECODE_FORMAT, SSA_TIMECODE_LAST_VALUE_SCALING_FACTOR); endTimecodeOffset = SSA_PREFIX_END_TIMECODE_OFFSET; break; + case CODEC_ID_VTT: + endTimecode = + formatSubtitleTimecode( + durationUs, VTT_TIMECODE_FORMAT, VTT_TIMECODE_LAST_VALUE_SCALING_FACTOR); + endTimecodeOffset = VTT_PREFIX_END_TIMECODE_OFFSET; + break; default: throw new IllegalArgumentException(); } @@ -1830,6 +1869,7 @@ public class MatroskaExtractor implements Extractor { case CODEC_ID_PCM_FLOAT: case CODEC_ID_SUBRIP: case CODEC_ID_ASS: + case CODEC_ID_VTT: case CODEC_ID_VOBSUB: case CODEC_ID_PGS: case CODEC_ID_DVBSUB: @@ -2157,6 +2197,9 @@ public class MatroskaExtractor implements Extractor { mimeType = MimeTypes.TEXT_SSA; initializationData = ImmutableList.of(SSA_DIALOGUE_FORMAT, getCodecPrivate(codecId)); break; + case CODEC_ID_VTT: + mimeType = MimeTypes.TEXT_VTT; + break; case CODEC_ID_VOBSUB: mimeType = MimeTypes.APPLICATION_VOBSUB; initializationData = ImmutableList.of(getCodecPrivate(codecId)); @@ -2245,6 +2288,7 @@ public class MatroskaExtractor implements Extractor { .setColorInfo(colorInfo); } else if (MimeTypes.APPLICATION_SUBRIP.equals(mimeType) || MimeTypes.TEXT_SSA.equals(mimeType) + || MimeTypes.TEXT_VTT.equals(mimeType) || MimeTypes.APPLICATION_VOBSUB.equals(mimeType) || MimeTypes.APPLICATION_PGS.equals(mimeType) || MimeTypes.APPLICATION_DVBSUBS.equals(mimeType)) { diff --git a/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java b/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java index 64faff9a0e..531a1926ed 100644 --- a/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java +++ b/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractorTest.java @@ -67,6 +67,20 @@ public final class MatroskaExtractorTest { simulationConfig); } + @Test + public void mkvSample_withVttSubtitles() throws Exception { + ExtractorAsserts.assertBehavior( + MatroskaExtractor::new, "media/mkv/sample_with_vtt_subtitles.mkv", simulationConfig); + } + + @Test + public void mkvSample_withNullTerminatedVttSubtitles() throws Exception { + ExtractorAsserts.assertBehavior( + MatroskaExtractor::new, + "media/mkv/sample_with_null_terminated_vtt_subtitles.mkv", + simulationConfig); + } + @Test public void mkvSample_withVorbisAudio() throws Exception { ExtractorAsserts.assertBehavior( diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.0.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.0.dump new file mode 100644 index 0000000000..68b4fdada9 --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.0.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 55 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 55, hash F96B22E6 +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.1.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.1.dump new file mode 100644 index 0000000000..68b4fdada9 --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.1.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 55 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 55, hash F96B22E6 +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.2.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.2.dump new file mode 100644 index 0000000000..68b4fdada9 --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.2.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 55 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 55, hash F96B22E6 +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.3.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.3.dump new file mode 100644 index 0000000000..68b4fdada9 --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.3.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 55 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 55, hash F96B22E6 +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.unknown_length.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.unknown_length.dump new file mode 100644 index 0000000000..68b4fdada9 --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.unknown_length.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 55 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 55, hash F96B22E6 +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.0.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.0.dump new file mode 100644 index 0000000000..e79174312b --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.0.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 65 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 65, hash 3EC9965C +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.1.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.1.dump new file mode 100644 index 0000000000..e79174312b --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.1.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 65 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 65, hash 3EC9965C +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.2.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.2.dump new file mode 100644 index 0000000000..e79174312b --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.2.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 65 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 65, hash 3EC9965C +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.3.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.3.dump new file mode 100644 index 0000000000..e79174312b --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.3.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 65 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 65, hash 3EC9965C +tracksEnded = true diff --git a/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.unknown_length.dump b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.unknown_length.dump new file mode 100644 index 0000000000..e79174312b --- /dev/null +++ b/testdata/src/test/assets/extractordumps/mkv/sample_with_vtt_subtitles.mkv.unknown_length.dump @@ -0,0 +1,281 @@ +seekMap: + isSeekable = true + duration = 1234000 + getPosition(0) = [[timeUs=0, position=5661]] + getPosition(1) = [[timeUs=0, position=5661]] + getPosition(617000) = [[timeUs=0, position=5661]] + getPosition(1234000) = [[timeUs=0, position=5661]] +numberOfTracks = 3 +track 1: + total output bytes = 89502 + sample count = 30 + format 0: + id = 1 + sampleMimeType = video/avc + codecs = avc1.640034 + width = 1080 + height = 720 + selectionFlags = 1 + language = und + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample 0: + time = 0 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 67000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 33000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 200000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 133000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 100000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 167000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 333000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 267000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 233000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 300000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 433000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 400000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 367000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 567000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 500000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 467000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 533000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 700000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 633000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 600000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 667000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 833000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 767000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 733000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 800000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 967000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 900000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 867000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 933000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + total output bytes = 12120 + sample count = 29 + format 0: + id = 2 + sampleMimeType = audio/ac3 + channelCount = 1 + sampleRate = 44100 + selectionFlags = 1 + language = und + sample 0: + time = 62000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 96829 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 131659 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 166489 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 201319 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 236149 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 270979 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 305809 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 341000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 375829 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 410659 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 445489 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 480319 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 515149 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 549979 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 584809 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 620000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 654829 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 689659 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 724489 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 759319 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 794149 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 828979 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 863809 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 898000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 932829 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 967659 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1002489 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1037319 + flags = 1 + data = length 418, hash 56AB8D37 +track 3: + total output bytes = 65 + sample count = 1 + format 0: + id = 3 + sampleMimeType = text/vtt + selectionFlags = 1 + language = und + sample 0: + time = 0 + flags = 1 + data = length 65, hash 3EC9965C +tracksEnded = true diff --git a/testdata/src/test/assets/media/mkv/sample_with_null_terminated_vtt_subtitles.mkv b/testdata/src/test/assets/media/mkv/sample_with_null_terminated_vtt_subtitles.mkv new file mode 100644 index 0000000000..1a0a94c5d8 Binary files /dev/null and b/testdata/src/test/assets/media/mkv/sample_with_null_terminated_vtt_subtitles.mkv differ diff --git a/testdata/src/test/assets/media/mkv/sample_with_vtt_subtitles.mkv b/testdata/src/test/assets/media/mkv/sample_with_vtt_subtitles.mkv new file mode 100644 index 0000000000..5ba4d21f3b Binary files /dev/null and b/testdata/src/test/assets/media/mkv/sample_with_vtt_subtitles.mkv differ diff --git a/testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.dump b/testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.dump new file mode 100644 index 0000000000..2279019f2c --- /dev/null +++ b/testdata/src/test/assets/playbackdumps/mkv/sample_with_null_terminated_vtt_subtitles.mkv.dump @@ -0,0 +1,65 @@ +MediaCodecAdapter (exotest.audio.ac3): + buffers.length = 30 + buffers[0] = length 416, hash 211F2286 + buffers[1] = length 418, hash 77425A86 + buffers[2] = length 418, hash A0FE5CA1 + buffers[3] = length 418, hash 2309B066 + buffers[4] = length 418, hash 928A653B + buffers[5] = length 418, hash 3422F0CB + buffers[6] = length 418, hash EFF43D5B + buffers[7] = length 418, hash FC8093C7 + buffers[8] = length 418, hash CCC08A16 + buffers[9] = length 418, hash 2A6EE863 + buffers[10] = length 418, hash D69A9251 + buffers[11] = length 418, hash BCFB758D + buffers[12] = length 418, hash 11B66799 + buffers[13] = length 418, hash C824D392 + buffers[14] = length 418, hash C167D872 + buffers[15] = length 418, hash 4221C855 + buffers[16] = length 418, hash 4D4FF934 + buffers[17] = length 418, hash 984AA025 + buffers[18] = length 418, hash BB788B46 + buffers[19] = length 418, hash 9EFBFD97 + buffers[20] = length 418, hash DF1A460C + buffers[21] = length 418, hash 2BDB56A + buffers[22] = length 418, hash CA230060 + buffers[23] = length 418, hash D2F19F41 + buffers[24] = length 418, hash AF392D79 + buffers[25] = length 418, hash C5D7F2A3 + buffers[26] = length 418, hash 733A35AE + buffers[27] = length 418, hash DE46E5D3 + buffers[28] = length 418, hash 56AB8D37 + buffers[29] = length 0, hash 1 +MediaCodecAdapter (exotest.video.avc): + buffers.length = 31 + buffers[0] = length 36477, hash F0F36CFE + buffers[1] = length 5341, hash 40B85E2 + buffers[2] = length 596, hash 357B4D92 + buffers[3] = length 7704, hash A39EDA06 + buffers[4] = length 989, hash 2813C72D + buffers[5] = length 721, hash C50D1C73 + buffers[6] = length 519, hash 65FE1911 + buffers[7] = length 6160, hash E1CAC0EC + buffers[8] = length 953, hash 7160C661 + buffers[9] = length 620, hash 7A7AE07C + buffers[10] = length 405, hash 5CC7F4E7 + buffers[11] = length 4852, hash 9DB6979D + buffers[12] = length 547, hash E31A6979 + buffers[13] = length 570, hash FEC40D00 + buffers[14] = length 5525, hash 7C478F7E + buffers[15] = length 1082, hash DA07059A + buffers[16] = length 807, hash 93478E6B + buffers[17] = length 744, hash 9A8E6026 + buffers[18] = length 4732, hash C73B23C0 + buffers[19] = length 1004, hash 8A19A228 + buffers[20] = length 794, hash 8126022C + buffers[21] = length 645, hash F08300E5 + buffers[22] = length 2684, hash 727FE378 + buffers[23] = length 787, hash 419A7821 + buffers[24] = length 649, hash 5C159346 + buffers[25] = length 509, hash F912D655 + buffers[26] = length 1226, hash 29815C21 + buffers[27] = length 898, hash D997AD0A + buffers[28] = length 476, hash A0423645 + buffers[29] = length 486, hash DDF32CBB + buffers[30] = length 0, hash 1 diff --git a/testdata/src/test/assets/playbackdumps/mkv/sample_with_vtt_subtitles.mkv.dump b/testdata/src/test/assets/playbackdumps/mkv/sample_with_vtt_subtitles.mkv.dump new file mode 100644 index 0000000000..2279019f2c --- /dev/null +++ b/testdata/src/test/assets/playbackdumps/mkv/sample_with_vtt_subtitles.mkv.dump @@ -0,0 +1,65 @@ +MediaCodecAdapter (exotest.audio.ac3): + buffers.length = 30 + buffers[0] = length 416, hash 211F2286 + buffers[1] = length 418, hash 77425A86 + buffers[2] = length 418, hash A0FE5CA1 + buffers[3] = length 418, hash 2309B066 + buffers[4] = length 418, hash 928A653B + buffers[5] = length 418, hash 3422F0CB + buffers[6] = length 418, hash EFF43D5B + buffers[7] = length 418, hash FC8093C7 + buffers[8] = length 418, hash CCC08A16 + buffers[9] = length 418, hash 2A6EE863 + buffers[10] = length 418, hash D69A9251 + buffers[11] = length 418, hash BCFB758D + buffers[12] = length 418, hash 11B66799 + buffers[13] = length 418, hash C824D392 + buffers[14] = length 418, hash C167D872 + buffers[15] = length 418, hash 4221C855 + buffers[16] = length 418, hash 4D4FF934 + buffers[17] = length 418, hash 984AA025 + buffers[18] = length 418, hash BB788B46 + buffers[19] = length 418, hash 9EFBFD97 + buffers[20] = length 418, hash DF1A460C + buffers[21] = length 418, hash 2BDB56A + buffers[22] = length 418, hash CA230060 + buffers[23] = length 418, hash D2F19F41 + buffers[24] = length 418, hash AF392D79 + buffers[25] = length 418, hash C5D7F2A3 + buffers[26] = length 418, hash 733A35AE + buffers[27] = length 418, hash DE46E5D3 + buffers[28] = length 418, hash 56AB8D37 + buffers[29] = length 0, hash 1 +MediaCodecAdapter (exotest.video.avc): + buffers.length = 31 + buffers[0] = length 36477, hash F0F36CFE + buffers[1] = length 5341, hash 40B85E2 + buffers[2] = length 596, hash 357B4D92 + buffers[3] = length 7704, hash A39EDA06 + buffers[4] = length 989, hash 2813C72D + buffers[5] = length 721, hash C50D1C73 + buffers[6] = length 519, hash 65FE1911 + buffers[7] = length 6160, hash E1CAC0EC + buffers[8] = length 953, hash 7160C661 + buffers[9] = length 620, hash 7A7AE07C + buffers[10] = length 405, hash 5CC7F4E7 + buffers[11] = length 4852, hash 9DB6979D + buffers[12] = length 547, hash E31A6979 + buffers[13] = length 570, hash FEC40D00 + buffers[14] = length 5525, hash 7C478F7E + buffers[15] = length 1082, hash DA07059A + buffers[16] = length 807, hash 93478E6B + buffers[17] = length 744, hash 9A8E6026 + buffers[18] = length 4732, hash C73B23C0 + buffers[19] = length 1004, hash 8A19A228 + buffers[20] = length 794, hash 8126022C + buffers[21] = length 645, hash F08300E5 + buffers[22] = length 2684, hash 727FE378 + buffers[23] = length 787, hash 419A7821 + buffers[24] = length 649, hash 5C159346 + buffers[25] = length 509, hash F912D655 + buffers[26] = length 1226, hash 29815C21 + buffers[27] = length 898, hash D997AD0A + buffers[28] = length 476, hash A0423645 + buffers[29] = length 486, hash DDF32CBB + buffers[30] = length 0, hash 1