android / android/camera-samples
[Camera2Video] Pixel 5 4K cannot record
- Dominant language
- Kotlin
- Stars
- 5.5k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Device: Pixel 5
System: Android 12 (S2B1.211112.006)
Phenomenon 1:
Without any modification, select "Back(0) 3840x2160 60 FPS" and the camera has a black screen
Phenomenon 2:
After adding `set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, Range(args.fps, args.fps))` in [here][1], "Back(0) 3840x2160 60 FPS" is displayed normally, [modified][2]FPS is 30 cameras Black screen
Notice:
1. Pixel 6 Pro performs as expected
2. Add `CaptureCallback#onCaptureFailed` in [here][2] to get `CaptureFailure#REASON_ERROR`
[1]:https://github.com/android/camera-samples/blob/6cbd2cc5a5318029f889fb46b4509c869b454856/Camera2Video/app/src/main/java/com/example/android/camera2/video/fragments/CameraFragment.kt?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L155
[2]:https://github.com/android/camera-samples/blob/6cbd2cc5a5318029f889fb46b4509c869b454856/Camera2Video/app/src/main/java/com/example/android/camera2/video/fragments/SelectorFragment.kt?_pjax=%23js-repo-pjax-container,%20div%5Bitemtype=%22http://schema.org/SoftwareSourceCode%22%5D%20main,%20%5Bdata-pjax-container%5D%23L124#L124
[3]:https://github.com/android/camera-samples/blob/6cbd2cc5a5318029f889fb46b4509c869b454856/Camera2Video/app/src/main/java/com/example/android/camera2/video/fragments/CameraFragment.kt?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L253
Contributor guide
Research direction
Reproduce the Pixel 5 Android 12 behavior in Camera2Video/app/src/main/java/com/example/android/camera2/video/fragments/CameraFragment.kt and SelectorFragment.kt, focusing on the linked capture-request and FPS-selection lines. Compare capture failures for 3840x2160 at 60 and 30 FPS, including CaptureFailure.REASON_ERROR. Done means the supported configuration records without a black preview or capture failure on the affected device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- audio-video-rtc, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100