How to show real time filtered camera preview while recording videos?
Asked Answered
P

1

6

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.

Progressionist answered 10/9, 2012 at 13:20 Comment(0)
Y
1

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/forum/?fromgroups=#!topic/android-developers/yF6CmrIJzuo

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

How can I manipulate the camera preview?

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

Best Regars.

Yearly answered 10/9, 2012 at 14:38 Comment(2)
@ Aitor : I already checked these links but the problem is onPreviewFrame() function of the previewcallback does not get called when u are recording video with mediarecorder, as i mentioned in my question.Progressionist
What version of Android are you targeting? ICS has this class for adding effects while recording video: source-android.frandroid.com/packages/apps/Camera/src/com/…. Don't know if it can be ported thoughYearly

© 2022 - 2024 — McMap. All rights reserved.