Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 754
Hackmodford Avatar asked Oct 31 '22 01:10

Hackmodford


1 Answers

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.

like image 140
Sergio Avatar answered Nov 15 '22 13:11

Sergio