Is there a way to retrieve the current frame played from android MediaPlayer object?
Asked
Active
Viewed 3,730 times
2 Answers
2
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.
nvloff
- 91
- 3
-
Thanks. Is there another way to get a frame from the played video (while played) using java? Maybe a way to redirect the video outside of the device? – MByD Mar 01 '11 at 14:24
-
No java APIs. Even SurfaceFlinger just creates the surface and passes size and possition of the surface to the renderer. One way to get the video out is to make the android device a video streaming server. Maybe there are some apps for that(i'm guessing VLC) I'm not really sure. Other way is HDMI output. – nvloff Mar 01 '11 at 16:06
-
Thanks for your answer, but I don't want to play content that I already have on the device on the PC, but to catch the frame that is played on the device while my application (which calls MediaPlayer) is running. – MByD Mar 01 '11 at 16:36
1
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.
Matthew Willis
- 44,487
- 10
- 97
- 87