Skip navigation
Currently Being Moderated

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

Feb 14, 2012 5:00 PM

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.

 
Replies
  • Currently Being Moderated
    Feb 14, 2012 11:24 PM   in reply to bobakb

    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..

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 15, 2012 10:23 AM   in reply to bobakb

    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,

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2012 7:39 PM   in reply to bobakb

    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>??

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2012 8:29 PM   in reply to lamfungjerry

    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..

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 16, 2012 10:19 PM   in reply to Nitin Goel

    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>

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 19, 2012 10:37 PM   in reply to lamfungjerry

    In httpd.conf , you can edit HLSMediaFileDuration .. it is specified in milliseconds

     

    <Location /hls-live>

        HLSHttpStreamingEnabled true

        HttpStreamingLiveEventPath "../applications"

        HttpStreamingContentPath "../applications"

        HLSMediaFileDuration 8000

        HLSSlidingWindowLength 6

        HLSFmsDirPath ".."

        HLSM3U8MaxAge 2

        HLSTSSegmentMaxAge -1

        Options -Indexes FollowSymLinks

    </Location>

     

    In Event.xml

     

    You can add

     

    <Recording>

    </Recording>

    <HLS>

           <MediaFileDuration>2000</MediaFileDuration>

    </HLS>

     

    <HLS> tag has to be sibling tag of the <Recording>

     

    Same applies to Application.xml

     

    Read Application-level and event-level configurations for live HLS @ http://help.adobe.com/en_US/flashmediaserver/devguide/WSeb6b7485f9649b f23d103e5512e08f3a338-8000.html#WS8c0554f47ab8e40d-323660bc131f49feddc -7fff

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2012 12:23 PM   in reply to Nitin Goel

    Am I correct in assuming that Event.xml overrides Application.xml and httpd.conf, and Application.xml overrides httpd.conf?  Then httpd.conf values are used if they are not specified in the Application or event?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2012 9:55 AM   in reply to BrandonMX84

    Yes you are right in your assumptions.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points