How to show live preview of camera view while recording video?

I want to show a filtered camera view while recording a video using a media recorder. To filter the preview, I need frames that I can get from the onPreviewFrame () function, but when recording video using the media recorder, the onPreviewFrame () function is not called. So what I want to know is there other ways to get these frames for filtering and then show them after the change? I checked some applications from Google Play, for example, Videocam Illusion. Preview it with effects while recording a video. I want to do something like this, but I don’t know how to do it. Therefore, I will be grateful for any help / hints / code / sample on this issue. Thanks.

+6
source share
1 answer

I did not do this myself, but I was looking for it not so long ago. There is an answer to StackOverflow to show a modified PreviewFrame buffer:

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

And here is the link of google groups in the same topic.

How can I manipulate the camera preview?

Hope this helps, I'm planning an application that changes the preview frame but doesn't write anything.

The best regars.

+1
source

Source: https://habr.com/ru/post/925021/


All Articles