Make a call with iOS AppRTCDemo with 480x640 resolution

I want to make a smooth video call between iPhone 4s with iOS AppRTCDemo and nexus 4 using android AppRTCDemo. I want a certain quality for videos, basically the higher the better, but 480x640 is great for my needs at the moment.

I have an AppRTCDemo application (from r6783) running on each of the devices (each with an apprtcDemo for its platform).

I am setting limits for local video:

RTCPair *localVideoMaxWidth = [[RTCPair alloc] initWithKey:@"maxWidth" value:@"640"];

RTCPair *localVideoMinWidth = [[RTCPair alloc] initWithKey:@"minWidth" value:@"640"];

RTCPair *localVideoMaxHeight = [[RTCPair alloc] initWithKey:@"maxHeight" value:@"480"];

RTCPair *localVideoMinHeight = [[RTCPair alloc] initWithKey:@"minHeight" value:@"480"];

RTCPair *localVideoMaxFrameRate = [[RTCPair alloc] initWithKey:@"maxFrameRate" value:@"30"];

RTCPair *localVideoMinFrameRate = [[RTCPair alloc] initWithKey:@"minFrameRate" value:@"5"];

RTCPair *localVideoGoogLeakyBucket = [[RTCPair alloc] initWithKey:@"googLeakyBucket" value:@"true"];

RTCMediaConstraints *videoSourceConstraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:@[localVideoMaxHeight, localVideoMaxWidth, localVideoMinHeight, localVideoMinWidth, localVideoMinFrameRate, localVideoMaxFrameRate, localVideoGoogLeakyBucket] optionalConstraints:@[]];

RTCMediaStream *localMediaStream = [self.peerConnectionFactory mediaStreamWithLabel:@"ARDAMS"];

NSString *cameraID = @"Back Camera";

NSAssert(cameraID, @"Unable to get the back camera id");

RTCVideoCapturer *capturer = [RTCVideoCapturer capturerWithDeviceName:cameraID];

self.videoSource = [self.peerConnectionFactory videoSourceWithCapturer:capturer constraints:videoSourceConstraints];

      

set the same limits in android AppRTCDemo for local video source.

here's what's going on:

start the call then i get local video

before the other partner joins the call, the video looks good and smooth (from the local camera).

immediately after joining other peers, then:

when the call starts (both partners are in the call) I get a lot of this message:

Estimated available bandwidth 29 kbps is below configured min bitrate 30 kbps.

      

then

Warning(webrtcvideoengine.cc:1469): webrtc: (send_side_bandwidth_estimation.cc:206): Estimated available bandwidth 29 kbps is below configured min bitrate 30 kbps.

Warning(webrtcvideoengine.cc:1469): webrtc: (send_side_bandwidth_estimation.cc:206): Estimated available bandwidth 29 kbps is below configured min bitrate 30 kbps.

Warning(webrtcvideoengine.cc:1469): webrtc: (send_side_bandwidth_estimation.cc:206): Estimated available bandwidth 29 kbps is below configured min bitrate 30 kbps.

VAdapt Frame: scaled 240 / out 1620 / in 1620 Changes: 2 Input: 480x640 i33333333 Scale: 0.5 Output: 240x320 i33333333 Changed: false

VAdapt CPU Request: keep Steps: 2 Changed: false To: 240x320

VAdapt CPU Request: down Steps: 2 Changed: false To: 240x320

VAdapt Frame: scaled 330 / out 1710 / in 1710 Changes: 2 Input: 480x640 i33333333 Scale: 0.5 Output: 240x320 i33333333 Changed: false

VAdapt CPU Request: keep Steps: 2 Changed: false To: 240x320

VAdapt Frame: scaled 420 / out 1800 / in 1800 Changes: 2 Input: 480x640 i33333333 Scale: 0.5 Output: 240x320 i33333333 Changed: false

VAdapt CPU Request: down Steps: 2 Changed: false To: 240x320

      

when i receive the message: VAdapt CPU Request: keep Steps: 2 Changed: false To: 240x320

then this message: " Estimated available bandwidth 29 kbps is below configured min bitrate 30 kbps

" stops and the resolution is set below (which I think is the intended behavior), but I would like to keep the resolution at 640x480.

after that there are delays in the video stream, but it is strange that it seems that the delays come from the local camera view, the channel from the local camera is displayed with a slight delay, so the video is transmitted from the delay for the other partner and at a lower resolution.

I tried low resolution (320x240) and it works well when set to lower resolution, but low resolution quality is not enough for me.

(I also tested 2 android devices and it seems to work fine there (at 640x480.

what can i do to make the call work smoothly at 640x480 resolution between iphone and android device?

Are there any other limits I could set to make it work correctly?

I read somewhere regarding the leakybucket limitation but it didn't help. (also, I'm not really sure if I put the constraint in the right place)

thank

UPDATE:

after more testing, reducing the maxFrameRate limit to 15 helped "the feed from the local camera is displayed itself with a slight delay". with the new limitation, there is almost no lag and the video quality seems to stay pretty much the same, but the resolution is still set to 320x240.

+3


source to share


1 answer


After a lot of testing and going through a lot of threads on discuss-webrtc, I realized that the iPhone 4s is not "powerful" enough to run a smooth call at 640x480, it seems to generate high CPU speeds and then downsamples. it struggles with 352x288 resolution ...



+3


source







All Articles