How to capture frame by frame images from Android video recording in real time

Haris :

I want to get realtime frames from video. like camera is open and I am getting frames per seconds.

I have also gone through google example of video capturing app via camera2 API https://github.com/googlesamples/android-Camera2Video , But couldn't find any such method/way.

I know this is possible as video broadcasters and apps like snapchat who does realtime video processing must be doing something like this.

Also I require 30 frames/seconds.

Haris :

One can get frames by using ImageReader for camera2 API. And preview callback for camera1 API.

Here is how to do it with camera2 API.

One can also explore this library for working example with both camera2 and camera1 API.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=84027&siteId=1