百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

FFmpegMediaMetadataRetriever

> 编程语言
开源

FFmpegMediaMetadataRetriever 提供了一个统一的接口,用于从输入媒体文件中提取帧和元数据。

1.8K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

FFmpegMediaMetadataRetriever 提供了一个统一的接口,用于从输入媒体文件中提取帧和元数据。

FFmpegMediaMetadataRetriever

View the project page here.

Donations

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

  • Choose what you want to donate, all donations are awesome!

Overview

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:

  • Built using FFmpeg version 7.1.1
  • ARMv7, x86, x86_64, and ARM_64 support (Note: ARM and MIPS aren't supported as of version 1.0.14)
  • Support for API 21+ and 16 KB page sizes
  • URL support (Unlike MediaMetadataRetriever, see: http://code.google.com/p/android/issues/detail?id=35794)

Supported protocols:

  • file, http, https, mms, mmsh, and rtmp

Supported formats (audio and video):

  • aac, acc+, avi, flac, mp2, mp3, mp4, ogg, 3gp and more!

Additional support for:

  • ICY Metadata (SHOUTcast metadata)

Using FMMR in your application (Android Studio)

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:

Prebuilt AARs

Demo Application

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.

Requirements

  • Android Studio Narwhal 2025.1.2 or higher
  • Android NDK r27 or higher

Android Studio (Gradle)

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.

Usage

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();

FFmpeg

This software uses code of FFmpeg licensed under the LGPLv2.1 and its source can be downloaded here.

License

…

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Choose what you want to donate, all donations are awesome!
  • •Built using FFmpeg version 7.1.1
  • •ARMv7, x86, x86_64, and ARM_64 support (Note: ARM and MIPS aren't supported as of version 1.0.14)
  • •Support for API 21+ and 16 KB page sizes
  • •URL support (Unlike MediaMetadataRetriever, see: http://code.google.com/p/android/issues/detail?id=35794)
  • •file, http, https, mms, mmsh, and rtmp
  • •aac, acc+, avi, flac, mp2, mp3, mp4, ogg, 3gp and more!
  • •ICY Metadata (SHOUTcast metadata)
  • •Android Studio Narwhal 2025.1.2 or higher
  • •Android NDK r27 or higher

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言