Questions tagged [mediametadataretriever]

96 questions
1
vote
1 answer

Fastest way to check if Video File have Following MetaData?

There are Number of ways to check video file Meta data , using FFmpegMediaMetadataRetriever(Slow but reliable) and using Native MediaMetadataRetriever(Slow and not reliable). There are number of question answered in SO for same purpose to get…
1
vote
1 answer

MediaMetadataRetriever FileNotFoundException

I'm building an app in which you first can choose a video from the phone and then the video is shown twice in another activity. That is to say, the same video is shown at the left half and at the right half of the screen. What I've done this far:…
1
vote
0 answers

MediaMetadataRetriever illegal argument

I'm trying to get a frame from a video that the user choose from his gallery. I'm using MediaMetadataRetreiver and from some reason on the "setDataSource" im getting illegal argument. I'm passing there a string of the location video. I dont know…
1
vote
1 answer

Is there any way to fetch song's genre using MediaStore?

Using this method of audio file retrieval from Android's external storage Cursor cursor = getContentResolver().query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, null, null, null); can I actually find a resonable way to fetch a genre of the…
Andrej Korowacki
  • 169
  • 2
  • 4
  • 10
1
vote
2 answers

Get the length of a video in Android

I want to get the length of a saved video from my device. I have tried with MediaMetadataRetriever but my application crashes. I am testing it on Android 6.0 but it is not working at all. Below is my Activity. public class MainActivity extends…
Mohd Sakib Syed
  • 1,679
  • 1
  • 25
  • 42
1
vote
0 answers

MediaMetadataRetriever strangle behaviour

So, i'm using this simple lines of code: public static boolean checkIfAudioFileIsValid(String filePath) { MediaMetadataRetriever retriever = new MediaMetadataRetriever(); long duration; try { retriever.setDataSource(filePath); …
Nik Myers
  • 1,843
  • 19
  • 28
1
vote
0 answers

Android MediaMetadataRetriever fails to load metadata on old Samsung devices

I'm facing a strange issue when using the android.media.MediaMetadataRetriever. It fails to extract the video width from video files on Samsung phones with Android version 4.0.4 and 4.1.2. The call metaRetriever.extractMetadata() seems to return…
Matthias T
  • 1,230
  • 2
  • 10
  • 24
1
vote
0 answers

Get THumbnail for video URL in dropbox in Android

I have been searching for a way to generate a thumbnail preview image for a video stored on Dropbox in an android app I am developing. At this point it seems that the only way is to create a thumbnail image from the video and upload with the video,…
1
vote
0 answers

Album art not displayed in music player in android

I'm building a music player in Android. I'm displaying the album art for currently playing song. This is my code to retrieve the embedded image:- public Bitmap getAlbumArt(String filePath) { Bitmap bm = null; MediaMetadataRetriever mmr =…
Gaurav Sahu
  • 61
  • 1
  • 6
1
vote
0 answers

How to extract 24 different frames per second from video?

I want to create a GIF from mp4 video. So I need to extract the frames from video first. Here is the code I use to extract frames: MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setDataSource(mFilePath); Bitmap bitmap =…
TOP
  • 2,574
  • 5
  • 35
  • 60
1
vote
0 answers

How to create image from .ts video file in android?

I m getting this error " getFrameAtTime: videoFrame is a NULL pointer " Below is my code. Any suggestion to fix this error ImageView img = (ImageView) findViewById(R.id.picutre); try { MediaMetadataRetriever retriever = new…
Kami
  • 51
  • 5
1
vote
0 answers

How to get a thumbnail of a live stream?

I am currently using MediaMetadataRetriever.getFrameAtTime on Android to get thumbnails of videos and it is working great except for live streams (m3u8). Using the m3u8 directly doesn't seem to work and I have managed to get a bitmap back for a .ts…
1
vote
0 answers

some android devices can not get video thumbnail,The video was shot with the iPhone

I use the native android sdk way to get online video thumbnail,Source code is as follows: private Bitmap showVideoThumbnail(Boolean isUrlPath, String videoPath) { Bitmap bitmap = null; MediaMetadataRetriever mmRetriever = null; try …
1
vote
0 answers

Android MediaMetadataRetriever get frame using FFmpegMediaMetadataRetriever

Can someone please help me about my problem regarding getting current frame from videoview using rtsp data source. I have followed this tutorial from this blog. In this code wherein the bitmap image will be displayed when the user decides to capture…
user3233787
  • 379
  • 1
  • 10
  • 32
1
vote
1 answer

java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFED in android?

Here is my code: MediaMetadataRetriever metadataRetriever; metadataRetriever = new MediaMetadataRetriever(); metadataRetriever.setDataSource(mediaFile.getAbsolutePath()); I get exception like this: E/AndroidRuntime( 3247): Caused by:…
roger
  • 9,063
  • 20
  • 72
  • 119