• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Video lag on WebRTC Kurento for Android

(https://github.com/IhorKlimov/Andro...exaville/androidwebrtc/app_rtc_sample/web_rtc)

We are observing video lag when recording mobile screen session through WebRTC Kurento API for Android and need to improve video quality.

Need help to get rid of video lag.

Mobile Screen capture recording code is as below,

private void startScreenCapture() {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {

MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getApplication().getSystemService(Context.MEDIA_PROJECTION_SERVICE);

startActivityForResult(mediaProjectionManager.createScreenCaptureIntent(), CAPTURE_PERMISSION_REQUEST_CODE);

}

}


Below mentioned "ScreenCapturerAndroid" is WebRTC class which enables recording,

private VideoCapturer createScreenCapturer() {
if (mediaProjectionPermissionResultCode != Activity.RESULT_OK) {
return null;
}

VideoCapturer videoCapturer = null;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
videoCapturer = new ScreenCapturerAndroid(mediaProjectionPermissionResultData, new MediaProjection.Callback() {

@override
public void onStop() {
Logger.d(TAG, "User revoked permission to capture the screen.");
}
});
}

if (videoCapturer != null) {
return videoCapturer;
}

return null;
}



Please note, from class "PeerConnectionParameters", we did set/modify few parameters like, "videoWidth", "videoHeight", "videoFps", "videoBitrate".

Observed after modifying mentioned parameters, recorded video freezes.
 
Back
Top Bottom