gbif / parsers

Various GBIF parsers for dates, countries, language, taxon ranks, etc
Apache License 2.0
4 stars 8 forks source link

Improve audio media type parsing #14

Closed MattBlissett closed 5 years ago

MattBlissett commented 5 years ago

This will help https://github.com/gbif/portal-feedback/issues/1630

MattBlissett commented 5 years ago

References: https://wiki.whatwg.org/wiki/Video_type_parameters https://www.iana.org/assignments/media-types/media-types.xhtml#audio

MortenHofft commented 5 years ago
row format count works example
1 audio/x-flac  2       NOT 1882615644
2   audio/ogg   14      OK 1271693629
3   audio/x-wav 68      OK 1271693192
4   audio/mpeg  30883   OK 1571572483
5   audio/wav   18      OK 1317313403
6   audio/mp3   16416   OK 1421199821
7   audio/mp4   42      OK 1882578898
8   audio/x-aiff    22  NOT 1271780103
9   audio/mpeg3 55418   NOT 1058481761 (but works if treated like mp3)

notice line 9: 55K audio files with format audio/mpeg3. the html5 audio tag won't play that. But for the examples i tried (e.g. 1058481761) the file ending is mp3 and works if format set as such.