# Auto switching between two stream sources

**URL:** <https://community.wowza.com/t/auto-switching-between-two-stream-sources/37784>\
**Category:** Wowza Streaming Engine\
**Created:** [December 7, 2011, 5:08pm UTC](https://community.wowza.com/t/auto-switching-between-two-stream-sources/37784 "2011-12-07T17:08:23Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Tom\_Tom](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Tom\_Tom](https://community.wowza.com/u/Tom_Tom)\
**Post date:** [February 1, 2013, 1:54pm UTC](https://community.wowza.com/t/auto-switching-between-two-stream-sources/37784/7 "2013-02-01T13:54:32Z")

</div>

> There is nothing built-in like that. You could monitor a stream and switch. Wrap the streams in a Stream class stream like this:
> 
> [Switch streams using Stream class streams](https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams)
> 
> And monitor the source something like this:
> 
> [Module examples for Wowza Streaming Engine](https://www.wowza.com/docs/how-to-use-imediastreamactionnotify2-to-monitor-live-streams-modulestreamwatchdog)
> 
> Then you can do switch when you detect a problem.
> 
> Richard

Hi Richard,

I’ve done a setup with some of the results which your forum gaves me. I’ve posted something. Have you any idea or hint for me?😕

> [@Live Stream Repeat from different Applications](http://community.wowza.com/t/-/35622):
>
> Hi! I’ve the following setup On my Origin exists 3 applications application one just contains 2 .stream files containing in it accessible content folder : First .streamFile : rtmp://sameorigin:1935/two/definst/stream100 Second .streamFile : rtmp://sameorigin:1935/three/definst/stream200 application two gets its own livestream from the Adobe FME pointed to the stream /stream100 application three gets its own livestream from the Adobe FME, too. Pointed to the stream /stream200 I’ve writ…

The main problem seems to be that the Wowza Application can’t connect via .stream File to another stream. But if I use the

content 1:1 from the .stream file as a streamname… it works.

From the example here : [Set up origin/edge delivery for Wowza Streaming Engine](https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater)

–snip–

```auto
RTMP
To play the stream in Adobe Flash Player, double-click [install-dir]/examples/LiveVideoStreaming/FlashRTMPPlayer/player.html, enter the information below, and then click the Connect button.
Server: rtmp://[wowza-edge-address]:1935/liveedge
Stream: rtmp://[wowza-origin-address]:1935/liveorigin/_definst_/[stream-name]
Where [wowza-edge-address] is the IP address of an edge server running Wowza Media Server, [wowza-origin-address] is the IP address of the origin server running Wowza Media Server, and [stream-name] is the name of the live stream being sent to the origin server.
Note: You can substitute the name of a .stream file on the origin server in place of the complex URL in Stream. For more information, see Using simple stream names.

```

–snip–

I always get via .stream file the following : **LiveMediaStreamReceiver.connect: failure**

---

_[View the full topic](https://community.wowza.com/t/auto-switching-between-two-stream-sources/37784)._
