-
Notifications
You must be signed in to change notification settings - Fork 476
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
MediaMetadata.Builder().populateFromMetadata()
miss some fields from .flac
files
#1958
Comments
The conversion logic from vorbis comments to media/libraries/extractor/src/main/java/androidx/media3/extractor/metadata/flac/VorbisComment.java Lines 60 to 80 in df887a9
Some of the tags mentioned at https://xiph.org/vorbis/doc/v-comment.html are missing from our logic, including The rest of the 'unrecognized' tags are less clear. It seems there's a lot of possible variety out in the wild, both in terms of the key names and the format of their values. Some examples of disc numbering from this 2009 comment:
Since
If we get additional feedback with examples of the |
Only `TRACKNUMBER` and `GENRE` are listed here: https://xiph.org/vorbis/doc/v-comment.html The rest are derived from the example in Issue: #1958. It's possible that other formats exist in the wild: https://hydrogenaud.io/index.php/topic,69292.msg613808.html#msg613808 Issue: #1958 PiperOrigin-RevId: 704308788
Disc and track number & totals (and genre) should now be populated by 1254607 |
Only `TRACKNUMBER` and `GENRE` are listed here: https://xiph.org/vorbis/doc/v-comment.html The rest are derived from the example in Issue: #1958. It's possible that other formats exist in the wild: https://hydrogenaud.io/index.php/topic,69292.msg613808.html#msg613808 Issue: #1958 PiperOrigin-RevId: 704308788 (cherry picked from commit 1254607)
Version
Media3 1.5.0
More version details
I've also encountered the issue when using version 1.4.1.
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
I went through the route of using
MetadataRetriever
to get the metadata for audio files based on https://developer.android.com/media/media3/exoplayer/retrieving-metadata#wo-playback.A basic summary of what I did is (assume everything is defined):
Then I return the fields available such as
artist
,title
,trackNumber
, etc..Expected result
Accessing the
title
,artist
,discNumber
, andtrackNumber
fields on theMediaMetadata
object should return the respective values.Actual result
The
title
&artist
fields both return the expected strings whilediscNumber
&trackNumber
returnsnull
. This only happens when following the process for.flac
files.I do know that the vorbis comments for the
discNumber
&trackNumber
fields are present as runningmetadata.toString()
returns:I'm currently working around this problem by using
MediaMetadataRetriever
for.flac
files instead since it correctly returns the disc & track numbers.Media
I'll send the file to the specified email, but I think it affects all
.flac
files.Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: