5

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
  • 1,822
  • 2
  • 22
  • 44
  • have you got a solution to this question? – Ali Nov 13 '18 at 06:03
  • answer added, plz check. – Haris Nov 13 '18 at 06:48
  • can you please explain me how to i capture video continuously and get the frame from this video only 7 second and save into Internal Storage not full video please. – Ali Nov 13 '18 at 06:51
  • you can save video for 7 seconds and then get frames. Other option for getting realtime frames is this method(in answer), if you need to do some face detection edge detection, this is the place. – Haris Nov 13 '18 at 07:07
  • then how to i get real time video frame ? if i press the button before 7 second it's save video. if i pressed after 7 second like video recording 20 second and i pressed the save button then how to save only 7 second video not 20 second video ?? can your please help me – Ali Nov 13 '18 at 07:15

1 Answers1

0

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.

Haris
  • 1,822
  • 2
  • 22
  • 44