Reputation: 25
I have created a 3D object on GLSurfaceView(OpenGL ES) on android. Is there any way to create a video file (record 5 seconds) directly from GLSurfaceView(OpenGL ES) without screen recording?
Upvotes: 1
Views: 86
Reputation: 69
You can capture bitmaps after drawing frames and then combine them into a video format.
In GLSurfaceView.onDrawFrame()
you can use gl.glReadPixels()
to collect a bitmap image of the frame. You can then pass these to Android's MediaMuxer class afterwards to encode them into a final video.
Upvotes: 2