Skip to content

Commit 04de621

Browse files
authored
Merge pull request #58 from kiskoza/fix-audio/webm
Fix audio/webm files
2 parents d970fda + 5c6461c commit 04de621

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

data/custom.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,25 @@
8080
<magic priority="50">
8181
<match value="0x1a45dfa3" type="string" offset="0">
8282
<match value="\x42\x82" type="string" offset="4:4096">
83-
<match value="webm" type="string" offset="4:4096" />
83+
<match value="webm" type="string" offset="4:4096">
84+
<match value="V_VP8" type="string" offset="4:4096" />
85+
<match value="V_VP9" type="string" offset="4:4096" />
86+
</match>
87+
</match>
88+
</match>
89+
</magic>
90+
</mime-type>
91+
92+
<mime-type type="audio/webm">
93+
<sub-class-of type="application/x-matroska" />
94+
95+
<magic priority="50">
96+
<match value="0x1a45dfa3" type="string" offset="0">
97+
<match value="\x42\x82" type="string" offset="4:4096">
98+
<match value="webm" type="string" offset="4:4096">
99+
<match value="A_VORBIS" type="string" offset="4:4096" />
100+
<match value="A_OPUS" type="string" offset="4:4096" />
101+
</match>
84102
</match>
85103
</match>
86104
</magic>

lib/marcel/tables.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ module Marcel
21622162
['audio/mp4', [[4, 'ftypM4A '], [4, 'ftypM4B '], [4, 'ftypF4A '], [4, 'ftypF4B ']]],
21632163
['video/quicktime', [[4, "moov\000"], [4, "mdat\000"], [4, "free\000"], [4, "skip\000"], [4, "pnot\000"], [4, 'ftyp'], [0, "\000\000\000\bwide"]]],
21642164
['video/mpeg', [[0, "\000\000\001\263"], [0, "\000\000\001\272"]]],
2165-
['video/webm', [[0, "\032E\337\243", [[4..4096, "B\202", [[4..4096, 'webm']]]]]]],
2165+
['video/webm', [[0, "\032E\337\243", [[4..4096, "B\202", [[4..4096, 'webm', [[4..4096, 'V_VP8'], [4..4096, 'V_VP9']]]]]]]]],
21662166
['video/x-matroska', [[0, "\032E\337\243\223B\202\210matroska"]]],
21672167
['video/x-flv', [[0, 'FLV']]],
21682168
['audio/mpeg', [[0, "\377\362"], [0, "\377\363"], [0, "\377\364"], [0, "\377\365"], [0, "\377\366"], [0, "\377\367"], [0, "\377\372"], [0, "\377\373"], [0, "\377\374"], [0, "\377\375"], [0, "\377\377"], [0, 'ID3']]],
@@ -2402,6 +2402,7 @@ module Marcel
24022402
['audio/amr-wb', [[0, "#!AMR-WB\n"]]],
24032403
['audio/eac3', [[0, "\vw"]]],
24042404
['audio/prs.sid', [[0, 'PSID']]],
2405+
['audio/webm', [[0, "\032E\337\243", [[4..4096, "B\202", [[4..4096, 'webm', [[4..4096, 'A_VORBIS'], [4..4096, 'A_OPUS']]]]]]]]],
24052406
['audio/x-flac', [[0, 'fLaC']]],
24062407
['audio/x-mod', [[0, 'Extended Module:'], [21, 'BMOD2STM'], [1080, 'M.K.'], [1080, 'M!K!'], [1080, 'FLT4'], [1080, 'FLT8'], [1080, '4CHN'], [1080, '6CHN'], [1080, '8CHN'], [1080, 'CD81'], [1080, 'OKTA'], [1080, '16CN'], [1080, '32CN'], [0, 'IMPM']]],
24072408
['audio/x-mpegurl', [[0, "#EXTM3U\r\n"]]],
23.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)