Framerate drops down using iOS hardware H.264

783 views
Skip to first unread message

Ray Wang

unread,
Mar 1, 2016, 10:50:26 PM3/1/16
to discuss-webrtc
Hi:

I am developing iOS apps based on webrtc, i set the framerate of videotoolbox encoder explicitly to 15.0, however, at the very beginning sendframerate came out to be 30.0.
and after a while, sendframerate drops down dramatically to about 1.0 ~ 5.0, and there is no packet loss or cpu overuse, the rtt is also very low.

I guess  most of the captured frames was dropped in the frame dropper module.
could anyone help to elaborate how frame dropper works and  a brief description of the frame rate control algorithm of Webrtc?

Ray Wang

unread,
Mar 9, 2016, 4:08:42 AM3/9/16
to discuss-webrtc
Hello, anybody have an idea?
According to logs, frame dropper drops most I420 frames when explicitly using iOS hardware encoder.

在 2016年3月2日星期三 UTC+8上午11:50:26,Ray Wang写道:

Zeke Chin

unread,
Mar 9, 2016, 5:59:44 PM3/9/16
to discuss-webrtc, Peter Boström
See:
Peter knows more about that than I do.

What's likely happening is that the encoder is outputting a much higher bitrate than what we expected from it. This causes us to drop frames because we think we've saturated the bandwidth allocation. I made a change recently that adapts the bitrate set on the encoder - is this not working for you?


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/44a023fc-7e40-4706-96c5-c4b0abceecfb%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ray Wang

unread,
Mar 10, 2016, 4:58:18 AM3/10/16
to discuss-webrtc, pb...@webrtc.org
No, i merged your latest commit, the problem still exists.
But, framerate behaves different on different devices.
I tested between two device, one is iPhone 5C, iOS 9.2; another is iPhone 6, iOS 8.4;
the resolution is 360*640, and target bitrate is 512Kbps.
the framerate running on iPhone 5C will drop down from 30 fps to about 2~5 fps after a moment. and the output bitrate is actually above 512Kbps mostly.
however iPhone 6 was running at 30fps consistently, and output bitrate is below 512Kbps mostly. 
both of two device use Videotoolbox.

and besides, although iPhone 6 can run at 30 fps consistently, the rendering image quality is not so good, i think it's because framerate at 30 fps is too high,
but changing framerate to 15 fps does not take any effect on Videotoolbox(even explicitly set videotoolbox property).

在 2016年3月10日星期四 UTC+8上午6:59:44,Zeke Chin写道:

Zeke Chin

unread,
Mar 10, 2016, 3:30:16 PM3/10/16
to discuss-webrtc, Peter Boström
I opened crbug/webrtc/5650. I'll look into it once I get a 5C device.

Ray Wang

unread,
Mar 11, 2016, 5:12:57 AM3/11/16
to discuss-webrtc, pb...@webrtc.org
Thanks, Zeke

在 2016年3月11日星期五 UTC+8上午4:30:16,Zeke Chin写道:
Reply all
Reply to author
Forward
0 new messages