Help - Video Call Low quality, Low Performance. Calls Freeze. Jitter Problems and Low Framerate

Explanation:

My Video calls are suffering bad performance, freezing, delay and jitter. I have attached 2 files of Audio and Video data from a 5 minute video call. This uses stun.l.google.com:19302 stun server.

Data:

Notice the framerate = 9 at certain points and drops lower sometimes ( 3-5 fps for > 30 seconds ). Each datapoint was recorded every 10 seconds.

  [
    { timestamp: 1593832587553 },
    { googFirsSent: '0' },
    { googCodecName: 'VP9' },
    { googPlisSent: '0' },
    { googFrameHeightReceived: '320' },
    { googJitterBufferMs: '89' },
    { googInterframeDelayMax: '302' },
    { googTrackId: '9fb6208c-db3d-43fc-84f5-c639b9acd469' },
    { packetsReceived: '28875' },
    { googCaptureStartNtpTimeMs: '3802820918669' },
    { googFrameRateOutput: '9' },
    { googTargetDelayMs: '2338' },
    { googFrameRateDecoded: '12' },
    { googFrameRateReceived: '15' },
    { googDecodeMs: '4' },
    { googMinPlayoutDelayMs: '2338' },
    { googCurrentDelayMs: '2148' },
    { googMaxDecodeMs: '6' },
    { mediaType: 'video' },
    { googRenderDelayMs: '10' },
    { transportId: 'Channel-audio-1' },
    { qpSum: '394946' },
    { googContentType: 'realtime' },
    { googNacksSent: '24' },
    { codecImplementationName: 'libvpx' },
    { framesDecoded: '9355' },
    { ssrc: '1775136387' },
    { bytesReceived: '29067646' },
    { packetsLost: '63' },
    { googFirstFrameReceivedToDecodedMs: '16' },
    { googFrameWidthReceived: '180' },
  ],

I am using Wazo-Platform hosted in AWS on a t2.small EC2 Instance. Following default configuration via docs.

The Back-End uses:

The Front-End uses:

  • React-Native (latest)
  • Wazo-JS-SDK (latest)
  • React-Native-WebRTC (latest)
  • React-Native-Callkeep (latest)

Code:

    Wazo.Phone.on(Wazo.Phone.ON_CALL_ACCEPTED, async (sess: any) => {
      if (isCall || ready) return;
      session.current = sess;
      const sipSession = Wazo.Phone.getCurrentSipSession();

      if (session.current?.cameraEnabled) {
        const { peerConnection } = sipSession.sessionDescriptionHandler;
        const locStreams = peerConnection.getLocalStreams();
        const remStreams = peerConnection.getRemoteStreams();

        const anyTrack = (stream: any) => !!stream.getVideoTracks().length;
        local.current = locStreams.find(anyTrack);
        remote.current = remStreams.find(anyTrack);

        if (!isIOS) {
          RNCallKeep.backToForeground();
        }
        await inCallManager.start({ media: 'video', auto: true });
      } else if (session.current) {
        await inCallManager.start({ media: 'audio', auto: true });
      }

      await sipSession.sendReinvite();
      dispatch({ ready: true });
    });
          {remote.current && isCall && ready && (
            <View style={{ borderColor: 'red', borderWidth: 5, flex: 1 }}>
              <RTCView
                objectFit='cover'
                streamURL={remote.current?.toURL()}
                style={styles.remoteVideo}
                zOrder={15}
              />
            </View>
          )}

Data Files:

Video.js
Audio.js

1 Like