Results 1 to 9 of 9

Thread: Minimizing HLS latency

  1. #1
    Join Date
    May 2013
    Posts
    4

    Default Minimizing HLS latency

    I've read several of the existing forum posts regarding this issue, and I've tried the things listed in this tutorial: http://www.wowza.com/forums/content.php?88

    When using JWPlayer in Chrome and iOS (safari natively), we are still seeing 25-30 seconds of latency (we hope to get <5 secs). *I have verified that ffmpeg is outputting an I-frame every second using Elecard StreamEye.* Here is my ffmpeg command:

    ffmpeg -i rtsp://<IP>/<stream> -an -vcodec libx264 -b:v 256k -x264opts keyint=10:min-keyint=10 -preset:v fast -profile:v baseline -level 30 -f flv rtmp://127.0.0.1/camera/live
    Note: The stream is 10 fps (hence keyint=10). I am *not* seeing any errors about "Fragment duration greater than suggested range..." after increasing the I-frame rate.

    I am using the latest ffmpeg and x264 code (built today 5.22.2013). My Wowza version is 3.5.2.

    Here's the relevant part of my Application.xml:

     <LiveStreamPacketizer>
           <Property>
                 <Name>cupertinoChunkDurationTarget</Name>
                 <Value>2000</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                 <Name>cupertinoMaxChunkCount</Name>
                 <Value>10</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                 <Name>cupertinoPlaylistChunkCount</Name>
                 <Value>3</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                <Name>cupertinoRepeaterChunkCount</Name>
                <Value>3</Value>
                <Type>Integer</Type>
           </Property>
     </LiveStreamPacketizer>
    I have also set Streams/StreamType to "live-lowlatency".

    I have restarted the server and the ffmpeg stream after each change made to the configuration.

    After all these changes, I'm still seeing the browser request a single TS segment every 10 seconds, and the video is behind "live" by ~30 seconds.

    Any help would be appreciated.
    -Tom

  2. #2

    Default

    Hi there,

    Can you start Wowza and download the chunklist with a url like this:
    http://[wowza_ip]:1935/vod/sample.mp4/chunklist.m3u8

    Then open this file and let us know what you see.

    Here is an example of what the file looks like:
    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:13
    #EXT-X-MEDIA-SEQUENCE:1
    #EXTINF:11.25,
    media_1.ts?wowzasessionid=89255007
    #EXTINF:11.25,
    media_2.ts?wowzasessionid=89255007
    #EXTINF:11.25,
    media_3.ts?wowzasessionid=89255007
    #EXTINF:11.25,
    media_4.ts?wowzasessionid=89255007
    #EXTINF:10.208,
    media_5.ts?wowzasessionid=89255007
    #EXTINF:12.334,
    media_6.ts?wowzasessionid=89255007
    #EXTINF:11.75,
    media_7.ts?wowzasessionid=89255007
    #EXTINF:10.458,
    media_8.ts?wowzasessionid=89255007
    #EXTINF:12.917,
    media_9.ts?wowzasessionid=89255007
    #EXTINF:10.0,
    media_10.ts?wowzasessionid=89255007
    #EXTINF:10.791,
    media_11.ts?wowzasessionid=89255007
    #EXTINF:10.917,
    media_12.ts?wowzasessionid=89255007
    #EXTINF:11.25,
    media_13.ts?wowzasessionid=89255007
    #EXTINF:10.375,
    media_14.ts?wowzasessionid=89255007
    #EXTINF:10.042,
    media_15.ts?wowzasessionid=89255007
    #EXTINF:10.083,
    media_16.ts?wowzasessionid=89255007
    #EXTINF:9.833,
    media_17.ts?wowzasessionid=89255007
    #EXTINF:9.75,
    media_18.ts?wowzasessionid=89255007
    #EXTINF:10.209,
    Can you supply your findings from the file so we can take a look at them?

    Salvadore

  3. #3
    Join Date
    May 2013
    Posts
    4

    Default

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-TARGETDURATION:13
    #EXT-X-MEDIA-SEQUENCE:1
    #EXTINF:11.25,
    media_1.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_2.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_3.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_4.ts?wowzasessionid=2076576926
    #EXTINF:10.208,
    media_5.ts?wowzasessionid=2076576926
    #EXTINF:12.334,
    media_6.ts?wowzasessionid=2076576926
    #EXTINF:11.75,
    media_7.ts?wowzasessionid=2076576926
    #EXTINF:10.458,
    media_8.ts?wowzasessionid=2076576926
    #EXTINF:12.917,
    media_9.ts?wowzasessionid=2076576926
    #EXTINF:10.0,
    media_10.ts?wowzasessionid=2076576926
    #EXTINF:10.791,
    media_11.ts?wowzasessionid=2076576926
    #EXTINF:10.917,
    media_12.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_13.ts?wowzasessionid=2076576926
    #EXTINF:10.375,
    media_14.ts?wowzasessionid=2076576926
    #EXTINF:10.042,
    media_15.ts?wowzasessionid=2076576926
    #EXTINF:10.083,
    media_16.ts?wowzasessionid=2076576926
    #EXTINF:9.833,
    media_17.ts?wowzasessionid=2076576926
    #EXTINF:9.75,
    media_18.ts?wowzasessionid=2076576926
    #EXTINF:10.209,
    media_19.ts?wowzasessionid=2076576926
    #EXTINF:11.625,
    media_20.ts?wowzasessionid=2076576926
    #EXTINF:12.375,
    media_21.ts?wowzasessionid=2076576926
    #EXTINF:10.041,
    media_22.ts?wowzasessionid=2076576926
    #EXTINF:10.792,
    media_23.ts?wowzasessionid=2076576926
    #EXTINF:10.417,
    media_24.ts?wowzasessionid=2076576926
    #EXTINF:12.5,
    media_25.ts?wowzasessionid=2076576926
    #EXTINF:11.041,
    media_26.ts?wowzasessionid=2076576926
    #EXTINF:10.459,
    media_27.ts?wowzasessionid=2076576926
    #EXTINF:10.041,
    media_28.ts?wowzasessionid=2076576926
    #EXTINF:12.0,
    media_29.ts?wowzasessionid=2076576926
    #EXTINF:10.25,
    media_30.ts?wowzasessionid=2076576926
    #EXTINF:12.292,
    media_31.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_32.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_33.ts?wowzasessionid=2076576926
    #EXTINF:10.458,
    media_34.ts?wowzasessionid=2076576926
    #EXTINF:12.209,
    media_35.ts?wowzasessionid=2076576926
    #EXTINF:9.583,
    media_36.ts?wowzasessionid=2076576926
    #EXTINF:9.833,
    media_37.ts?wowzasessionid=2076576926
    #EXTINF:11.542,
    media_38.ts?wowzasessionid=2076576926
    #EXTINF:10.542,
    media_39.ts?wowzasessionid=2076576926
    #EXTINF:12.875,
    media_40.ts?wowzasessionid=2076576926
    #EXTINF:12.458,
    media_41.ts?wowzasessionid=2076576926
    #EXTINF:10.125,
    media_42.ts?wowzasessionid=2076576926
    #EXTINF:11.0,
    media_43.ts?wowzasessionid=2076576926
    #EXTINF:10.958,
    media_44.ts?wowzasessionid=2076576926
    #EXTINF:9.959,
    media_45.ts?wowzasessionid=2076576926
    #EXTINF:11.125,
    media_46.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_47.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_48.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_49.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_50.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_51.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_52.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_53.ts?wowzasessionid=2076576926
    #EXTINF:11.25,
    media_54.ts?wowzasessionid=2076576926
    #EXTINF:1.541,
    media_55.ts?wowzasessionid=2076576926
    #EXT-X-ENDLIST

  4. #4

    Default

    Hi Tom, are you sure you are looking at your live stream? or are you looking at the sample.mp4 stream.

    The url I provided was just a sample url, your url should be http://[wowza-ip]:1935/your-live-stream/chunklist.m3u8

    I am only asking because the two chunklist look identical.

    Salvadore

  5. #5
    Join Date
    May 2013
    Posts
    4

    Default

    Haha... yeah, I just used your URL. Here's the manifest from my live stream:

    #EXTM3U
    #EXT-X-VERSION:3
    #EXT-X-ALLOW-CACHE:NO
    #EXT-X-TARGETDURATION:10
    #EXT-X-MEDIA-SEQUENCE:1
    #EXTINF:10.0,
    media_1.ts?wowzasessionid=1033911122
    #EXTINF:10.0,
    media_2.ts?wowzasessionid=1033911122
    #EXTINF:10.0,
    media_3.ts?wowzasessionid=1033911122

  6. #6

    Default

    Tom, sorry for the confusion.

    The chunklist is showing that your chunks are 10 seconds long, which indicates either your application is miss configured and the default values are being used or your assumptions about fps and gop length is incorrect.

    Please restart Wowza, then start the stream, let it run for a minute, then zip up and send the /conf folder and the current access log showing the restart and your test to support@wowza.com

    Salvadore

  7. #7
    Join Date
    Jun 2011
    Posts
    1,037

    Default

    The Chunk properties need to be within the LiveStreamPacketizer/Properties container.
    However, it looks like your Properties container is missing from LiveStreamPacketizer.

    So needs to look like this:

     <LiveStreamPacketizer>
        <Properties>
           <Property>
                 <Name>cupertinoChunkDurationTarget</Name>
                 <Value>2000</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                 <Name>cupertinoMaxChunkCount</Name>
                 <Value>10</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                 <Name>cupertinoPlaylistChunkCount</Name>
                 <Value>3</Value>
                 <Type>Integer</Type>
           </Property>
           <Property>
                <Name>cupertinoRepeaterChunkCount</Name>
                <Value>3</Value>
                <Type>Integer</Type>
           </Property>
       </Properties>
     </LiveStreamPacketizer>

  8. #8
    Join Date
    May 2013
    Posts
    4

    Default

    [RESOLVED]

    Thanks!

  9. #9

    Default

    Good catch Daren, sorry I missed this one guys, it was staring me right in the face.

    Glad you got this sorted out Tom.

    Salvadore

Similar Threads

  1. Is it possible to know the latency between client and server for HLS?
    By PerryASD in forum Live Streaming and Encoders
    Replies: 2
    Last Post: 10-13-2014, 11:19 AM
  2. I want to use hls streaming on windows phone 8 using hls sdk.Please help
    By srk2k14 in forum Wowza Streaming Engine functionality
    Replies: 1
    Last Post: 07-11-2014, 06:07 AM
  3. Anyway to reduce upto 5 secs latency in HLS
    By smallerik in forum Live Streaming and Encoders
    Replies: 1
    Last Post: 05-15-2014, 04:11 PM
  4. Anyway to reduce upto 5 secs latency in HLS
    By smallerik in forum General Forum
    Replies: 1
    Last Post: 05-14-2014, 06:09 AM
  5. Wowza/CloudFront Live HLS Startup Time and Latency
    By Daniel6 in forum Wowza Media Server 3 for Amazon EC2 Discussion
    Replies: 3
    Last Post: 10-16-2013, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •