A simple Flutter plugin for reading metadata of media files.
Usage
import 'package:media_metadata_retriever/media_metadata_retriever.dart'; Future<void> getMetadata() async { final metadataRetriever = new MediaMetadataRetriever(); /* Set File path */ await metadataRetriever.setFile(new File('/storage/emulated/0/Music/music.aac')); /* Access metadata */ Metadata metadata = await metadataRetriever.metadata; print(metadata.trackName); print(metadata.trackArtistNames); print(metadata.albumName); print(metadata.albumArtistName); print(metadata.trackNumber); print(metadata.albumLength); print(metadata.year); print(metadata.genre); print(metadata.authorName); print(metadata.writerName); print(metadata.discNumber); print(metadata.mimeType); print(metadata.trackDuration); print(metadata.bitrate); /* Alternatively, you may convert it to a Map<String, dynamic> */ metadata.toMap(); }
Example
You may checkout example app for this plugin here.
Screenshot 1 | Screenshot 2 |
---|---|
Progress
Platform | Status |
---|---|
Android | Working |
Linux | Coming Soon |
Windows | Not Working |
Download Metadata reader widget source code on GitHub
https://github.com/alexmercerind/media_metadata_retriever
Provides the list of the opensource Flutter apps collection with GitHub repository.