Skip to main content
Known Participant
February 15, 2012
Question

How to reduce the live delay time with hls-live?

  • February 15, 2012
  • 2 replies
  • 9648 views

I'm noticing a 13-16 second delay with live streams to iOS devices. Is there any way to improve this delay time by modifying the Event.xml parameters or the Apache hlshttp_module parameters in httpd.conf?

Thank you for any tips.

    This topic has been closed for replies.

    2 replies

    Participant
    February 17, 2012

    I have the same problem,..the delay around 8~12 seconds,..

    I changed the keyframe frequency to 1 second in Flash Media Live Endcoder's video setting,..

    and the "httpd.conf" config file in "Flash Media Server4.5\Apache2.2\conf",..

    <IfModule hlshttp_module>

    <Location /hls-live>

         xxxxxxxxxxxxx

         HLSMediaFileDuration 2000

    the other config is default,..can't solve this problem,..anyone can help us>??

    Adobe Employee
    February 17, 2012

    Just request the m3u8 from browser and download it.. This is plan text file. Just check that your target duration is set to 2 after the httpd.conf change. If not, you have either not restarted the apache server after the change or Event.xml or Application.xml is overridign this vlaue..

    Regarding delay.. I am not sure you can get better than this on Http streaming.. I hope you read the article and understands why all Http streaming protocols suffers from delay..

    Participant
    February 17, 2012

    Nitin Goel, thanks for your help!

    I have readed your link in previous post, I have a little bit understands why have delay in the http streaming protocols

    But the delay is around ten more second, I think it must  somhavee problem in my setting.

    After I restart the server after change the "httpd.conf" file and check m3u8 's xml, the duration is 0.

    I have find the 2 Event.xml file in "Flash Media Server 4.5" folder

    "sample\application\livepkgr\events\_definst_\liveevent"

         I don't know where is this file's duration setting.

    "Apache2.2\manual\mod"

    <FragmentDuration>4000</FragmentDuration>

    <SegmentDuration>400000</SegmentDuration>

    <DiskManagementDuration>3</DiskManagementDuration>        

    And I find the Application.xml in "application\livepkgr"

    the only 1 setting is

    <Live>

    <AssumeAbsoluteTime>true</AssumeAbsoluteTime>

    </Live>

    Adobe Employee
    February 15, 2012

    Apples HLS spec for client says that client will play the 3rd last segment in the playlist. So you are bound to get the latency of 3*media-file-duration. In FMS, we set media file duration to be 8000 ms (8 sec).. You can try to reduce it to 4000 or 2000 ..in either httpd.conf, or event.xml, application.xml

    However, you may read http://knowfms.wordpress.com/2011/09/22/best-practices-for-setting-ios-media-file-duration/ for knowing the implications (pros-cons) of this..

    bobakbAuthor
    Known Participant
    February 15, 2012

    Great, thanks. I saw the parameter media-file-duration in httpd.conf but I assume this is the same as FragmentDuration in Event.xml, correct?

    Adobe Employee
    February 15, 2012

    No its not same - it needs to same or multiple of FragmentDuration. I think article which Nitin has pointed out in his previous post should help you understand things better,