简体   繁体   English

如何实时捕捉Android视频录制中的逐帧图像

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

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. 我也通过camera2 API https://github.com/googlesamples/android-Camera2Video浏览了谷歌视频捕获应用程序的示例,但找不到任何此类方法/方式。

I know this is possible as video broadcasters and apps like snapchat who does realtime video processing must be doing something like this. 我知道这是可能的,因为像视频广播公司和做过实时视频处理的Snapchat这样的应用必须做这样的事情。

Also I require 30 frames/seconds. 我还需要30帧/秒。

One can get frames by using ImageReader for camera2 API. 通过使用ImageReader for camera2 API可以获得帧。 And preview callback for camera1 API. 并预览camera1 API的回调。

Here is how to do it with camera2 API. 以下是使用camera2 API的方法。

One can also explore this library for working example with both camera2 and camera1 API. 您还可以使用camera2和camera1 API探索此以获取工作示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM