androidaudiometadatamediametadataretriever

How to get embedded chapter metadata with MediaMetadataRetriever


Is there a way to get the metadata for embedded chapters in mp3/m4a files using MediaMetadataRetriever in Android? This is for audio only files. I just need to get the chapter name, starting position, and duration. Embedded artwork would be nice but not necessary.

I have tried using FFmpegMediaMetadataRetriever library but I am having some issues with API 19. https://github.com/wseemann/FFmpegMediaMetadataRetriever

Maybe there is a better library that I can use?


Solution

  • Built-in MediaMetadataRetriever has no API to obtain per-chapter metadata, and moreover, it is strange, but behavior differs from device to device when you are trying to get artworks with resolution 2k or more. And as result FFmpeg based retriever is the only choice.

    To top it off you should fix issues with FFmpegMediametadataRetriever or implement interface to Public Metadata API by yourself.