如何在录制视频时显示实时过滤的相机预览? [英] How to show real time filtered camera preview while recording videos?

查看:26
本文介绍了如何在录制视频时显示实时过滤的相机预览?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在使用媒体记录器录制视频时显示过滤后的相机预览.为了过滤预览,我通常需要帧,我可以从 onPreviewFrame() 函数中获取,但是在使用媒体记录器录制视频时,不会调用 onPreviewFrame() 函数.所以我想知道,有没有其他方法可以让这些帧进行过滤,然后在修改后显示它们?我检查了一些来自 Google Play 的应用程序,例如 Videocam Illusion.它在录制视频期间显示带有效果的预览.我想做类似的事情,但没有提示如何去做.因此,我将不胜感激有关该问题的任何帮助/提示/代码/示例.谢谢.

I want to show filtered camera preview while recording a video using media recorder. To filter the preview i need frames normally which i can get that from onPreviewFrame() function but while recording video with media recorder, onPreviewFrame() function does not get called. So what i want to know , is there any other ways to get these frames for filtering and then show them after modification ? I checked some apps from Google Play for example, Videocam Illusion. Its showing preview with effects during recording videos. I want to do something like that but have no hint how to do so. So i will appreciate any help/hints/code/sample regarding the issue. Thanks.

推荐答案

我自己没做过,不久前搜索了一下.StackOverflow 上有一个答案来显示 PreviewFrame 的修改后的缓冲区:

I haven't done it myself, but searched for it not so long ago. There's an answer on StackOverflow to show modified buffer of PreviewFrame:

https://groups.google.com/论坛/?fromgroups=#!topic/android-developers/yF6CmrIJzuo

这里有一个关于同一主题的 google 群组链接.

And here, a google groups link on the same topic.

如何操作相机预览?

希望这会有所帮助,我正计划开发一个修改预览帧的应用程序,但不会记录任何内容.

Hope this helps, I'm planning on an application that modifies the preview frames, but is not going to record anything.

最好的问候.

这篇关于如何在录制视频时显示实时过滤的相机预览?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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