如何嵌入文本,而在Android的录像? [英] How to embed text while recording video in Android?

查看:234
本文介绍了如何嵌入文本,而在Android的录像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是在Android的录制视频用秒表嵌入其中,同时录制。

My goal is to record the video in Android with stopwatch embedded in it while recording.

我跟着 Grafika项目的样品, CameraCaptureActivity.java 在那里使用OpenGL 2.0以及录制视频录制一小块。他们使用的是下面的code在OpenGL的2.0绘制块

I followed the samples of Grafika Project, CameraCaptureActivity.java where they use OpenGL 2.0 to record a small block along with recording video. They are using following code to draw block in OpenGL 2.0

private static void drawExtra()
{
      GLES20.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
      GLES20.glEnable(GLES20.GL_SCISSOR_TEST);
      GLES20.glScissor(0, 0, width / 3, height / 3);
      GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
      GLES20.glDisable(GLES20.GL_SCISSOR_TEST); 
}

以上code画出白色块在视频的左下方,同时记录和保存。

The above code draw white block at the bottom left side of the video while recording and saving.

我要的是为绘制文本超过了白盒使用OpenGL 2.0,因此,它也将与录像一起。

What I want is to draw text over that white box using OpenGL 2.0, so that it will also record along with video.

我没有了OpenGL 2.0的知识。需要帮助刚刚绘制文本在相同的表面,视频录制,所以它会被嵌入到它,就像那白色的盒子。

I dont have knowledge of OpenGL 2.0. Need help to just draw text over same surface where video is recording, so that it will get embedded into it just like that white box.

推荐答案

您可以尝试英特尔印出上的 https://software.intel.com/en-us/intel-inde 和媒体包为Android是印出的一部分,上的https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials.它有一个名为TextOverlayEffect样品的效果将文本的视频

You can try Intel INDE on https://software.intel.com/en-us/intel-inde and Media Pack for Android which is a part of INDE, tutorials on https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials. It has a sample effect called TextOverlayEffect to put text on a video

这篇关于如何嵌入文本,而在Android的录像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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