MediaMetadataRetriever.getFrameAtTime() returns only first frame

前端 未结 7 1566
不思量自难忘°
不思量自难忘° 2020-12-01 12:12

I have extracted frames from a video using MetadataRetriever, and have stored all images in an ArrayList. I want to store all of them on an SD car

7条回答
  •  庸人自扰
    2020-12-01 12:36

    Try this on your for/loop:

    Bitmap bitmap = retriever.getFrameAtTime(
        TimeUnit.MICROSECONDS.convert(i, TimeUnit.MILLISECONDS), 
        retriever.OPTION_CLOSEST_SYNC);
    

提交回复
热议问题