Skip to content

Surface and texture(video) record library for Android. Android 纹理\Surface 录制库\ 录屏库 Android 视频录制库

Notifications You must be signed in to change notification settings

Neilcc/ZTextureRecorder

Repository files navigation

GLMediaHub \ ZTextureRecorder

Introduction

This is a library that supports record video from surface by MediaRecord or MediaCodec.

openGLES part is based on grafika

Libs and Apis

mediarecorderlib

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.
It can easily used by four steps:
  1. init capturing params:
    capturingManager.initCapturing(textureWidth, textureHeight,
                        toSaveFilePath,
                        Texture2dProgram.ProgramType.TEXTURE_EXT,
                        encoderType, eglContext);
  1. start capturing manager:
   capturingManager.startCapturing()
  1. pass texture of each frame into it
   capturingManager.captureFrame(textureId)
  1. stop at proper time
    capturingManger.stop();
  1. release on component destroyed
    capturingManger.release();

For more information, just run the demo or contact me by : [email protected]

mediadecoderlib

A empty lib currently.

glrender

A empty lib currently.

Recorder Struct

StructImg2

About

Surface and texture(video) record library for Android. Android 纹理\Surface 录制库\ 录屏库 Android 视频录制库

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published