Camera2 API Samsung Galaxy S9 +没有支持的FPS范围高于240?

问题描述 投票:1回答:1

我一直在使用Camera2 API编写应用程序以捕获慢动作镜头。我知道三星Galaxy S9 +可以录制高达960 fps的慢动作,而对于这个特定项目,我需要录制480 fps。

[我的问题是,具有720p或1080p的map.getHighSpeedVideoFpsRangesFor()返回的最大范围为[240,240],如果我尝试手动为CaptureRequest.Builder提供[480,480]范围,则​​会出现此异常:

IllegalArgumentException while invoking public abstract void android.hardware.camera2.CameraCaptureSession$StateCallback.onConfigured(android.hardware.camera2.CameraCaptureSession)
                 java.lang.IllegalArgumentException: Fps range [480, 480] in the request is not a supported high speed fps range [[120, 120], [240, 240], [60, 120], [30, 120], [60, 240], [30, 240]]
                     at android.hardware.camera2.utils.SurfaceUtils.checkConstrainedHighSpeedSurfaces(SurfaceUtils.java:151)
                     at android.hardware.camera2.impl.CameraConstrainedHighSpeedCaptureSessionImpl.createHighSpeedRequestList(CameraConstrainedHighSpeedCaptureSessionImpl.java:83)
                     at ch.package.app.RecordActivity.updatePreview(RecordActivity.java:655)
                     at ch.package.app.RecordActivity.access$700(RecordActivity.java:74)
                     at ch.package.app.RecordActivity$3.onConfigured(RecordActivity.java:257)
                     at android.hardware.camera2.impl.CameraConstrainedHighSpeedCaptureSessionImpl$WrapperCallback.onConfigured(CameraConstrainedHighSpeedCaptureSessionImpl.java:398)
                     at java.lang.reflect.Method.invoke(Native Method)
                     at android.hardware.camera2.dispatch.InvokeDispatcher.dispatch(InvokeDispatcher.java:39)
                     at android.hardware.camera2.dispatch.HandlerDispatcher$1.run(HandlerDispatcher.java:65)
                     at android.os.Handler.handleCallback(Handler.java:789)
                     at android.os.Handler.dispatchMessage(Handler.java:98)
                     at android.os.Looper.loop(Looper.java:164)
                     at android.os.HandlerThread.run(HandlerThread.java:65)

是否无法通过API在此设备上记录480 FPS?我可以采取另一种方法吗?还是我做错了?

java android android-camera2 galaxy slowmotion
1个回答
0
投票

我认为这是不可能的,尽管三星Galaxy S9 +可以录制高达960 fps的慢动作。只有系统应用程序可以执行此操作,第三方应用程序则不能。

© www.soinside.com 2019 - 2024. All rights reserved.