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

Parse audio information for ALAC files #199

Closed
lazka opened this issue Oct 25, 2014 · 3 comments
Closed

Parse audio information for ALAC files #199

lazka opened this issue Oct 25, 2014 · 3 comments
Labels

Comments

@lazka
Copy link
Member

@lazka lazka commented Oct 25, 2014

Originally reported by: Adrian Sampson (Bitbucket: adrian, GitHub: adrian)


The MP4Info class only parses stream info (e.g., sample rate) for files where the audio type is mp4a. Fortunately, for Apple Lossless files (type field alac), the format appears to be the same. So changing that check to use in (b"mp4a", b"alac") should do nicely.

I'd be happy to put together a pull request for this. To add tests, though, it looks like I'll need to add an ALAC file, right? (Unless I'm mistaken, all the MP4 tests are for AAC files.)


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 26, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


Looks good.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 26, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


Here is an example file for testing.

The parsing code needs some improvement to make it more testable, I'll look into that some time. For now matching "sample rate" etc. with the file attached should be enough.

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Oct 30, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


Fixed in revision 3811495e73ca

@lazka lazka closed this Apr 7, 2016
lazka pushed a commit that referenced this issue Apr 7, 2016
The same container metadata is present on ALAC files as is on AAC files. This
populates channels, sample_rate, bits_per_sample, and length. Like most
lossless formats in Mutagen, it does *not* populate bitrate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.