none
Azure Media Player RTMP Latency RRS feed

  • Question

  • Hi everybody,

    i need to reduce rtmp live streaming latency.

    Now i have about 25-30 seconds of delay, i want to reduce it to 2-3 seconda at most.

    Is it possible, or i have to change development platform?

    I'm streaming with ffmpeg to a media services channel and i play it in a browser tab with media player.

    I think the problem is in the client part, in particular, i think media player has a buffering delay of about 25 seconds.

    Is my supposition right? And in this case, how can i reduce latency buffering in the media player? I'm not worried in case of loading spin appearance, i just need the streaming to be as most synchronous as possible.

    Tuesday, January 19, 2016 6:52 PM

Answers

  • There is some tuning you can do in the player and in your encoding settings.  Reducing the GOP duration to 2 seconds or slightly lower for example.  But you will not be able to get down to 2-3 seconds at this time.  Around 15-20 seconds is the best you can do at this time.

    We are looking into providing lower latency options for Channels in the future. It's on our roadmap - but i can't say when we will release that publicly yet.

    You are correct though that the client is mostly the issue - along with HTTP and the protocols that we use (DASH, HLS).  The iOS device and the HLS protocol is by far the worst, as it has to buffer about 30 seconds in the client at this time.


    Also if you want low latency - vote for it here - http://aka.ms/amsvoice
    Tuesday, February 9, 2016 5:35 PM

All replies

  • Hello Fulvio, 

    This is the Italian MSDN forum and Italian language is obligatory for posting threads. I am not sure what your questions has to do with Azure development but I am moving your thread to the English Forums. 

    Thank You

    Danny


    • Microsoft offre questo servizio gratuitamente, per aiutare gli utenti e aumentare il database dei prodotti e delle tecnologie. Il contenuto fornito “as is“ non comporta alcuna responsabilità da parte dell’azienda.

    Wednesday, January 20, 2016 7:26 AM
    Moderator
  • UP!!!
    Sunday, January 31, 2016 4:07 PM
  • There is some tuning you can do in the player and in your encoding settings.  Reducing the GOP duration to 2 seconds or slightly lower for example.  But you will not be able to get down to 2-3 seconds at this time.  Around 15-20 seconds is the best you can do at this time.

    We are looking into providing lower latency options for Channels in the future. It's on our roadmap - but i can't say when we will release that publicly yet.

    You are correct though that the client is mostly the issue - along with HTTP and the protocols that we use (DASH, HLS).  The iOS device and the HLS protocol is by far the worst, as it has to buffer about 30 seconds in the client at this time.


    Also if you want low latency - vote for it here - http://aka.ms/amsvoice
    Tuesday, February 9, 2016 5:35 PM
  • Hello. I am using AMS to publish a live stream from my Integrated Webcam using FFMPEG with RTMP protocol. While running FFMPEG, I use the command ffmpeg.exe -y -rtbufsize 2100M -loglevel verbose -f dshow -video_size 1280x720 -r 30 -i video="HP HD Webcam":audio="Microphone (High Definition Audio Device)" -strict -2 -c:v libx264 -preset faster -g 60 -keyint_min 60 -vsync cfr -b:v 1500k -maxrate 1500k -minrate 1500k -c:v libx264 -c:a aac -b:a 96k -ar 44100 -f flv rtmp://demolivestream-psganalyticsdemo.channel.mediaservices.windows.net:1935/live/635a48b4eb714956b5ae793267fd8904/MyStream1 I can preview my stream at the Azure Media Player(AMP) but getting a delay of almost 1 minute between my camera stream and the live stream I am seeing there, even with a very good network bandwidth. Am I doing anything wrong, or is there a way to reduce the delay to near real-time or with a few seconds delay. Thanks
    Thursday, June 22, 2017 9:43 AM
  • Your -rtbufsize 2100M is very high. It will add additional latency. However, even you tune it as John mentioned earlier currently you can not go below 20 seconds. We don't support near realtime at the moment. We are considering to add low latency support in future.

    Cenk

     
    Wednesday, July 19, 2017 8:11 AM
    Moderator
  • Hello.  I am using AMS to publish stream from USB camera using FFMPEG or Gstreamer with RTMP protocol today. It still has 20-25 second of delay on preview. Is there any way to reduce delay time to below 10 second?

    Here is the command I used to publish

    ffmpeg -i /dev/video0 -vcodec libx264 -strict -2 -c:a aac -b:a 128k -ar 44100 -r 30 -g 60 -keyint_min 60 -b:v 400000 -c:v libx264 -preset medium -bufsize 400k -maxrate 400k -f flv "rtmp://test26480-viamedia-aase.channel.media.azure.net:1935/live/stream2"

    Thank you.

    Friday, April 19, 2019 9:50 AM
  • If you are using the V3 API and a Live Event with the Low Latency setting enabled you should be able to get between 8-12s depending on the client configuration you are using. 

    See the article here for details - https://docs.microsoft.com/en-us/azure/media-services/latest/live-event-latency

    Note, that you can also play with smaller GOP sizes of 1 second (-keyint_min 30 -g 30) to get lower latencies. 

    Make sure to test with the Azure Media Player and the Heuristics profile set to the Low Latency setting as stated in the article. 

    Pass through will be lower latency than a live transcoding channel as well. 

     
    Friday, April 19, 2019 11:33 PM