Wanted to provide additional details on this:
We are experiencing poor video quality on a WebRTC-based iOS peer-to-peer video application we've built. Specifically, we're experiencing low resolution and a low and unstable frame rate. We have instrumented our app to measure the rendered resolution and frame rate and it is evident that at the very beginning of a connection a session starts out attempting a respectable 480 x 640 @ 30, but a few seconds into a call the resolution drops to 240 x 320 and the frame rate drops precipitously to single digits. It often freezes at zero for periods of time and jumps around a lot in the single digits, and rarely into low teens. We are using VP8 for the video codec.
Attempted Remediation Steps
We have attempted the following steps in order to try to remedy the symptoms:
- Upgrading WebRTC. We've upgraded from 3.5.5 to 41p, but this has not resolved the issues.
- Tweaking bandwidth estimator. We noticed that the bandwidth estimator was guessing extremely low values for our local network - 20kbps - so we tried hard-coding in more realistic values. This did not help.
- Disabling video_decimator. We noticed that while our capturer was capturing at 30fps, the video_decimator module was dropping most frames resulting in about 7fps encoded. Disabling the decimator resulted in a higher frame rate, albeit at a worse resolution.
About our application and test environment
Our application establishes a 1:1 peer-to-peer video call between users. The users can be either on iOS or the web (Chrome). One user calls another and sees the remote user as well as a small window of their local stream. Both iOS to iOS and iOS to web calls experience the poor video performance. Poor performance is evident when the call is setup directly peer-to-peer, or relayed via TURN.
Our application is based on the 3.5.5 branch of the WebRTC. Upgrading our WebRTC stack to 41p has not made a difference in the perceived symptoms.
The network used does not appear to be a factor. We have attempted calls on a variety of networks in a variety of configurations:
- Both endpoints on the same WiFi network, attempted on several different WiFi networks - both home, corporate, etc.
- Endpoints on different WiFi networks
Additionally, the hardware does not appear to be a factor, as we've tested on a variety of iOS devices (iPhone 5, 5S, 6, 6 Plus, iPad, etc.). The performance is equally poor on both iOS 7 and iOS 8.