Add basic support for reading average bitrates#371
Open
codedcosmos wants to merge 1 commit intopdeljanov:rel-0.5from
Open
Add basic support for reading average bitrates#371codedcosmos wants to merge 1 commit intopdeljanov:rel-0.5from
codedcosmos wants to merge 1 commit intopdeljanov:rel-0.5from
Conversation
Bitrate is seemingly missing from all song metadata in this project. Even songs that contain the bitrate in the header (alac, mp3, possibly more?) don't make this information available to the user. This commit stores the bitrate in CodecParameters as "average_bitrate". This is because some formats like flac have a variable bitrate. It's better to provide something than to promise a constant bitrate and be technically wrong as some decoders do. This average bitrate is currently only implemented for mp3. But possibly other codecs might want to implement it. This change is fully backwards compatible.
Author
|
Hi 👋 I'm not sure if this repo has automated testing, but I'll write here that I I did run |
Contributor
|
You might want to consider rebasing this PR onto the dev-0.6 branch. |
Author
|
I'll take a look, do you mind if I also implement bitrate for other protocols that store that data in the header? WAV for example stores it as byterate (and can easily enough be divded by 8 to get bitrate). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bitrate is seemingly missing from all song metadata in this project. Even songs that contain the bitrate in the header (alac, mp3, possibly more?) don't make this information available to the user.
This commit stores the bitrate in CodecParameters as "average_bitrate". This is because some formats like flac have a variable bitrate. It's better to provide something than to promise a constant bitrate and be technically wrong as some decoders do.
This average bitrate is currently only implemented for mp3. But possibly other codecs might want to implement it. This change is fully backwards compatible.