Recording video on Android from the OpenGL surface (GLSURFACEVIEW)

I am working on a project where we need to record a visualized OpenGL surface. (for example, if we use GLsurfaceView, we need to record the surface along with the sound from the MIC)

I am currently using the MediaRecorder API, setting the video source as VIDEO_SOURCE_GRALLOC_BUFFER.

I use the following sample as the base code

I wanted to know ....

  • Is this right ?, is there an alternative?
  • The test test provided in the link records EGLSURFACE audio and video, but does not display correctly.

What could be the reason?
Any help / pointers really appreciated.

thanks
satish

+5
source share
1

, , , , . SurfaceMediaSource .

Update: Android 4.3 (API 18) MediaCodec. EncodeAndMuxTest OpenGL ES .mp4.

MediaRecorder , , MediaMuxer.

# 2: Android 5.0 (API 21) " " MediaRecorder, MediaCodec. MediaCodec, , OpenGL ES " GL " Grafika.

MediaProjection .

+7

All Articles