-
Notifications
You must be signed in to change notification settings - Fork 406
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 doesn't include some ID3 tags #1305
Comments
Please can you try listening to |
|
I played the provided link in the demo app and I see
|
yes, |
Ah gotcha, I misunderstood your original comment.
This makes sense, based on my reading of the definition of the media/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/MetadataUtil.java Lines 514 to 527 in d833d59
I'm not sure sure about this. I'll prepare a change to map |
This change also adds some runtime redirection of calls to `Dumper.add(String, Object)` to `add(String, byte[])` if `value instanceof byte[]`. This simplifies the implementation of `PlaybackOutput.dumpIfNotEqual` and seems like a reasonable amound of 'magic' for a test utility. Issue: #1305 PiperOrigin-RevId: 628119473
The first has a string genre, and various other values set, generated from `sample.mp4` with the command below [1]. The second has a numeric genre, to test `gnre` atom parsing. This parsing is currently broken, the fix is in a follow-up change. This file was also generated from `sample.mp4` with the command below [2]. This change also includes `CommentFrame.text` in its `toString` representation, otherwise there's no difference between e.g. different levels of `ITUNESADVISORY` in the extractor dump files. Issue: #1305 ----- [1] ```shell $ AP_PADDING="DEFAULT_PAD=0" \ AtomicParsley sample.mp4 \ --artist "Test Artist" \ --album "Test Album" \ --tracknum 2/12 \ --disk 2/3 \ --year 2024 \ --genre "Gorpcore" \ --bpm 120 \ --compilation true \ --advisory clean \ --gapless true \ --sortOrder artist "Sorting Artist" \ --sortOrder album "Sorting Album" \ --preventOptimizing \ -o sample_with_metadata.mp4 ``` [2] ```shell $ AP_PADDING="DEFAULT_PAD=0" \ AtomicParsley sample.mp4 \ --genre "Metal" \ --preventOptimizing \ -o sample_with_numeric_genre.mp4 ``` PiperOrigin-RevId: 628345458
This fixes parsing the `gnre` and `tmpo` values, as seen in the test dump changes in this CL. Issue: #1305 PiperOrigin-RevId: 628352773
This change adds a 'free-form' text genre to the existing `bear-id3.mp3` sample, and adds a new sample with a 'numeric' genre ([9 is Metal](https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2.4.0-frames.html#appendix-a-genre-list-from-id3v1)). The samples were modified with: ```shell $ id3edit --set-genre "Gorpcore" bear-id3.mp3 $ id3edit --set-genre "9" bear-id3-numeric-genre.mp3 ``` Reading the numeric genre with `exiftool` shows the mapping back to 'Metal': ``` $ exiftool bear-id3-numeric-genre.mp3 | grep Genre Genre : Metal ``` The playback dumps don't contain the genre because it's not yet propagated to `MediaMetadata.genre`. That is done in a follow-up change. Issue: #1305 PiperOrigin-RevId: 629043506
This change also includes mapping the numeric ID3v1 codes to their string equivalents before setting them into `MediaMetadata`. This mapping already existed, but it was previously only used when parsing MP4 `gnre` atoms. Issue: #1305 PiperOrigin-RevId: 629113480
This is now implemented by the commits referenced above. |
Version
Media3 1.3.1
More version details
No response
Devices that reproduce the issue
Pixel 3a Emulator API 34
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
TCON
,COMM
, etc.onMediaMetadataChanged
andonTracksChanged
Expected result
Value of
MediaMetadata.genre
is filled withTCON
frame contentValue of
MediaMetadata.description
is filled withCOMM
frame contentActual result
MediaMetadata values described above are null
Media
Sample MP3 link
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: