Assigned
Status Update
Comments
wu...@google.com <wu...@google.com>
fu...@google.com <fu...@google.com> #2
For >60 FPS some devices may expose that via a high speed capture session, not supported on CameraX for now, though some can support >60fps in a regular session.
This is currently not on the roadmap however, though we are open to hearing from community on if this is becoming a highly sought after feature.
ma...@gmail.com <ma...@gmail.com> #3
Thanks for your reply - are there any constraints with ImageAnalysis
, or can ImageAnalysis
also stream in the maximum resolution (e.g. 4k) at maximum frame rate (e.g. 60 FPS)?
I remember using it a while ago and it could only achieve 640x480 at 25 FPS.
Description
Hey all!
I have a Camera2 app where I built a custom
VideoPipeline
that effectively does this (pseudo code):And then in
renderImageToOpenGL
I effectively render a filter above the user's face, and finally render the whole image with filter to two output surfaces:I wanted to rebuild this in CameraX, but haven't found a way to do so. From my understanding this would require me to either extend
UseCase
orVideoOutput
, but I couldn't get either to work.I thought that this might actually be quite a common use-case nowadays, since the
ImageAnalysis
has a few disadvantages:Preview
,ImageAnalysis
andVideoCapture
, theImageAnalysis
use-case runs in parallel, so the face filters would not be perfectly in sync for each frame.ImageAnalysis
I have seen resolution limits (e.g. not being able to stream 4k images) as well as FPS limits (e.g. not being able to stream at 60 FPS or even 90 FPS)ImageAnalysis
I was not able to useImageFormat.PRIVATE
.ImageAnalysis
, I would still need to create my ownMediaRecorder
/Encoder instead of being able to re-use theRecorder
/Recording
from CameraX.So this is why I created this feature request - to have an additional way of processing frames in a synchronous pipeline which is treated like a realtime video stream.
I have thought of something like this:
In my experience, using
HardwareBuffer
s instead ofImage
s was a bit tricky to get working, but it was a much more flexible approach thanImageReader
/ImageWriter
s as OpenGL could handle scaling automatically. Not sure which one is faster/more suitable for actual 60 FPS - 120 FPS realtime use though.If this is not something you are interested in building, feel free to close this feature request.
If this is something that is already possible in CameraX, please let me know!
Thanks!