[mediacapture-image] Suggestion:Add constraint to disable video stabilization (#310)

fiberflow has just created a new issue for https://github.com/w3c/mediacapture-image:

== Suggestion:Add constraint to disable video stabilization ==
Related issues: 
- https://issues.chromium.org/issues/40822134
- https://issues.chromium.org/issues/351953353

Chrome apply digital video stabilization (e.g., EIS or "Electronic Image Stabilization") by default. While this reduces visible shake, it introduces two critical side effects:
-  FOV Reduction: Stabilization crops the frame to allow for motion compensation, shrinking the usable field of view.
        Example: A sensor with a native 80° FOV might deliver a stabilized 70° FOV.
- Preview/Capture Mismatch: On some devices, stabilization is applied only to the recorded video, not the live preview. This results in a discrepancy between the preview (unstabilized, full FOV) and captured output (stabilized, cropped FOV).

Consequences for Developers:
- AR/Computer Vision: Algorithms relying on precise motion data (e.g., DeviceMotionEvent) are disrupted by stabilization’s artificial adjustments.
- User Experience: Preview latency ("laggy" movement) and FOV changes confuse users expecting WYSIWYG behavior.
- Technical Debt: Apps must work around stabilization via post-processing hacks or platform-specific fixes 

Suggestion:
Add a videoStabilization boolean constraint to MediaTrackConstraints:
``` javascript
// Disable stabilization to align preview/capture FOV and reduce latency  
const stream = await navigator.mediaDevices.getUserMedia({  
  video: {  
    videoStabilization: false, // Opt out of stabilization  
  }  
});  
```


Please view or discuss this issue at https://github.com/w3c/mediacapture-image/issues/310 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 4 February 2025 06:32:51 UTC