# Server side switching to a transcoded stream - delay and poor performance

**URL:** <https://community.wowza.com/t/server-side-switching-to-a-transcoded-stream-delay-and-poor-performance/36242>\
**Category:** Wowza Streaming Engine\
**Created:** [September 8, 2016, 7:20am UTC](https://community.wowza.com/t/server-side-switching-to-a-transcoded-stream-delay-and-poor-performance/36242 "2016-09-08T07:20:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eddie\_Hermoso](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@Eddie\_Hermoso](https://community.wowza.com/u/Eddie_Hermoso)\
**Post date:** [September 8, 2016, 7:20am UTC](https://community.wowza.com/t/server-side-switching-to-a-transcoded-stream-delay-and-poor-performance/36242/1 "2016-09-08T07:20:02Z")

</div>

I created a server side switching module that switches live and on-demand streams onto a “master” stream object. Works fine except for when I try to switch to a real-time transcoded version of a stream.

Specifically, I have a webcam stream sending Speex audio so I am transcoding it to AAC codec. When I attempt to switch to the transcoded stream that has the AAC codec, it doesn’t switch right away. It takes up to 2 minutes for it to actually show up on the stream.

Any suggestions on how to resolve this? I need to switch to the AAC version of the stream so that the audio on the recording comes through.

I have the following stream properties set on the server side switching module:

```auto
			stream.setMoveToNextIfLiveStreamMissing(false);
			
			stream.setStartLiveOnPreviousKeyFrame(true);
			
			stream.setUnpublishOnEnd(false);

```

Eddie

---

<div class="post-metadata">

**Author:** ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)\
**Post date:** [November 1, 2016, 3:30pm UTC](https://community.wowza.com/t/server-side-switching-to-a-transcoded-stream-delay-and-poor-performance/36242/2 "2016-11-01T15:30:09Z")

</div>

Hi Eddie,

To clarify, you are switching to the transcoded live stream from a VOD file? If so, what is the codec for the VOD stream? Do you get the same issue when switching to a live stream that is originally encoded with AAC?

Michelle
