Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect audio files with an ID3 header, which are not MP3 #267

Closed
Borewit opened this issue Dec 3, 2019 · 2 comments · Fixed by #289
Closed

Detect audio files with an ID3 header, which are not MP3 #267

Borewit opened this issue Dec 3, 2019 · 2 comments · Fixed by #289

Comments

@Borewit
Copy link
Collaborator

Borewit commented Dec 3, 2019

Not only MP3 files are prefixed with an ID3 header, it may for example used to prefix non-MP3:

  1. .flac
  2. .aac (ADTS container)
  3. .ape
@Borewit
Copy link
Collaborator Author

Borewit commented Dec 19, 2019

FLAC with ID3v2.4 header

image

Sample:
02 - Poxfil - Solid Ground (2 sec).id3v2.flac.zip (added as fixture-id3v2.flac)

Detected as:

{ ext: 'mp3', mime: 'audio/mpeg' }

Expected:

{ ext: 'flac', mime: 'audio/x-flac' }

@Borewit
Copy link
Collaborator Author

Borewit commented Dec 19, 2019

MPEG-4 AAC LC in ADTS container with ID3v2.4 header

image

Sample file:
02 - Poxfil - Solid Ground (2 sec).id3v2.aac.zip (added as fixture-id3v2.aac)

Detected as:

{ ext: 'mp3', mime: 'audio/mpeg' }

Expected:

{ ext: 'aac', mime: 'audio/aac' }

Bit more significant, .aac without ID3v2 header are neither detected: #259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant