Status Update
Comments
sh...@gmail.com <sh...@gmail.com> #2
CAMERAX VERSION: 1.5.0-alpha04
Device: Pixel 7a (Android 15)
Passing a supported range of 60, 60 (that is present in CameraInfo.getSupportedFrameRateRanges
) to setTargetFrame
doesn't make the recorded video of 60 fps. However, other supported non-60 fps frame rates work as expected giving roughly the expected/higher end of the range.
Recording a video at the lowest quality/resolution (i.e. 480p) and choosing any 60 fps range doesn't help too. I have tried explicitly setting the frame rate too just to make sure that the frame rate isn't being wrongly set somehow but that didn't help either unfortunately.
I'm using ffmpeg
to know the fps at which the video has been recorded and its either at 14.95 fps for 15 fps
or 29.xx fps for 30 and 60 fps
range even at lower qualities.
Highly unsure if anything else could be causing the video to not be recorded at 60 fps. Please do let me know if any other additional information could help bring more clarity in resolving this issue
Thanks a lot for all your time and support!
Regards,
Mohit
ta...@google.com <ta...@google.com> #3
Hi Mohit,
The target FPS is not guaranteed and it's possible that the 60 FPS is not being enabled due to some certain combination of features in this case. For example, HDR and 60 FPS probably doesn't work together in some devices.
Could you please let us know which CameraX use cases and features you are using? Specially, the VideoCapture/Recorder quality, HDR, stabilization mode, ImageCapture etc. if you are using any of them.
Alternatively, you can bind only Preview and VideoCapture without any other features to test if that works.
sh...@gmail.com <sh...@gmail.com> #4
Hi,
Thanks for the detailed reply.
The target FPS is not guaranteed and it's possible that the 60 FPS is not being enabled due to some certain combination of features in this case.
Is it possible to know when 60 fps is guaranteed to be supported by the device for a given combination via some API or docs if there are some standard rules/logic for them across all devices?
We're using the current camera info retrieved after binding a camera instance to know supported ranges via CameraInfo.getSupportedFrameRateRanges
, so maybe some filtering to remove fps ranges that aren't guaranteed could help resolve this issue
For example, HDR and 60 FPS probably doesn't work together in some devices.
Could you please let us know which CameraX use cases and features you are using? Specially, the VideoCapture/Recorder quality, HDR, stabilization mode, ImageCapture etc. if you are using any of them.
We're combining PreviewView, ImageCapture and VideoCapture on a Pixel 7a. The behavior is the same with 480p quality too. We haven't supported HDR or any other extension mode for ImageCapture in video mode or custom image format yet, although we have enabled stabilization by default (unsure if that's causing the frame rate to be as if the setting was 30 fps)
Alternatively, you can bind only Preview and VideoCapture without any other features to test if that works.
Sure definitely, I'll try testing different combinations of settings and will get back soon
Thanks a lot for your time and support!
sh...@gmail.com <sh...@gmail.com> #5
Hi,
Thanks for the inputs. It seems that 60 fps isn't supported/enforced for the lowest quality (480p/SD) and the highest quality (2160p/UHD), but other qualities such as HD (720p) and UHD (1080p) support it as expected. The other options (stabilization, saving video as previewed, binding an additional image capture use case, etc.) don't seem to be negatively impacting the frame rate of the recorded video in any way for Pixel 7a
Could it be possible to have an API to know the frame rates that are available for the current/given quality, or the frame rate ranges available for the settings applied to the bound camera instance (possibly updating the implementation of the existing CameraInfo.getSupportedFrameRateRanges()
method or a separate method if its perceived as a breaking change for an expected/documented behavior)?
le...@google.com <le...@google.com>
sh...@gmail.com <sh...@gmail.com> #6
Hi,
Thanks for accepting this issue. Just a bump to this thread. Is there any progress on this issue/feature request by any little chance? Please do let me know if any additional details are required.
Thanks a lot for your valuable time and support!
Regards,
Mohit
le...@google.com <le...@google.com> #7
Thank you for reporting this issue.
The CameraInfo.getSupportedFrameRateRanges
method returns the device's supported frame rates, but doesn't consider how those rates interact with specific use case combinations.
The reason you're seeing 30fps
is because 30fps
for UHD and SD video formats. Currently, the targetFrameRate
API doesn't throw exceptions; instead, it falls back to a supported frame rate, which in your case is 30fps
.
To address your need, we might need a API that can confirm if a given frame rate is supported for a specific use case combination. We will update in this bug when we get further solution. Thank you.
sc...@google.com <sc...@google.com> #8
We need a new API for apps to know 100% sure if 60 fps is supported or not with given use cases combinations which Leo is working on it.
sh...@gmail.com <sh...@gmail.com> #9
Hi everyone,
Thanks for accepting this feature request!
Yes, we can possibly have an API on the bound camera instance that considers all the configurations and use cases that can impact the fps of the video to give a final list of actually available. Alternatively, we can have an API on the camera provider, that accepts a use case group or list of use cases (as a variable length argument) along with camera selector to determine the list of actually available fps ranges, which could help choose a valid fps without having to bind a camera instance.
Please do let me know I could help in any way and thanks a lot for your time, help and support!
Regards,
Mohit
Description
CAMERAX VERSION: 1.5.0-alpha04
Device: Pixel 7a (Android 15)
Passing a range of 60,60 from
CameraInfo.getSupportedFrameRateRanges
(via current camera info) to setTargetFrame doesn't make the recorded video of 60 fps. However, other supported non-60 fps frame rates work as expected giving roughly the expected/higher end of the range.Recording a video at the lowest quality/resolution (i.e. 480p) and selecting a frame rate range doesn't seem to help too. I have tried explicitly setting the frame rate too just to make sure that the frame rate isn't being wrongly set somehow but that didn't help either unfortunately.
I'm using
ffmpeg
to know the fps at which the video has been recorded and its either at 14.95 fps for 15 fps or 29.xx for 30 and 60 fps even at lower qualities.Highly unsure if anything else could be causing the video to not be recorded at 60 fps. Please do let me know if any other additional information could help bring more clarity in resolving this issue
Thanks a lot for all your time and support!
Regards,
Mohit