Closed Bug 872887 Opened 11 years ago Closed 9 years ago

[B2G][WebRTC] video encoding rate control

Categories

(Core :: WebRTC: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: u459114, Unassigned)

References

Details

(Whiteboard: [WebRTC][blocking-webrtc-][b2g-webrtc+])

On mobile , capture device send captured frame into media pipeline at 30 FPS.
On low end device, it take too much CPU usage to encode frame at 30FPS. By slow down encoding frame rate, we can share more CPU bandwidth for audio/ video decoding  in real-time communication.

Possile solutions are 
1. From capture device: lower down capture rate to N FPS.(N is configurable in pref)
2. From media pipeline: only process one frame in N second. (N is configurable in pref)
Summary: [B2G] video encoding rate control → [B2G][WebRTC] video encoding rate control
The way it *should* work is: (roughly)

1a) the system detects overload trying to encode too-many/too-large frames, OR
1b) the bandwidth controls detect insufficient bandwidth to send the current streams

2) Adaptation code reduces the target framerate and/or resolution

3) This information is fed back up the MediaStream to the video source

4) a new video FPS/resolution for capture is selected and the source device/driver is reset


Note that the rules for such a function need to avoid oscillations, and allow increases in fps/resolution if things change for the better.

The GIPS code can down-scale the video and drop frames to achieve a target FPS/size, but it's far preferable to have the source device do that.

We currently have prefs for default size and FPS (and minFPS).  Those should be set to nominal values for each platform until we have dynamic adjustment.  See media.navigator.video.* in all.js/etc.
Blocks: 861050
Whiteboard: [WebRTC][blocking-webrtc-][b2g-webrtc+]
We landed load adaptation some time ago, including for b2g
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.