From a51f56d15a9f942c9ef8173f36a9ae0d4ad81cf4 Mon Sep 17 00:00:00 2001 From: Zoff Date: Thu, 21 Sep 2017 16:51:55 +0200 Subject: [PATCH] tweak VP8 video codec settings for 3g connections --- toxcore/toxav/video.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toxcore/toxav/video.m b/toxcore/toxav/video.m index c84e89f..b817089 100644 --- a/toxcore/toxav/video.m +++ b/toxcore/toxav/video.m @@ -84,8 +84,9 @@ #endif cfg.g_lag_in_frames = 0; cfg.kf_min_dist = 0; - cfg.kf_max_dist = 48; - cfg.kf_mode = VPX_KF_AUTO; + cfg.kf_max_dist = 10; /* a full frame every 10 frames minimum (can be more often, codec decides automatically) */ + cfg.kf_mode = VPX_KF_AUTO; /* Encoder determines optimal placement automatically */ + cfg.rc_end_usage = VPX_CQ; /* Constrained Quality (CQ) mode -> give codec a hint that we may be on low bandwidth connection */ rc = vpx_codec_enc_init(vc->encoder, VIDEO_CODEC_ENCODER_INTERFACE, &cfg, 0);