# Wowza not sending NetStream.Play.Transition on stream switch

**URL:** <https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641>\
**Category:** Wowza Streaming Engine\
**Tags:** media-players-and-devices\
**Created:** [September 11, 2014, 6:25pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641 "2014-09-11T18:25:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [September 11, 2014, 6:25pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/1 "2014-09-11T18:25:42Z")

</div>

Hi ,

I am trying to play dynamic rtmp live stream via a smil file. I am using StrobeMediaPlayer for playing the smil file. smil file is hosted externally on our webserver.

I am publishing the stream to origin application (rtmp://[ip:1935]/origin) and trying to play the stream from edge application.

smil file looks like this

```auto
<smil title="SMIL file for live streaming">
        <head>
                <meta base="rtmp://[ip]:1935/Edge/_definst_"/>
        </head>
        <body>
               <switch>
                
              
	                <video src="mp4:myStream_360p" system-bitrate="534000">
	                        <param name="audioBitrate" value="64000" valuetype="data"/>
	                        <param name="videoBitrate" value="470000" valuetype="data"/>
	                        <param name="videoCodecId" value="avc1.66.21" valuetype="data"/>
	                        <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/>
	                </video>
	                <video src="mp4:myStream_240p" system-bitrate="272000" >
	                        <param name="audioBitrate" value="32000" valuetype="data"/>
	                        <param name="videoBitrate" value="240000" valuetype="data"/>
	                        <param name="videoCodecId" value="avc1.66.21" valuetype="data"/>
	                        <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/>
	                </video>
	                <video src="mp4:myStream_160p" system-bitrate="136000" >
	                        <param name="audioBitrate" value="16000" valuetype="data"/>
	                        <param name="videoBitrate" value="120000" valuetype="data"/>
	                        <param name="videoCodecId" value="avc1.66.21" valuetype="data"/>
	                        <param name="audioCodecId" value="mp4a.40.2" valuetype="data"/>
	                </video>
        </switch>
        </body>
</smil>

```

When the player starts it plays the myStream\_360p as expected . But when it tries to go to a lower bandwidth it calls netstream.play2(lower\_index) and expects wowza to return back NetStream.Play.Transition , which never happens. hence player is stuck playing only one stream.

I also noticed that when i try to play the stream from origin app the wowza is returning the NetStream.Play.Transition and switch is happening properly.

Any ideas why this might be happening ?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [September 15, 2014, 6:45am UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/2 "2014-09-15T06:45:12Z")

</div>

Hi there.

Please take a look at this guide:

[How to create and play SMIL files with streams created by Wowza Transcoder](https://www.wowza.com/docs/how-to-create-and-play-smil-files-with-streams-created-by-wowza-transcoder)

As ngrp do not get forwarded to the edge, the idea is that with this tool you can create a SMIL from using the medialist tool on the origin and create a file that you host in the content folder on the edge.

I hope this helps.

Salvadore

---

<div class="post-metadata">

**Author:** ![Andras\_Kovacs1](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Andras\_Kovacs1](https://community.wowza.com/u/Andras_Kovacs1)\
**Post date:** [February 16, 2015, 2:45pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/3 "2015-02-16T14:45:28Z")

</div>

Actually, I am experiencing the very same issue with Wowza 3.6.4 working in RTMP live repeater mode, when changing simply from one quality to the other, NetStream.Play.TransitionComplete is never sent. None of the above advice resolve this.

Any idea if this was fixed in later releases?

Thanks.

---

<div class="post-metadata">

**Author:** ![Andras\_Kovacs1](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Andras\_Kovacs1](https://community.wowza.com/u/Andras_Kovacs1)\
**Post date:** [February 27, 2015, 11:13am UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/4 "2015-02-27T11:13:12Z")

</div>

No, I am using an own developed Flash player. After debugging, it is clear that the event is not coming from Wowza edge.

---

<div class="post-metadata">

**Author:** ![Andras\_Kovacs1](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Andras\_Kovacs1](https://community.wowza.com/u/Andras_Kovacs1)\
**Post date:** [February 27, 2015, 12:00pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/5 "2015-02-27T12:00:03Z")

</div>

Thanks a lot. Then the same can be expected with latest (v4) Wowza versions I guess. I tried to set up an Nginx based RTMP reflector, and it worked without a problem.

---

<div class="post-metadata">

**Author:** ![Andras\_Kovacs1](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@Andras\_Kovacs1](https://community.wowza.com/u/Andras_Kovacs1)\
**Post date:** [February 27, 2015, 12:08pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/6 "2015-02-27T12:08:22Z")

</div>

What you suggest with Adobe HDS and Apple HLS?

---

<div class="post-metadata">

**Author:** ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)\
**Post date:** [September 16, 2014, 8:33am UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/7 "2014-09-16T08:33:42Z")

</div>

Hi Gaurav, I am sorry I missed this detail in your original post.

RTMP does not support server-side .smil files.

There is a convenience method for JW Player found here:

[How to use JW Player with adaptive bitrate streaming from Wowza Streaming Engine](https://www.wowza.com/docs/how-to-use-jw-player-with-adaptive-bitrate-streaming-from-wowza-streaming-engine)

You may find this guide helpful as well:

[How to lock multi-bitrate streams on live stream repeater edge](https://www.wowza.com/docs/how-to-lock-multi-bitrate-streams-on-live-stream-repeater-edge)

Thank you.

Salvadore

---

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [September 16, 2014, 6:49pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/8 "2014-09-16T18:49:49Z")

</div>

Hi Salvadore,

I am able to create proper smil file. if i place the above mentioned smil file in content directory of my edge node the stream is working as expected for HTTP streaming protocols(HDS, HLS etc) . But i am trying to use rtmp to play the stream (because of lower latency) . So assuming the correct smil file is present in content directory for my edge node what is the stream url i should use for playing the stream using rtmp (adaptive bitrate).

-Gaurav

---

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [September 16, 2014, 8:36pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/9 "2014-09-16T20:36:31Z")

</div>

Hi Salvadore,

I was trying to follow jwplayer example but only with a osmf player which have capabilty to parse and play smil file .

http://[wowza-ip-address]:1935/vod/smil:sample.smil/jwplayer.smil

if this url just produces a smil file then i assume in theory i can host a equivalent smil file on my webserver with the change that ip in tag pointing to a wowza edge server and my player should work properly. But issue here is when my player parses the smil file it starts playing the stream which appears first in the list. When player tries to switch to a lower bitrate stream it tries to do a handshake(expects NetStream.Play.Transition) with wowza server which does not happen.

However when i put origin server ip in head tag of smil file , this functionality works as expected with proper handshaking and switching.

I dont know which module of wowza is responsible to do the handshake and is it possible to override its code to do what i am trying to do.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [February 16, 2015, 7:56pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/10 "2015-02-16T19:56:30Z")

</div>

Are you using jwplayer ?

If yes then the issue is not with wowza but with jwplayer’s implementation of dynamic rtmp. in case of rtmp playback jwplayer simply determines clients bandwidth at start of playback and chooses appropriate rendition of stream , afterwards for the whole session it sticks to the same rendition. therefore it never calls play2() .

[http://support.jwplayer.com/customer/portal/questions/9902698-stream-switching-without-play2-](http://support.jwplayer.com/customer/portal/questions/9902698-stream-switching-without-play2-)

---

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [February 27, 2015, 3:52pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/11 "2015-02-27T15:52:58Z")

</div>

If you are trying to play streams from edge servers then this can happen since edge server doesnt know what streams are available on origin.

You will need to call FCSubscribe method from your video player code for “holding” streams on edge servers.

nc.call(“FCSubscribe”, null, “live\_1”);

nc.call(“FCSubscribe”, null, “live\_2”);

nc.call(“FCSubscribe”, null, “live\_3”);

where live\_1 live\_2 and live\_3 are three renditions of streams with diff bitrates.

---

<div class="post-metadata">

**Author:** ![Gaurav\_Mishra1](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Gaurav\_Mishra1](https://community.wowza.com/u/Gaurav_Mishra1)\
**Post date:** [February 27, 2015, 4:54pm UTC](https://community.wowza.com/t/wowza-not-sending-netstream-play-transition-on-stream-switch/43641/12 "2015-02-27T16:54:52Z")

</div>

Yes, I am using wowza v4.x and i had to do FCSubscribe thing to get it working. For nginx it works without calling FCSubscribe methods.
