how to extract video frames and animate the bitmaps in android? -


i started building video editing app.now able frames current position , stored bitmaps in arraylist. want display them in view , should playing trimmed video clip or kind of animation? please suggest me in regard.

you can try 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);  }  } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -