FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
C
1,787
331 commits
updated Jun 28, 2026
View the project page <a href=http://wseemann.github.io/FFmpegMediaMetadataRetriever/>here.
Donations can be made via PayPal:
This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Donations are highly appreciated. Thank you!
PayPal
FFmpegMediaMetadataRetriever is a reimplementation of Android's MediaMetadataRetriever class. The FFmpegMediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file and uses FFmpeg as its backend.
Key Features:
Supported protocols:
Supported formats (audio and video):
Additional support for:
Add the following Maven dependency to your project's build.gradle file:
dependencies {
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native:1.0.23'
}
Optionally, to support individual ABIs:
dependencies {
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86_64:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.23'
}
Or, if your application supports individual architectures, extract the appropriate AAR file into you projects "libs" folder:
A sample application that makes use of FFmpegMediaMetadataRetriever can be downloaded here. Note: The sample application is compiled with support for ALL available formats. This results in a larger library and APK. FFmpeg can be recompiled with a subset of codecs enabled for those wanting a smaller size.
Note: The build instructions and scripts assume you are running Unix or Linux. Building on other operating systems is currently not supported.
Execute the following in the root project directory (assuming /path/to/android_sdk/tools is in your PATH):
android update project --path .
Open the newly created local.properties file and add the following lines:
sdk.dir=<path to SDK>
ndk.dir=<path to NDK>
where is the path to your Android SDK, for example:
sdk.dir=/Users/wseemann/Library/Android/sdk
where is the path to your Android NDK, for example:
ndk.dir=/Users/wseemann/Library/Android/sdk/ndk/27.1.12297006
To compile the library in Android Studio, highlight core in the project explorer and run Build->Make Module 'core'. This will also build the native FFmpeg binaries.
Sample code:
FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
mmr.setDataSource(mUri);
mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_ALBUM);
mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_ARTIST);
Bitmap b = mmr.getFrameAtTime(2000000, FFmpegMediaMetadataRetriever.OPTION_CLOSEST); // frame at 2 seconds
byte [] artwork = mmr.getEmbeddedPicture();
mmr.release();
This software uses code of <a href=http://ffmpeg.org>FFmpeg licensed under the <a href=http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>LGPLv2.1 and its source can be downloaded <a href=https://www.ffmpeg.org/developer.html>here.
FFmpegMediaMetadataRetriever: A unified interface for retrieving frame
and meta data from an input media file.
Copyright 2025 William Seemann
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Overall
Maintained
Code review
Latest release
Releases this year
64 followers · starred Feb 2023
8,063 followers · starred Dec 2016
FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
C
1,787
331 commits
updated Jun 28, 2026
View the project page <a href=http://wseemann.github.io/FFmpegMediaMetadataRetriever/>here.
Donations can be made via PayPal:
This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Donations are highly appreciated. Thank you!
PayPal
FFmpegMediaMetadataRetriever is a reimplementation of Android's MediaMetadataRetriever class. The FFmpegMediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file and uses FFmpeg as its backend.
Key Features:
Supported protocols:
Supported formats (audio and video):
Additional support for:
Add the following Maven dependency to your project's build.gradle file:
dependencies {
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native:1.0.23'
}
Optionally, to support individual ABIs:
dependencies {
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-armeabi-v7a:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-x86_64:1.0.23'
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native-arm64-v8a:1.0.23'
}
Or, if your application supports individual architectures, extract the appropriate AAR file into you projects "libs" folder:
A sample application that makes use of FFmpegMediaMetadataRetriever can be downloaded here. Note: The sample application is compiled with support for ALL available formats. This results in a larger library and APK. FFmpeg can be recompiled with a subset of codecs enabled for those wanting a smaller size.
Note: The build instructions and scripts assume you are running Unix or Linux. Building on other operating systems is currently not supported.
Execute the following in the root project directory (assuming /path/to/android_sdk/tools is in your PATH):
android update project --path .
Open the newly created local.properties file and add the following lines:
sdk.dir=<path to SDK>
ndk.dir=<path to NDK>
where is the path to your Android SDK, for example:
sdk.dir=/Users/wseemann/Library/Android/sdk
where is the path to your Android NDK, for example:
ndk.dir=/Users/wseemann/Library/Android/sdk/ndk/27.1.12297006
To compile the library in Android Studio, highlight core in the project explorer and run Build->Make Module 'core'. This will also build the native FFmpeg binaries.
Sample code:
FFmpegMediaMetadataRetriever mmr = new FFmpegMediaMetadataRetriever();
mmr.setDataSource(mUri);
mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_ALBUM);
mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_ARTIST);
Bitmap b = mmr.getFrameAtTime(2000000, FFmpegMediaMetadataRetriever.OPTION_CLOSEST); // frame at 2 seconds
byte [] artwork = mmr.getEmbeddedPicture();
mmr.release();
This software uses code of <a href=http://ffmpeg.org>FFmpeg licensed under the <a href=http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>LGPLv2.1 and its source can be downloaded <a href=https://www.ffmpeg.org/developer.html>here.
FFmpegMediaMetadataRetriever: A unified interface for retrieving frame
and meta data from an input media file.
Copyright 2025 William Seemann
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Overall
Maintained
Code review
Latest release
Releases this year
64 followers · starred Feb 2023
8,063 followers · starred Dec 2016