From b4347d068df011c629b9648edbd0edb761812ebc Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Thu, 22 Jan 2026 17:27:17 +0100 Subject: [PATCH] add stabilisation camera recorder --- client/src/components/camera-recorder.tsx | 63 ++++++++++++++++++----- ffmpeg-service/main.py | 17 ++++-- 2 files changed, 62 insertions(+), 18 deletions(-) diff --git a/client/src/components/camera-recorder.tsx b/client/src/components/camera-recorder.tsx index 28dadf5..8e539c2 100644 --- a/client/src/components/camera-recorder.tsx +++ b/client/src/components/camera-recorder.tsx @@ -53,11 +53,22 @@ export function CameraRecorder({ onCapture, onCancel }: CameraRecorderProps) { console.log(`📸 Starting camera: ${config.label}, facing: ${facingMode}`); const constraints: MediaStreamConstraints = { - audio: true, + audio: { + echoCancellation: true, + noiseSuppression: true, + }, video: { facingMode: facingMode, width: { ideal: config.width, min: 640 }, height: { ideal: config.height, min: 480 }, + frameRate: { ideal: 30 }, + // @ts-ignore - Advanced constraints for iOS stabilization + advanced: [ + { zoom: 1.0 }, + // Enable video stabilization on supported devices (iOS) + { videoStabilizationMode: 'cinematic' }, + { videoStabilizationMode: 'auto' }, + ] } }; @@ -240,18 +251,23 @@ export function CameraRecorder({ onCapture, onCancel }: CameraRecorderProps) {
-
- {isRecording ? formatTime(timer) : (resolutionInfo || 'Camera')} -
- {!isRecording && ( - + + {quality.toUpperCase()} + + {resolutionInfo || QUALITY_CONFIGS[quality].label} + + )}
+ ))} + + )} + + {/* Record button */} {isRecording ? (