# RTMP -\> Wowza -\> HLS | ABR Segments are drifting apart from one another

**URL:** <https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001>\
**Category:** Wowza Streaming Engine\
**Created:** [May 23, 2011, 8:56am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001 "2011-05-23T08:56:04Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 23, 2011, 8:56am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/1 "2011-05-23T08:56:04Z")

</div>

I have Flash Media Encoder Live setup to send 3 streams from the same source to Wowza. Wowza is then transmuxing this RTMP stream into HLS segments. However after about 48 hours the playlists of the 3 streams start to drift apart on what segment in the playlist they are on. I am currently using playlists with 8 ten second segments. This is problematic because when playing ABR HLS the player will try to switch to a higher/lower bitrate and if the segments are out of order it will error.

I have been running Wowza for about 6 months and have just started seeing this issue. We are currently sending the most streams we have ever used, but the server doesn’t seem to be bogged down.

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 24, 2011, 12:49am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/2 "2011-05-24T00:49:57Z")

</div>

Is this a Roku issue?

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 24, 2011, 1:30pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/3 "2011-05-24T13:30:05Z")

</div>

What version of Wowza are you using? What is the video source in FMLE?

If you stop then restart the stream is the problem resolved or the same?

Have you set this up?:

[https://www.wowza.com/docs/how-to-debug-encoder-multi-bitrate-keyframe-alignment](https://www.wowza.com/docs/how-to-debug-encoder-multi-bitrate-keyframe-alignment)

Roku is involved tho, right. I am assuming from your helpful [response here](https://www.wowza.com/forums/showthread.php?13460-HLS-Live-Streaming-problem-on-3.0-Beta-Roku-Player-and-EC2-WOWZA&p=67841&highlight=#post67841).

There seems to be a correlation (from your report) between this problem and increased amount of streaming, which might not be straining Wowza but may be straining the network, the connection between encoder and Wowza.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 26, 2011, 12:48pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/4 "2011-05-26T12:48:26Z")

</div>

(support note: continues in ticket 11412)

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [October 5, 2012, 5:11pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/5 "2012-10-05T17:11:28Z")

</div>

Is there any problem with playback that you can see?

Richard

---

<div class="post-metadata">

**Author:** ![Ian\_Beyer](https://avatars.discourse-cdn.com/v4/letter/i/e99b99/32.png) [@Ian\_Beyer](https://community.wowza.com/u/Ian_Beyer)\
**Post date:** [May 25, 2011, 6:53am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/6 "2011-05-25T06:53:03Z")

</div>

Thanks for the update - I’m seeing similar problems with Roku using Decklink/Kulabyte. I’ll test on latest and see if it’s fixed any.

---

<div class="post-metadata">

**Author:** ![Vels\_L](https://avatars.discourse-cdn.com/v4/letter/v/4af34b/32.png) [@Vels\_L](https://community.wowza.com/u/Vels_L)\
**Post date:** [December 13, 2011, 6:34pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/7 "2011-12-13T18:34:03Z")

</div>

Robert,

Any resolutions on this issue ?

We also see audio/video sync issues (not often, but they happen) when playing streams on Roku.

RTMP streaming of the same streams is fine.

---

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 24, 2011, 8:10am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/8 "2011-05-24T08:10:36Z")

</div>

No. The segments coming out of the wowza server are the issue. The segments in the playlists should be aligned.

---

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 24, 2011, 8:42am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/9 "2011-05-24T08:42:03Z")

</div>

2.2.3 build26454

The video source is a BlackMagic card - component in. If I restart the segments will align but after a few hours will start to drift apart. When i first noticed it a few days had gone by and the one stream was over 2000 behind.

I will look into setting that up.

Yes the end device is a Roku, but I am also testing in quicktime.

Good point on the network traffic between the encoders and wowza server.

I will set that up and get back to this thread also after I take a look at the network traffic.

---

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 24, 2011, 11:10am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/10 "2011-05-24T11:10:19Z")

</div>

2011-05-24 12:08:52 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/4-2]: dts:9949985 pts:19900004 - - - 3305.152 - -

2011-05-24 12:08:52 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/4-1]: dts:9950019 pts:19900071 - - - 3305.202 - -

2011-05-24 12:08:52 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/4-3]: dts:9949985 pts:19900004 - - - 3305.202 - -

2011-05-24 12:08:52 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/4-2]: dts:9950019 pts:19900071 - - - 3305.203 - -

2011-05-24 12:08:52 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/4-3]: dts:9950019 pts:19900071 - - - 3305.203

Does this indicate a problem or is this just a margin of error in the logger?

---

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 24, 2011, 1:36pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/11 "2011-05-24T13:36:24Z")

</div>

After upgrading to the newest Wowza version and have been running for a couple hours everything is looking good. Will update with any progress tomorrow.

---

<div class="post-metadata">

**Author:** ![Brooke\_McKim](https://avatars.discourse-cdn.com/v4/letter/b/53a042/32.png) [@Brooke\_McKim](https://community.wowza.com/u/Brooke_McKim)\
**Post date:** [May 25, 2011, 8:05am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/12 "2011-05-25T08:05:15Z")

</div>

Came in this morning to find that the segments have drifted apart again.

2011-05-25 09:03:06 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/1-1]: dts:79286953 pts:91465076 - - - 78558.937 - -

2011-05-25 09:03:06 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/1-2]: dts:79286953 pts:91465076 - - - 78558.938 - -

2011-05-25 09:03:06 EDT comment server INFO 200 - Key frame[lomalinda/_definst_/1-3]: dts:79286953 pts:91465076 - - - 78558.938

That looks correct, however:

1-1

> #EXTM3U
> 
> #EXT-X-ALLOW-CACHE:NO
> 
> #EXT-X-TARGETDURATION:10
> 
> #EXT-X-MEDIA-SEQUENCE:15542
> 
> #EXTINF:5,
> 
> media\_15542.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15543.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15544.ts?wowzasessionid=1194417792
> 
> #EXTINF:2,
> 
> media\_15545.ts?wowzasessionid=1194417792
> 
> #EXTINF:7,
> 
> media\_15546.ts?wowzasessionid=1194417792
> 
> #EXTINF:4,
> 
> media\_15547.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15548.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15549.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15550.ts?wowzasessionid=1194417792
> 
> #EXTINF:5,
> 
> media\_15551.ts?wowzasessionid=1194417792

1-2

> #EXTM3U
> 
> #EXT-X-ALLOW-CACHE:NO
> 
> #EXT-X-TARGETDURATION:10
> 
> #EXT-X-MEDIA-SEQUENCE:15529
> 
> #EXTINF:5,
> 
> media\_15529.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15530.ts?wowzasessionid=1406374313
> 
> #EXTINF:2,
> 
> media\_15531.ts?wowzasessionid=1406374313
> 
> #EXTINF:7,
> 
> media\_15532.ts?wowzasessionid=1406374313
> 
> #EXTINF:4,
> 
> media\_15533.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15534.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15535.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15536.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15537.ts?wowzasessionid=1406374313
> 
> #EXTINF:5,
> 
> media\_15538.ts?wowzasessionid=1406374313

1-3 was the same as 1-2

---

<div class="post-metadata">

**Author:** ![Brian\_Osborne](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Brian\_Osborne](https://community.wowza.com/u/Brian_Osborne)\
**Post date:** [October 4, 2012, 4:35pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/13 "2012-10-04T16:35:39Z")

</div>

This lets you view segment drift of HLS streams: [https://github.com/brookemckim/hlspider](https://github.com/brookemckim/hlspider)

I’m seeing this issue on Wowza 3 (the latest). Restarting wowza fixes the issue temporarily. Here is how bad it has become:

— Unaligned with segments : 48751, 48746, 48744 —

Are there any settings or anything I can try to fix the issue, or maybe diagnose what’s going on? If we can, we’d like to avoid transcoding.

---

<div class="post-metadata">

**Author:** ![Brian\_Osborne](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Brian\_Osborne](https://community.wowza.com/u/Brian_Osborne)\
**Post date:** [October 5, 2012, 8:50am UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/14 "2012-10-05T08:50:02Z")

</div>

Okay, even worse this morning.

— Unaligned with segments : 2178, 1980, 2092 —

The strange thing is, that if I play back any of the individual segments that claim to be lined up, like 2178, 1980, and 2092, they are indeed all showing the same source segments. Here’s the result of curling each of the sub playlists that are out of sync:

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:1990
#EXTINF:10,
media-b2564000_1990.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1991.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1992.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1993.ts?wowzasessionid=1049865870
#EXTINF:11,
media-b2564000_1994.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1995.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1996.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1997.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1998.ts?wowzasessionid=1049865870
#EXTINF:10,
media-b2564000_1999.ts?wowzasessionid=1049865870

```

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:2102
#EXTINF:10,
media-b1064000_2102.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2103.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2104.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2105.ts?wowzasessionid=171596872
#EXTINF:11,
media-b1064000_2106.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2107.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2108.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2109.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2110.ts?wowzasessionid=171596872
#EXTINF:10,
media-b1064000_2111.ts?wowzasessionid=171596872

```

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:2188
#EXTINF:10,
media-b464000_2188.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2189.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2190.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2191.ts?wowzasessionid=748396612
#EXTINF:11,
media-b464000_2192.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2193.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2194.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2195.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2196.ts?wowzasessionid=748396612
#EXTINF:10,
media-b464000_2197.ts?wowzasessionid=748396612

```

These are the three different sub-playlists.

media-b2564000\_1990.ts

media-b1064000\_2102.ts

media-b464000\_2188.ts

are all the same content. How is this possible? The master playlist plays out fine in Quicktime, but it doesn’t seem like it should.

---

<div class="post-metadata">

**Author:** ![Brian\_Osborne](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Brian\_Osborne](https://community.wowza.com/u/Brian_Osborne)\
**Post date:** [October 5, 2012, 12:18pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/15 "2012-10-05T12:18:18Z")

</div>

No there is not any that I can see. I’m trying to get it on a player that will switch its bitrate, so I can test if the switching works or not. I can’t imagine it would based on the EXT-X-MEDIA-SEQUENCE number in each of the playlists

---

<div class="post-metadata">

**Author:** ![Brian\_Osborne](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Brian\_Osborne](https://community.wowza.com/u/Brian_Osborne)\
**Post date:** [October 23, 2012, 3:08pm UTC](https://community.wowza.com/t/rtmp-wowza-hls-abr-segments-are-drifting-apart-from-one-another/36001/16 "2012-10-23T15:08:39Z")

</div>

I tried adding the chunkBreakOnPTS value as described here: [https://www.wowza.com/docs/how-to-debug-encoder-multi-bitrate-keyframe-alignment](https://www.wowza.com/docs/how-to-debug-encoder-multi-bitrate-keyframe-alignment)

After running for about 10 hours, there’s now a drift on one of the three playlists by 4 segments.

Any other ideas?
