如何使用GPUImage录制视频? [英] How to Record video with GPUImage?

查看:451
本文介绍了如何使用GPUImage录制视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 https://github.com/Cyber​​Agent/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

切换回屏幕表面

其他有用的链接: EGL表面帮助器 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆