# HLS Live switch input

**URL:** https://community.wowza.com/t/hls-live-switch-input/47109
**Category:** Wowza Streaming Engine
**Created:** [September 8, 2016, 4:40am UTC](https://community.wowza.com/t/hls-live-switch-input/47109 "2016-09-08T04:40:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Francesco\_Durighetto](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@Francesco\_Durighetto](https://community.wowza.com/u/Francesco_Durighetto)
#### Post date: [September 8, 2016, 4:40am UTC](https://community.wowza.com/t/hls-live-switch-input/47109/1 "2016-09-08T04:40:53Z")

</div>

Hi guys,

I’m new to wowza and I’m trying to achieve a “simple” scenario.

I have 1 RTSP input (vp8+opus) that will automatically being transcoded in HLS 720p.

Works flawlessly.

At some point, another stream same codec, same format, same properties (also same name if needed) and will also be transcoded in HLS 720p.

I need that this second stream, will transparently to user, replace the first stream as long as I publish it to the server. Then, on unpublish, it have to switch back to the original one.

I’m kinda lost, I already rename the chunks id based on timecode so I can align them, but I cannot find an API to tell wowza to replace the first video chunks with the second one in realtime.

Simple scenario: I publish my webcam stream, then at some point I activate the screenshare. I want to substitute the webcam with screenshare but without change the stream url. the client has to receive the same single video stream (possibly without interruption).

Can you address me over a solution? I read every post in the forum which is related to this but everyone let the client do the switch and everyone use flash. I don’t have flash available and i want to be done automatically by the server.

Thank you guys,

Francesco.

---

<div class="post-metadata">

### Author: ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)
#### Post date: [October 17, 2016, 3:04pm UTC](https://community.wowza.com/t/hls-live-switch-input/47109/2 "2016-10-17T15:04:32Z")

</div>

Hi,

Have you checked out [Stream class streams?](https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams). This can switch sources server-side. There is also the [StreamPublisher](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher%28StreamPublisher%29) which utilizes something similar for scheduling and swapping different sources in the same stream.

Regards,

Paul
