Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get frame callback while recording video in android

Tags:

android

video

It would seem duplicate with this question: Keeping preview callback while recording video?

I'm working on a project that require process frame while recording video. unfortunately, mediarecorder start that will block onPreviewCallback return byte[] frame.

After some googling, I find that setPreviewCall() again after start mediarecorder make everything ok. But it have just worked on Xperia. On Lenovo, that problem still remain. On asusMemopad, It returned previewcallback, but each frame which we got same as another. Everything is a mess until i read this post: http://andrey.chernih.me/2014/06/28/video-recording-and-processing-in-android/

But the solution still have some big issue. Have anyone deal with this? Any answer would be appreciated.

like image 276
topcbl Avatar asked May 27 '26 07:05

topcbl


1 Answers

After some try, finally i got a solution for this issue. The javaCV library https://github.com/bytedeco/javacv is simplest way and maybe it's a best choice too to handle frame while recording video. Actually, It just a alternate way and still remain so many problem. So glad you guys figure out the better way.

like image 173
topcbl Avatar answered Jun 01 '26 23:06

topcbl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!