2

I started building the video editing app.Now i am able get the frames from current position and i stored the bitmaps in arraylist. I want display them in a view , which should look like playing a trimmed video clip or kind of animation? Please suggest me in this regard.

3
  • 1
    hmmm.... I think you should have benefits from the use of opengl... Commented Oct 7, 2013 at 13:48
  • what are other best approach with native API's? Commented Oct 7, 2013 at 13:49
  • nothing really performing I suppose. How many frames? How many fps? Commented Oct 7, 2013 at 13:54

1 Answer 1

6

You can try this to extract frame:

package com.example.androidmediametadataretriever; import android.graphics.Bitmap; import android.media.MediaMetadataRetriever; import android.os.Bundle; import android.widget.ImageView; import android.app.Activity; public class MainActivity extends Activity { String uri = "/storage/sdcard0/DCIM/100MEDIA/VIDEO0007.mp4"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView capturedImageView = (ImageView)findViewById(R.id.capturedimage); MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever(); mediaMetadataRetriever.setDataSource(uri); Bitmap bmFrame = mediaMetadataRetriever.getFrameAtTime(5000000); //unit in microsecond capturedImageView.setImageBitmap(bmFrame); } } 
Sign up to request clarification or add additional context in comments.

10 Comments

i tried the same code,i set fps=30, and i captured the frames around 1 sec , nearly i got 34 bitmaps, which i stored in arraylist, now i wanted to display them one by one,plz let how can i achieve that?
I think you can start from here: stackoverflow.com/questions/4724355/…
Thanks a lot, i look into that post
Thanks for your kind support. I tried with getFrameAt(time,MediaMetadataRetriever_OPTION_CLOSEST) but i am getting null value.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.