从 GLSurfaceView 录制视频和音频并将其导出为 .mp4 [英] Record video and audio from a GLSurfaceView and export it to .mp4
问题描述
我是 OpenGL 的新手.我想从 GLSurfaceView 录制视频和音频并将其导出为 .mp4(或其他格式).我有一个实现 Renderer
I am a newbie in OpenGL.
I want to record video and audio from a GLSurfaceView and export it to .mp4 (or other formats).
I have a GlsurfaceView
that implement Renderer
我尝试过在 bigflake.com 中使用 fadden 示例,例如 EncodeAndMuxTest.java
, 或 RecordFBOActivity.java
在 google/grafika 但没有成功,因为我不不知道如何实施.
I've tried using fadden examples's in bigflake.com like EncodeAndMuxTest.java
,or RecordFBOActivity.java
in google/grafika but without success because I don't know how to implement it.
是否有记录 GLSurfaceView 的示例或操作方法"?
Is there any example or "How-to" for recording a GLSurfaceView?
推荐答案
您可以尝试使用 INDE Media for Mobile:https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials GLCapturer 类,它允许在几行代码中进行 opengl 捕获,示例在这里:
You can try to use INDE Media for Mobile: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials GLCapturer class, it allows to make opengl capturing in a few lines of code, samples are here:
synchronized (videoCapture) {
if (videoCapture.beginCaptureFrame()) {
...
renderScene();
videoCapture.endCaptureFrame();
}
}
这篇关于从 GLSurfaceView 录制视频和音频并将其导出为 .mp4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!