You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onMetadata isn't getting called for me, also I would prefer MediaMetadata as I am also filling some custom info when building MediaItem, with onTracksChanged I am reading bitrate information.
yes, onTracksChanged gets called but onMetadata doesn't, but my actual point of reporting this issue was that information such as "genre" is very basic which should be filled in MediaMetadata, right?
Value of MediaMetadata.genre is filled with TCON frame content
This makes sense, based on my reading of the definition of the TCON frame here, though we probably don't want to naively popoulate the string directly and instead optionally do the numeric resolution described there, and somewhat already implemented here (although there may be an off-by-one bug there, I'm going to dig a bit further):
Log.w(TAG, "Failed to parse standard genre code");
returnnull;
}
Value of MediaMetadata.description is filled with COMM frame content
I'm not sure sure about this. COMM is described in a very free-form way, in particular there might be more than one, so I don't think it maps very clearly to MediaMetadata.description. I'm not sure that any of these ID3 frame types really contain a 'description'.
I'll prepare a change to map TCON to MediaMetadata.genre.
Activity
icbaker commentedon Apr 23, 2024
Please can you try listening to
Player.Listener.onMetadata? That's where I would expect this to be emitted, as described here: https://developer.android.com/media/media3/exoplayer/retrieving-metadata#during-playbackakshdeep-singh commentedon Apr 23, 2024
onMetadataisn't getting called for me, also I would preferMediaMetadataas I am also filling some custom info when buildingMediaItem, withonTracksChangedI am reading bitrate information.icbaker commentedon Apr 23, 2024
I played the provided link in the demo app and I see
COMMandTCOMlogged as part of the metadata inonTracksChanged(this logging is part ofEventLogger, see https://developer.android.com/media/media3/exoplayer/debug-logging):akshdeep-singh commentedon Apr 23, 2024
yes,
onTracksChangedgets called butonMetadatadoesn't, but my actual point of reporting this issue was that information such as "genre" is very basic which should be filled inMediaMetadata, right?icbaker commentedon Apr 24, 2024
Ah gotcha, I misunderstood your original comment.
This makes sense, based on my reading of the definition of the
TCONframe here, though we probably don't want to naively popoulate the string directly and instead optionally do the numeric resolution described there, and somewhat already implemented here (although there may be an off-by-one bug there, I'm going to dig a bit further):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.
COMMis described in a very free-form way, in particular there might be more than one, so I don't think it maps very clearly toMediaMetadata.description. I'm not sure that any of these ID3 frame types really contain a 'description'.I'll prepare a change to map
TCONtoMediaMetadata.genre.Add `MediaMetadata` to playback test dump files
Add two MP4 samples with metadata
Fix parsing some MP4 metadata fields we wrongly assumed were 1 byte
Add ID3 `TCON` genre to MP3 test samples
Propagate ID3 `TCON` frame to `MediaMetada.genre`
icbaker commentedon Apr 30, 2024
This is now implemented by the commits referenced above.