Kinesis Video Streams with WebRTC stops displaying new frames after a certain point when using TURN

3

I am working on a project that requires sending very large video (about 400kb per frame) at 1fps in as close to real time as possible from a server to one or more web clients. I was able to modify the C SDK sample to send the video with an acceptable latency but am running into a strange issue specifically when using TURN;

After 181 frames the video feed stops displaying new frames.

  • According to nettop the viewer is still receiving the new frames, as the bytes-in continues to rise at the same rate until either the viewer or server is stopped, but the web browser stops displaying them. This was tested with both Google Chrome and Firefox, on both the JS SDK sample and the AWS console video viewer with the same result.
  • The number of frames it displays is not affected by the frame rate, length of the video, or elapsed time. However it does seem to be affected by the size of the frames. If I use a more compressed version of the video (approx. 150kb per frame) the number changes from 181 frames to 505 frames. It does not stop at a consistent total size though, the 181 frame test totals 74.4Mb and the 505 frame test totals 83Mb.
  • This isn't an issue of going over the 5Mbps TURN server quota either, as I am only hitting at most 3Mbps.
  • Disabling NAT traversal and just running the test localhost to localhost causes the issue to disappear, and I am unable to find a consistent setup to test this with STUN.
  • I get no error messages from either end in these tests
  • The videos are h.264 encoded using ffmpeg (CRF 15 ultrafast, 4:2:0) with no audio

I am at a bit of a loss as to how to even debug this issue further. Can anyone provide either a suggestion as to why this might be happening, or other steps I can take to further diagnose this issue?

Edit:

More context. Here is some webrtc-internals data from a different run that got 300 frames in: Pictured: frames received / decoded (in red) vs bytes in (in blue) In this graph frames received / decoded is the red and bytes received is the blue line, you can see that the channel is still receiving data, it just stops decoding it.

and here: Pictured: frames received / decoded (in red) vs packets received (in yellow) vs TOTAL packets lost (in purple) In this graph frames received / decoded is the red, packets received is the yellow line and total packets lost is the purple line. The number of lost packets does not increase significantly after the point the video stops.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions