Questions tagged [mediametadataretriever]
96 questions
25
votes
1 answer
logcat error : E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
I am trying to get Album art for every song in my music player app. But I get nothing except a black screen, no album covers.It seems there are no errors as such in the code except log cat errors which I have never heard of.
Here is the Java file…
user8196092
23
votes
1 answer
MediaExtractor, MediaMetadataRetriever with Raw/Asset File
I try to read a video file inside either raw/assets folder, I have tried the following approaches but none of them works. I am testing on API 16. Each approach, I try with and without mp4 extension. I really appreciate that somebody can help me with…

vodkhang
- 18,639
- 11
- 76
- 110
22
votes
6 answers
MediaMetadataRetriever setDataSource throws IllegalArgumentException
I'm trying to get the size of a remote video using this class and i'm getting IllegalArgumentException if the video is remote.
the video is an mp4 stored in one server...
the video plays correctly if i play it with mediaplayer, but it gives the…

NullPointerException
- 36,107
- 79
- 222
- 382
13
votes
2 answers
Android MediaMetadataRetriever wrong video height and width
I want to retrieve height and width of video, I am using MediaMetadataRetriever class for this. It is working correct for most of the case, but for few case height and width are interchanged.
I think this might be happening because of orientation…

user1590595
- 795
- 2
- 13
- 37
9
votes
2 answers
Get multiple thumbnails from video
I'm using MediaMetadataRetriever to retrieve thumbnails at a specific time in video. This is how I achieve this:
MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever();
try {
…

ClassA
- 2,480
- 1
- 26
- 57
7
votes
1 answer
MediaMetadataRetrieverJNI: getEmbeddedPicture failed
Im using android and am iterating over a few hundred mediafiles to find the first embedded picture, which works well, but sends me a lot of errors in my logcat.
Im using this code:
for (String s : ArrayList paths){
…

Paul Woitaschek
- 6,717
- 5
- 33
- 52
6
votes
2 answers
MediaMetadataRetrieverJNI(14060): getFrameAtTime: videoFrame is a NULL pointer(Android)
I am creating thumbnails by videos frame using MediaMetadataRetriever but I am getting this message in Logcat:
E/MediaMetadataRetrieverJNI(14060): getFrameAtTime: videoFrame is a NULL pointer
Here is my code:
MediaMetadataRetriever retriever =…

User42590
- 2,473
- 12
- 44
- 85
5
votes
1 answer
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…

Hackmodford
- 3,901
- 4
- 35
- 78
4
votes
0 answers
FFmpegMediaMetadataRetriever returns setDataSource failed: status = > 0xFFFFFFFF
This is a weird error! because it sometimes works but sometimes doesn't work. I'm using FFmpegMediaMetadataRetriever to get the thumbnail from a video using an URL path. retriever.setDataSource(((Video) obj).getVideoAddress()); return following…

Alex
- 1,623
- 1
- 24
- 48
3
votes
1 answer
getScaledFrameAtTime from MediaMetadataRetriever is too slow to return bitmap in Android 10
Getting bitmap from video using metadata retriever takes too much of time in Android 10 but below Android 10 works well. Facing this issue only in Android 10.
getFrameAtTime and getScaledFrameAtTime both are slow in Android 10.
Here I have added…

MathankumarK
- 2,717
- 1
- 17
- 34
3
votes
0 answers
How to get video thumbnail as GIF from video URL?
I want to show video thumbnail as GIF from video URL like TikTok - including musical.ly app.
See below video for getting more details
I have used this to get first 10-15 video frames to generate GIF. but it's not working.
MediaMetadataRetriever…

Akash Patel
- 3,091
- 3
- 15
- 23
3
votes
1 answer
Putting bitmap on MediaSessionCompat not showing ART WORK in lockscreen ?
mediaSessionCompat.setMetadata(new MediaMetadataCompat.Builder()
.putString(MediaMetadataCompat.METADATA_KEY_ALBUM, trackDataNowPlaying.JukeBoxCategoryName)
…

Bincy Baby
- 3,941
- 5
- 36
- 62
3
votes
2 answers
MediaMetadataRetriever setDataSource failed: status = 0xFFFFFFED
I need to fetch frames from video located in the web. That's how I do this:
class PlayerWrapper {
private static final MediaMetadataRetriever mMediaMetadataRetriever = new MediaMetadataRetriever();
…
public void initPlayback(final…

darja
- 4,985
- 9
- 33
- 47
3
votes
0 answers
I want to embed text and stickers to video
Is there any easy approach to embed text and sticker to video.
I don't want to use overlay
I want to embed(add it to video permanently). Can i do this without using FFmpeg (NDK library). Is there any way using MediaMetadataRetriever.

Zar E Ahmer
- 33,936
- 20
- 234
- 300
3
votes
2 answers
Android MediaMetadataRetriever OPTION_CLOSET not working for some videos
I'm just starting on android development.
I've been trying for some time to extract frames from video files I have on my phone like this:
MediaMetadataRetriever retriever = new…

Pedro Leal
- 183
- 1
- 10