Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

RTMP increasing latency


Hello,

I am using JW Player for RTMP live streams served by Wowza Streaming Engine.

I have the exact same problem like others in this forum, the increasing latency on client side watching the stream, caused by buffer fill on client side.
It looks like that there's no solution for this problem, except a workaround like stopping and starting the player on a defined buffer, mentioned in this thread: https://support.jwplayer.com/customer/portal/questions/11523634-rtmp-latency-recovery

Iam not sure how to implement such a solution in a player embed code.
Would be great if someone has an example code for me.

Thank you.

Regards,
Andreas.

3 Community Answers

Todd

JW Player Support Agent  
0 rated :

Hi Andreas,

I do not fully understand what you are trying to do here. Can you provide a link to a reproduction page and explain the steps to reproduce this problem?

We honestly do not see many questions about RTMP any more and our engineers are no longer adding new functionality for RTMP streams. All of our engineering efforts are focused on HLS and DASH for streaming, as these formats do not require Flash.

Kind regards,
Todd

mail

User  
0 rated :

Hello Todd,

it's the same problem described in this post:
https://support.jwplayer.com/customer/portal/questions/11523634-rtmp-latency-recovery

RTMP-Buffering in JW Player increases over time no matter what you have set in embed code. It looks like that there's no solution for this problem, except to stop and start the RTMP-Stream in JW Player again after some bufferfill to reset the buffer state.

I just wanted to ask if you can help me to create an embed code to to achieve that.

We have the need for a low latency stream ( max. 2 sec.), so HLS is unfortunately not an option. :(

Thank you,
Regards,
Andreas.

Todd

JW Player Support Agent  
0 rated :

We cannot guarantee any sort of timeliness for live streaming. In addition to buffering, the amount of processing required for transcoding will inherently add another few seconds on top of that. Sub-two seconds is a pretty lofty goal for any live stream.

Anyway, here is some sample code:


//Defines the maximum amount of acceptable buffer lag
var maxBuffer = //put a number here;

jwplayer().on('meta', function(event){
  var rtmpBufferFill = event.metadata.bufferfill;
  if(rtmpBufferFill >= maxBuffer){
    //pausing and playing should reinitialize the stream
      jwplayer().pause();
      jwplayer().play();
  }
});

The RTMP stream should be providing bufferfill information. Basically, after watching for a while, the viewer will get further from the live position. This should check if the buffer gets too big, pause the player, and start again, ensuring that the viewer never exceeds 8 seconds of lag. (In theory)

This question has received the maximum number of answers.