问题描述
我使用了 https://github.com/CyberAgent/android-gpuimage ,但它只是保存图像.如何使用GLSurfaceview录制视频?
i used https://github.com/CyberAgent/android-gpuimage but its just save images.how to record video using GLSurfaceview?
推荐答案
android-gpuimage库不支持视频录制,但是您可以尝试使用android-gpuimage-videorecording库.这是Android的gpu映像的分支,还提供了视频录制功能
android-gpuimage library does not support video recording but you can try using the android-gpuimage-videorecording library. It is a fork of the gpu-image for android that provides also the video recording functionality
android-gpuimage-videorecording
请参阅GPUImageMovieWriter类
see the GPUImageMovieWriter class
它应该为您提供正确的方向,以便在GPUImage之上开发自己的视频编写器.
It should point you in the right direction for developing your own video writer on top of GPUImage.
想法是:
-
在当前屏幕表面上绘制
draw on current screen surface
切换到编码器输入表面,并在其上再次绘制上一个帧缓冲区
switch to encoder input surface and draw previous frame buffer again on it
切换回屏幕表面
这篇关于如何使用GPUImage录制视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!