We have a webrtc android application working properly, we are using Kurento as media server and it's sending video at 24 fps; however, the incoming video stream in the android app presents a sort of periodic lag, as if the first 15 frames of a second were processed and played smoothly but then the following 15 were skipped, so we end up with a video that plays smoothly for a few milliseconds but then pauses for a few milliseconds too.
I guess the incoming video framerate is too large for the android device to process so it skips some of the frames and then continues when the buffer is free again. I'm getting the following output in the logcat (which I've googled but found no answer to my problem) saying key frame required first:
12-28 20:12:27.857 19648-19769/mx.blacklabs.parallax E/org.webrtc.Logging: HardwareVideoDecoder: decode() - key frame required first
12-28 20:12:27.858 19648-19796/mx.blacklabs.parallax E/org.webrtc.Logging: HardwareVideoDecoder: decode() - key frame required first
12-28 20:12:27.858 19648-19769/mx.blacklabs.parallax E/org.webrtc.Logging: HardwareVideoDecoder: decode() - key frame required first
I get that same error message in chunks with milliseconds of difference so it looks like it is related to my problem.
What I've tried
-Using maxFrameRate
MediaConstraint
as shown here but that seemed to have no effect. Besides, that seems to be intended for the localMediaStream while we're trying to decrease the remoteMediaStream instead.
Observations
The android device we're using is Moverio BT-300 which runs on android 5.1.1. I'm using the following webrtc implementation org.webrtc:google-webrtc:1.0.22672
Constraints reduce the frameRate on the video source, i.e. the outgoing frame rate. To reduce the incoming frame rate, have the other side reduce the outgoing frame rate, e.g. by telling it to via out-of-band signaling (if you control both ends).