Get current frame from android mediaplayer

2019-09-06 08:17发布

问题:

Is there a way to retrieve the current frame played from android MediaPlayer object?

回答1:

No. The media player just setups a pipeline that is handled by lower level components. And depending on the hardware platform and the decoder setup the rendering is done in different places.



回答2:

This is a pretty heavy undertaking, involving Android NDK development using something like ffmpeg and glbuffer. You could also bypass OpenGL and just write the ffmpeg-decoded frame to a bitmap in memory.

For getting video thumbnails, there is always ThumbnailUtils.