You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[camera] Support separate resolution presets for photo and video capture #194208
The camera plugin currently uses a single ResolutionPreset for both still image capture and video recording. Some applications need high-resolution photos while recording videos at a lower resolution to reduce file size, upload time, memory usage, and encoding load.
Proposal
Allow photo capture and video recording resolution to be configured independently. For example:
final controller =CameraController(
camera,
ResolutionPreset.high,
photoResolutionPreset:ResolutionPreset.max,
videoResolutionPreset:ResolutionPreset.high,
);
The existing resolutionPreset can remain the default for both modes to preserve backward compatibility. When an optional mode-specific preset is provided, the platform implementation should apply it only to the corresponding capture pipeline:
photoResolutionPreset for takePicture()
videoResolutionPreset for startVideoRecording()
This would let applications balance still-image detail and video size/performance without rebuilding the controller or interrupting the preview.
I looked into how we could implement separate photo and video resolution presets across the supported platforms. The main platforms seem to support this, with some limitations on the web.
There are also two related issues worth mentioning: #46082, which requests independent resolutions for takePicture and startImageStream, and #130958.
Android (camera_android_camerax): CameraX uses separate ImageCapture and VideoCapture use cases, so we can configure their resolutions independently.
iOS (camera_avfoundation):AVCapturePhotoOutput supports high-resolution photos independently of the video configuration, so we can keep video recording at a lower resolution.
Windows (camera_windows): Media Foundation handles photo capture and video recording separately, so each can use its own configuration.
Web (camera_web): The W3C Image Capture API provides takePhoto(), which supports photo-specific settings such as width and height. However, browser support is limited. We could use this API where available and fall back to capturing a frame from the active video stream using a canvas. With that fallback, photo resolution would still depend on the video stream.
Android legacy (camera_android): We could handle this separately, since camera_android_camerax is now the default implementation.
A couple of things we should also consider:
Aspect ratio and field of view: Photos are often 4:3, while video presets like 720p and 1080p use 16:9. This means the photo may show a different field of view than the preview, so we should document that.
Preview configuration: The preview should use videoResolutionPreset, falling back to resolutionPreset when needed. This should help avoid preview changes or interruptions when recording starts.
Activity
Mairramer commentedon Oct 12, 2026
Hi @ivan-vanyusho, thanks for opening this proposal!
I looked into how we could implement separate photo and video resolution presets across the supported platforms. The main platforms seem to support this, with some limitations on the web.
There are also two related issues worth mentioning: #46082, which requests independent resolutions for
takePictureandstartImageStream, and #130958.camera_android_camerax): CameraX uses separateImageCaptureandVideoCaptureuse cases, so we can configure their resolutions independently.camera_avfoundation):AVCapturePhotoOutputsupports high-resolution photos independently of the video configuration, so we can keep video recording at a lower resolution.camera_windows): Media Foundation handles photo capture and video recording separately, so each can use its own configuration.camera_web): The W3C Image Capture API providestakePhoto(), which supports photo-specific settings such as width and height. However, browser support is limited. We could use this API where available and fall back to capturing a frame from the active video stream using a canvas. With that fallback, photo resolution would still depend on the video stream.camera_android): We could handle this separately, sincecamera_android_cameraxis now the default implementation.A couple of things we should also consider:
videoResolutionPreset, falling back toresolutionPresetwhen needed. This should help avoid preview changes or interruptions when recording starts.