Use MediaCodec and MediaExtractor to decode and code video

后端 未结 2 1004
情歌与酒
情歌与酒 2021-02-06 13:35

I need to decode a video into a sequence of bitmaps, such that I am able to modify them, and then compress them back to a video file in android.

I plan to manage this b

2条回答
  •  不思量自难忘°
    2021-02-06 14:01

    There are many people saying that the method onFrameAvailable() is never called. Well, the listener should be in a different thread than the main thread. To set the listener do this: (where this is the class listener that implements SurfaceTexture.IOnFrameAvailableListener):

    mSurfaceTexture.SetOnFrameAvailableListener(this);
    

提交回复
热议问题