This is a library that supports record video from surface by MediaRecord or MediaCodec.
openGLES part is based on grafika
This is a texture recorder library, which input is openGLES texture and output is mp4 files.
It supports for TEXTURE_2D and TEXTURE_EXT frames.
The encoder can be chosen between MediaRecorder(which requires Android L or Above) and MediaCodec.
This lib can be used to record screen, rtmp surface, offscreen textures, and any texture that obtained from a OpenGL thread.
Remind that it do not create OpenGLES thread, it is necessary to pass a OpenGLES Context into it Or init it in a GL thread, such that I can get GLContext from current thread. Thus it is necessary to create OpenGLES context in your own project. A GLSurfaceView is recommended.
- init capturing params:
capturingManager.initCapturing(textureWidth, textureHeight,
toSaveFilePath,
Texture2dProgram.ProgramType.TEXTURE_EXT,
encoderType, eglContext);
- start capturing manager:
capturingManager.startCapturing()
- pass texture of each frame into it
capturingManager.captureFrame(textureId)
- stop at proper time
capturingManger.stop();
- release on component destroyed
capturingManger.release();
For more information, just run the demo or contact me by : [email protected]
A empty lib currently.
A empty lib currently.