Flutter plugin · Android & iOS · MIT

Dual Cameras

Record the front and back cameras at the same time, composited live on the GPU into a single portrait .mp4 and photo, with a real-time preview. The BeReal / Snapchat dual capture, as a proper open-source plugin.

$ flutter pub add dual_cameras
Android · working alpha iOS · alpha, running on device
Dual camera capture, back camera full-frame with a circular selfie inset
Back · selfie inset
Dual camera capture, front camera primary with the rear scene as a circular inset
Swap · front lead
The gap this fills

As of mid-2026, no Flutter plugin records a composited dual-camera video. The OS APIs can do it, but every Flutter package stops at preview or single-camera capture. This one owns the native compositor and emits one clean file.

Flutter plugin Dual preview Both photos Composited video
camera
camerawesome unmerged
multicamera
dual_cameras
What it does

Two sensors. One composite.
One mental model.

A single GPU compositor drives the preview, the recording, and the photo, so what you see is exactly what gets written.

Simultaneous capture

Front and back cameras at once via CameraX concurrent camera and AVCaptureMultiCamSession.

One GPU composite

Composite once per frame, fan out to encoder + preview + photo. Recorded and previewed pixels can’t drift.

PiP · Circle · Split

Picture-in-picture with a rounded or circular inset, or a clean split. Swap the full-frame lens live.

Live preview = recording

The preview is the same composited texture you record, letterboxed to the real 9:16 output, never stretched.

A/V in sync

Mic audio muxed on one monotonic clock with the video, so lips match across long clips with no post-merge.

Capability-gated

Probes for true concurrency first and degrades to single-camera cleanly, so the fallback is built in, not bolted on.

Tiny API

Five calls to a
composited clip.

One controller, one preview widget, one layout resolver shared across platforms. The hard parts (concurrency, compositing, muxing, A/V sync) stay native and out of your way.

final cam = DualCameraController();
await cam.initialize(
  layout: DualLayout.pictureInPicture(
    primary: CameraLens.back,
    circleInset: true,
  ),
);

// preview == the recorded pixels
DualCameraPreview(cam);

await cam.startRecording();
cam.swapPrimary();              // flip lens, live
final clip  = await cam.stopRecording();  // one .mp4
final photo = await cam.takePhoto();      // one still
Platforms

Built for both, honestly.

Concurrent dual-camera is hardware-gated. The plugin says so up front and handles it.

Android

Android Working alpha

CameraX concurrent → GLES compositor → MediaCodec / MediaMuxer. Verified end-to-end on a Pixel 8: composited .mp4 + photo, in-sync audio, live preview. ≤720p per the concurrent-camera cap.

iOS

iOS Alpha · on device

AVCaptureMultiCamSession → Metal compositor → AVAssetWriter. Running on a real iPhone: live composited dual preview, shader rotate-upright + aspect-cover, rounded/circle PiP, and hardwareCost-gated ≤720p formats. A12+ / iOS 13+. Long-clip A/V-sync verification in progress.

FAQ

Questions, answered.

Can Flutter record from the front and back camera at the same time?

Not with the official camera plugin. Dual Cameras is the open-source Flutter plugin that does it: it owns a native GPU compositor (GLES on Android, Metal on iOS) and writes both feeds into a single composited portrait MP4 and photo.

What is the Dual Cameras Flutter plugin?

Dual Cameras (package dual_cameras) is an open-source Flutter plugin by Roman Slack that records the front and back cameras simultaneously, composited live on the GPU into one portrait MP4 and photo with a real-time preview. It supports picture-in-picture, circle inset, and split layouts on Android and iOS.

Which devices support simultaneous dual-camera recording?

It is hardware-gated. Android needs concurrent-camera support (capped around 720p, e.g. Pixel 6 and newer or Galaxy S22 and newer). iOS needs an A12 chip or newer on iOS 13+ (iPhone XS and newer). The plugin probes for support and falls back to single-camera capture when concurrency is unavailable.

How do I install Dual Cameras?

Run flutter pub add dual_cameras, add camera and microphone permissions in the host app, then use DualCameraController to initialize, preview, record, and take photos.

Is Dual Cameras free and open source?

Yes. Dual Cameras is MIT licensed and open source, built and maintained by Roman Slack.