# Server Side Transcoded Streams Not Stopping

**URL:** https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903
**Category:** Wowza Streaming Engine
**Created:** [August 29, 2014, 12:46pm UTC](https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903 "2014-08-29T12:46:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jordan\_Hinkle](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@Jordan\_Hinkle](https://community.wowza.com/u/Jordan_Hinkle)
#### Post date: [August 29, 2014, 12:46pm UTC](https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903/1 "2014-08-29T12:46:32Z")

</div>

I have a custom module that creates server side stream using the IPublishingProvider (much like the [example code here](https://www.wowza.com/docs/how-to-use-ipublishingprovider-api-to-publish-server-side-live-streams)). Similarly I am mixing VOD content with Live content using my module and transcoding the mixed stream. I am also using the [ModuleTranscoderControl](https://www.wowza.com/docs/how-to-control-which-streams-get-transcoded-moduletranscodercontrol) addon to ensure that only the mixed stream gets transcoded.

The problem I’m having is that the transcoded stream(s) exist even after the source has been unpublished. If I start sending the live source then the stream is unviewable and the only way to resolve it is to restart the entire application.

Here are the steps to recreate what I’m seeing:

1. Start encoder which publishes stream (myStream) to Wowza

2. Wowza receives myStream and creates a server side stream named myOutputStream

3. myOutputStream is then transrated/transcoded into two versions named myOutputStream\_160 and myOutputStream\_360

4. Stop encoder from publishing myStream

5. Wowza calls onUnPublish for myStream and myOutputStream

6. myOutputStream\_160 and myOutputStream\_360 still listed under “Incoming Streams” in the Engine Manager and show up in the f4m as well.

I’m stopping the ServerPublisherWorker just as they are in the example I linked above and have also tried

```auto
publisher.unPublish();

```

at the bottom of the ServerPublisherClass with no luck either.

Is there some method I’m not aware of to shut down a stream that is sourced from Wowza that also terminates any active transcodes?

---

<div class="post-metadata">

### Author: ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)
#### Post date: [September 2, 2014, 7:29am UTC](https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903/2 "2014-09-02T07:29:39Z")

</div>

You might try the following sequence:

```auto
publisher.unpublish();
publisher.close();

```

---

<div class="post-metadata">

### Author: ![Jordan\_Hinkle](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@Jordan\_Hinkle](https://community.wowza.com/u/Jordan_Hinkle)
#### Post date: [September 3, 2014, 1:36pm UTC](https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903/3 "2014-09-03T13:36:06Z")

</div>

Sorry for the late response, but yes! That did the trick, thanks!

---

<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 3, 2014, 2:48pm UTC](https://community.wowza.com/t/server-side-transcoded-streams-not-stopping/39903/4 "2014-09-03T14:48:40Z")

</div>

Thanks for the update, and glad you got this sorted.

Salvadore
