处理Android的视频一帧一帧的同时录制 [英] Processing Android video frame by frame while recording

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

问题描述

我所试图做的是创造,增加了效果,视频录制时的应用程序。有没有办法有一个回调方法接收帧,然后应用效果,并有记录。目前,声称这是能够做到这一点的唯一应用程序在Android Market(幻觉的VideoCam)的应用程序。任何人都知道幻觉的VideoCam这是否还是有一些链接可能教程概述视频处理为Android?

What I am attempting to do is create an application that adds effects to videos while recording. Is there any way to have a callback method receive the frame, then apply an effect to it and have that recorded. There is currently an application on the Android Market (Videocam Illusion) that claims it is the only application that can do this. Anyone know how Videocam Illusion does this or have some links to possible tutorials outlining video processing for Android?

这是一个类似的问题是没有答案:

This is a similar question that is unanswered:

<一个href="http://stackoverflow.com/questions/6386903/android-$p$pview-processing-while-video-recording/8638906#8638906">Android preVIEW处理,而视频录制

推荐答案

不幸的是,(除非我是不知道的API提供了一些其它的方法)的方式做到这一点是使用直接流摄像机和操纵它通过使用某种形式的本土code修改流。我已经做了一些类似的,当我工作的一个眼球追踪系统前, - 所以我会告诉你它是如何工作的基本

Unfortunately, (unless I'm unaware of some other method provided by the API) the way this is done is using a direct stream to the camera and manipulating it by using some sort of Native Code to modify the stream. I've done something similar to this before when I was working on an eyetracker - So I'll tell you how it works basically.

  1. 打开使用NDK流(可能API,取决于实现)
  2. 修改流的字节 - 每帧被发送作为一个单独的数据包。你必须抓住从相机的每个数据包,并对其进行修改。你可以做一个替代的颜色,也可以翻译。您也可以使用OpenGL通过增加像玻璃的效果来修改图像完全。
  3. 拼合图像背出
  4. 发送图像交给视图控制器被显示。

有一件事情你必须要留意的是负载和发送的数据包和放大器;图像发生的第二对每一帧约1/30。因此,code已被极度优化。

One thing that you have to be mindful of is the load and send of the packets & images happen in about 1/30th of a second for each frame. So the code has to be extremely optimized.

这篇关于处理Android的视频一帧一帧的同时录制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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