QuickBlox视频聊天质量

时间:2013-11-21 03:04:52

标签: ios quickblox

我们有一个使用QuickBlox视频聊天的iOS项目。基于他们给出的示例应用程序,我们能够成功实现它。当我们测试它时,质量看起来有点糟糕。有谁知道如何提高视频聊天的质量?

感谢。

1 个答案:

答案 0 :(得分:2)

您可以通过在videoChatConfiguration中设置kQBVideoChatFrameQualityPreset来更改视频质量,

    NSMutableDictionary *videoChatConfiguration = [[QBSettings videoChatConfiguration] mutableCopy];
    [videoChatConfiguration setObject:@20 forKey:kQBVideoChatCallTimeout];
    [videoChatConfiguration setObject:@10 forKey:kQBVideoChatVideoFramesPerSecond];
    // config video quality here
    [videoChatConfiguration setObject:AVCaptureSessionPresetMedium forKey:kQBVideoChatFrameQualityPreset];
    [QBSettings setVideoChatConfiguration:videoChatConfiguration];

可用选项:

//achieve high quality video and audio output.defaultvalue.
AVF_EXPORT NSString *const AVCaptureSessionPresetHigh NS_AVAILABLE(10_7, 4_0);
//achieve output video and audio bitrates suitable for sharing over WiFi.
AVF_EXPORT NSString *const AVCaptureSessionPresetMedium NS_AVAILABLE(10_7, 4_0);
//achieve output video and audio bitrates suitable for sharing over 3G.
AVF_EXPORT NSString *const AVCaptureSessionPresetLow NS_AVAILABLE(10_7, 4_0);