Skip to content

Commit 9a8c537

Browse files
FreezyLemonLuni-4
authored andcommitted
Implement basic mkv/webm header tests
1 parent 0cf2e9f commit 9a8c537

18 files changed

+394
-19
lines changed

assets/matroska_test_w1_1/Release.txt

+162
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
Matroska Test Files - Wave 1
2+
3+
This suite of files was created to validate the various Matroska players,
4+
parsers to make sure users get a consistent experience when moving
5+
their files on various programs/hardware. Since Matroska has a lot of
6+
features, it is hard to tell which are essential, which are encouraged and
7+
which are deprecated. The files presented here represent the minimum
8+
support a player should have to fully qualify as a Matroska player.
9+
10+
Codecs
11+
12+
Matroska can support any codec that is around. That doesn't mean
13+
softwares should support all of them. For various reasons softwares and
14+
hardwares can't always be upgraded to support all codecs around. But in
15+
the other hand there are a few safe codecs that are often found in
16+
Matroska and WebM that should be supported. These codec can be found
17+
in various resolutions and features so even with the right codec support,
18+
it is not guaranteed that an implementation may support all the possibilities
19+
of a codec (it is hardly ever the case). This document will not cover codec
20+
details. But here is a list of codecs that are commonly found in Matroska:
21+
22+
Video codecs
23+
- H264/AVC/MPEG4 Part 10, usually up to 1080p
24+
- MPEG4 Part 2, usually up to 720p
25+
- VP8, usually up to 720p
26+
- Theora, usually up to 720p
27+
28+
Audio codecs
29+
- MPEG Audio Layer 3 (MP3)
30+
- Vorbis
31+
- AAC, AAC+, eACC+
32+
- AC-3
33+
- DTS
34+
- FLAC
35+
36+
Subtitles codecs
37+
- plain UTF-8 text
38+
- ASS/SSA text
39+
- VOBSUB (bitmaps from DVDs)
40+
- Audio only files
41+
42+
It is important to note that audio can also be used in audio only files,
43+
usually with the .mka extension. Those files should be handled as well, as
44+
long as the codec is supported.
45+
46+
Extra features
47+
48+
There are a number of features that are not essential to the playback
49+
experience but could really improve it, like support for tags, cover art,
50+
embedded fonts, segment linking. We won't blame you if you don't support
51+
these, but your users/customers will probably ask for it at some point.
52+
There is also 3D support that is meant to grow in the coming years.
53+
Matroska should be able to support all the formats, but given the subject
54+
is really new, it's not covered by this suite of files.
55+
56+
** Test Files **
57+
58+
1. Basic file
59+
60+
This file is the absolute minimum a compliant player should be able to
61+
handle.
62+
63+
The sample comes from the Big Buck Bunny open project. It contains MPEG4.2
64+
(DivX) video, (854x480) MP3 audio, uses only SimpleBlock (matroska DocType v2)
65+
66+
2. Non default timecodescale & aspect ratio
67+
68+
This file has different features that need to be looked at carefully. The
69+
main one is the global TimecodeScale in the SegmentInfo is set to 100,000
70+
rather than the default 1,000,000. That value affects the values of the file
71+
Duration in the Segment and the Clusters Timecode. The aspect ratio has
72+
also been stretched artificially to represent a 2.35 movie (from the original
73+
16:9 aspect ratio). This file also contains CRC-32 values in the EBML
74+
header, the MetaSeek, the Segment Info, the Tracks and the Tags and
75+
PrevSize/Position in the Clusters for better error recovery.
76+
77+
It contains H264 (1024x576 pixels), and stereo AAC. The source material is
78+
taken from the Elephant Dreams video project
79+
80+
3. Header stripping & standard block
81+
82+
This file is using BlockGroup+Block only for audio and video frames. It also
83+
removes 2 bytes off each video and audio frame since they are all equal.
84+
These 2 bytes have to be put back in the frame before decoding. his file
85+
also contains CRC-32 values in the EBML header, the MetaSeek, the
86+
Segment Info, the Tracks and the Tags and PrevSize/Position in the
87+
Clusters for better error recovery.
88+
89+
It contains H264 (1024x576 pixels), and stereo MP3. The source material
90+
is taken from the Elephant Dreams video project
91+
92+
4. Live stream recording
93+
94+
This file is using the EBML feature that allows Master elements to have no
95+
known size. It is used for live streams because they don't know ahead of
96+
time the size of the Segment (virtually infinite) and even sometimes the
97+
size of the Clusters (no caching on the server side). The first timecode of
98+
the file also doesn't start at 0 since it's supposed to be a capture from
99+
something continuous. The SegmentInfo also doesn't contain any Duration
100+
as it is not know.
101+
102+
The sample comes from the Big Buck Bunny open project. It contains Theora
103+
video (1280x720), Vorbis audio, uses only SimpleBlock (matroska DocType v2)
104+
105+
A similar file can be created with mkclean using the "--live" option
106+
107+
5. Multiple audio/subtitles
108+
109+
This has a main audio track in english and a secondary audio track in
110+
english. It also has subtitles in English, French, German, Hungarian,
111+
Spanish, Italian and Japanese. The player should provide the possibility to
112+
switch between these streams.
113+
114+
The sample contains H264 (1024x576 pixels), and stereo AAC and
115+
commentary in AAC+ (using SBR). The source material is taken from the
116+
Elephant Dreams video project
117+
118+
6. Different EBML head sizes & cue-less seeking
119+
120+
This file is a test of the EBML parser of the player. The size of the
121+
Segment and Block/SimpleBlock is coded using 1 (or the minimum possible
122+
the size) and 8 bytes randomly. The file also have no Cues entry. So
123+
seeking should be disabled or look for Cluster boundaries in the stream
124+
(much slower than using Cues).
125+
126+
The sample comes from the Big Buck Bunny open project. It contains
127+
MPEG4.2 (DivX) video, (854x480) MP3 audio, uses only SimpleBlock
128+
(matroska DocType v2)
129+
130+
7. Extra unknown/junk elements & damaged
131+
132+
This file contains junk elements (elements not defined in the specs) either
133+
at the beggining or the end of Clusters. These elements should be skipped.
134+
There is also an invalid element at 451417 that should be skipped until the
135+
next valid Cluster is found.
136+
137+
The sample contains H264 (1024x576 pixels), and stereo AAC. The source
138+
material is taken from the Elephant Dreams video project
139+
140+
8. Audio gap
141+
142+
This file has a few audio frames missing between timecodes 6.019s and
143+
6.360s. The playback should not stop, and if possible the video should not
144+
be skipped where the audio is missing
145+
146+
The sample contains H264 (1024x576 pixels), and stereo AAC. The source
147+
material is taken from the Elephant Dreams video project
148+
149+
Tools
150+
151+
All these files were created with mkvmerge and mkclean. They also pass
152+
the mkvalidator test tool (the test file 4 needs the --live option to
153+
correctly valdiate the file), except for the damaged file, as it is damaged.
154+
155+
Contact
156+
157+
If you have any question about these files please contact us at [email protected]
158+
159+
Changelog
160+
161+
2011-06-02 - w1_1: fix test2.mkv with had a duration not based on TimecodeScale
162+
2010-08-21 - w1: initial version
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 1</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File1, basic MPEG4.2 and MP3 with only SimpleBlock</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test1.mkv

22.3 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Elephant Dream - test 2</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 2, 100,000 timecode scale, odd aspect ratio, and CRC-32. Codecs are AVC and AAC</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test2.mkv

20.2 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Elephant Dream - test 3</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 3, header stripping on the video track and no SimpleBlock</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test3.mkv

20.1 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 4</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 4, live stream using elements with unknown size</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test4.mkv

20.3 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 8</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 8, secondary audio commentary track, misc subtitle tracks</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test5.mkv

30.3 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 6</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 6, random length to code the size of Clusters and Blocks, no Cues for seeking</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test6.mkv

22.3 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 7</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 7, junk elements are present at the beggining or end of clusters, the parser should skip it. There is also a damaged element at 451418</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test7.mkv

20.8 MB
Binary file not shown.
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<!DOCTYPE Tags SYSTEM "matroskatags.dtd">
3+
<Tags>
4+
<!-- movie -->
5+
<Tag>
6+
<Targets>
7+
<TargetTypeValue>50</TargetTypeValue>
8+
</Targets>
9+
<Simple>
10+
<Name>TITLE</Name>
11+
<String>Big Buck Bunny - test 8</String>
12+
</Simple>
13+
<Simple>
14+
<Name>DATE_RELEASED</Name>
15+
<String>2010</String>
16+
</Simple>
17+
<Simple>
18+
<Name>COMMENT</Name>
19+
<String>Matroska Validation File 8, audio missing between timecodes 6.019s and 6.360s</String>
20+
</Simple>
21+
</Tag>
22+
</Tags>

assets/matroska_test_w1_1/test8.mkv

20.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)