Multi-camera streaming from mobile device

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Multi-camera streaming from mobile device
Complex
from 2 weeks to 3 months
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Multi-Camera Streaming from Mobile Device

Simultaneous capture from front and main camera — a task that became technically feasible on iOS with AVCaptureMultiCamSession in iOS 13. Before that any "multi-camera" stream was simulation: switching with delay or pre-recorded second source. Now on iPhone XS and newer can capture both streams simultaneously — with limitations below.

Architectural Limits You Need to Know First

AVCaptureMultiCamSession not supported on all devices. Before initialization mandatory check:

guard AVCaptureMultiCamSession.isMultiCamSupported else {
    // fallback to AVCaptureSession with one camera
    return
}

With active multi-cam session max resolution per camera reduced — on iPhone 13 Pro max 1920×1440 from main and 1280×960 from front simultaneously. Attempting 4K on both causes AVCaptureSessionRuntimeErrorNotification with AVError.outOfMemory code. Production — fix 1280×720 for both, sufficient for stream.

Thermal regime. Simultaneous dual ISP (Image Signal Processor) and GPU composition heat device quickly. On iPhone 12 mini at 30-minute dual-camera stream thermal throttling triggers, system forces framerate down to 20fps. Solution — monitor ProcessInfo.ThermalState, on .serious switch to one camera.

Android with Camera2 API: simultaneous capture supported via CameraManager.getCameraCharacteristics + LOGICAL_MULTI_CAMERA or explicitly opening two physical cameras. Practically support depends on OEM — Samsung Galaxy S22+ delivers two streams, budget Xiaomi may return ERROR_CAMERA_IN_USE. Before release mandatory testing on target device pool.

How We Build Pipeline

On iOS scheme: AVCaptureMultiCamSession → two AVCaptureDeviceInput → two AVCaptureVideoDataOutputMetal compositor → VideoToolbox encoder → RTMP/SRT.

Key moment — composition. Two video streams can't directly feed one encoder. Need to mix frames via MTKView or CIFilter. Use Metal with custom shader: main camera full-frame, front rendered as PiP-rectangle in corner.

// Get CMSampleBuffer from each camera in different queues
let backQueue = DispatchQueue(label: "back.camera")
let frontQueue = DispatchQueue(label: "front.camera")

backOutput.setSampleBufferDelegate(self, queue: backQueue)
frontOutput.setSampleBufferDelegate(self, queue: frontQueue)

// Synchronize via AVCaptureDataOutputSynchronizer
let synchronizer = AVCaptureDataOutputSynchronizer(
    dataOutputs: [backOutput, frontOutput]
)
synchronizer.setDelegate(self, queue: syncQueue)

AVCaptureDataOutputSynchronizer — mandatory element. Without it frames from two cameras arrive desynchronized up to 33ms (one frame at 30fps), PiP window shows "jitter" relative to main stream.

For SRT broadcasting (more stable alternative to RTMP on mobile) — use libsrt compiled for iOS/Android or HaishinKit 2.x with built-in SRT support.

Managing PiP Position During Stream

Make PiP position draggable via UIPanGestureRecognizer with snap-to-corners via animation. Save coordinates in UserDefaults — user shouldn't reposition each time.

On orientation change Metal shader gets new PiP coordinates automatically via CADisplayLink recalculating layout each frame.

Common Mistakes

  • Don't add AVCaptureMultiCamSession to background modes (UIBackgroundModes: audio) — on app suspend iOS kills session after 30 seconds
  • Ignore sessionWasInterrupted on incoming call — need to pause stream and resume on sessionInterruptionEnded
  • Use DispatchQueue.main for CMSampleBuffer processing — decoding and Metal rendering on main thread drops UI by 8–12ms per frame

Timeline

iOS implementation with Metal compositor, PiP, SRT/RTMP streaming, thermal regime tests: 4–6 weeks. Android with Camera2 API — plus 2–3 weeks due to device fragmentation. Cost calculated individually after requirements analysis.