WebRTC doesn't deal with maxFrameRate constraint correctly on iOS

225 views
Skip to first unread message

ChengNing

unread,
May 30, 2016, 11:45:16 AM5/30/16
to discuss-webrtc
WebRTC doesn't deal with maxFrameRate constraint correctly on iOS

I meet the same problem  Issue 4668

I create video source with a media constraint which maxFrameRate set 15 fps,
but, video input frame rate and encode frame rate is 30 fps,

and i try the rtc_video_capture_ios_objc_mm.patch, the problem is still

how can i solve it

thanks a lots

Damien Fétis

unread,
May 31, 2016, 9:22:14 AM5/31/16
to discuss...@googlegroups.com
Hello,
it seems that media constraints are not working on native WebRTP implementation (IOS and Android).
Frame rate and resolution contraints shoud be set with native video capture  API.

For exemple on IOS you can set framerate with :
AVCaptureDevice *device  = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
[device lockForConfiguration:nil];
[device setActiveVideoMinFrameDuration:CMTimeMake(1, fps)];
[device setActiveVideoMaxFrameDuration:CMTimeMake(1, fps)];
[device unlockForConfiguration];
Best regards,

Damien.

--

---
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/562fef8b-824a-4293-a337-68c5107d8b91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

成宁

unread,
Jun 1, 2016, 2:54:17 AM6/1/16
to discuss...@googlegroups.com
Hi,Damien
Thanks for your reply, and thanks for you code that perfetc, I solved the issue.

--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/CRPefY-n9so/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/CAEbx72aKkSonzehG1ovFM9rLOynXXgnYuUiz5ipAjjei32jCsw%40mail.gmail.com.

Scott Baar

unread,
Jul 23, 2016, 4:54:32 PM7/23/16
to discuss-webrtc
The above worked great, just be aware that I had to add this code after giving the AVCaptureDevice to the RTCVideoCapturer.
Reply all
Reply to author
Forward
0 new messages