Switch to ad stream on server side

Hi,

I want to play ads whenever broadcaster of a live stream stops video feed (taking a break) . schedules of these breaks in video feed will not be pre decided it will depend on the broadcaster wheather he wants to take a break or not. Lets say broadcaster is sending a stream to stream called “myStream” and he stops the feed for a while, for this duration i want to replace the contents of stream “myStream” with some static videos(ads) . I want to do this switch on server side ie clients doesnt need to know that something has changed on backend they will continue to play video from “myStream” . I imagine my solution will have a listener like thing which will monitor the incoming livefeed and if it detects the feed has stopped it will switch the content of that stream. is there any existing modules which i can start looking at for this use case ?

Good day and welcome to the Wowza support forum.

You can do intermittent insertion, like tv advertisement using the Stream class or the IPublishingProvider API. Here are some examples:

How to do scheduled streaming with Stream class streams (server listener)

How to dynamically control Stream class streams

How to switch streams using Stream class streams

How to use IPublishingProvider API to publish server-side live streams

I hope this helps.

Salvadore

Hi,

Yes, that stream will get transcoded if the transcoder is enabled (and your application is configured to use the default template or you have a specific template for the stream).

The examples that Salvadore pointed to show how to switch the sources using a flash client however, if you look at the java source code for each one, you will see how each of the methods are called and you can then call them using your own process. For the ones that are part of the Module Collection, the source code is available as part of the collection download.

Also look at the API documentation for the other methods that can be used with the Stream class.

Roger.

Good day and welcome to the Wowza support forum.

You can do intermittent insertion, like tv advertisement using the Stream class or the IPublishingProvider API. Here are some examples:

How to do scheduled streaming with Stream class streams (server listener)

How to dynamically control Stream class streams

How to switch streams using Stream class streams

How to use IPublishingProvider API to publish server-side live streams

I hope this helps.

Salvadore

Hi Salvadore

playlist switching using stream class seems to be best fit for my use case. I will go ahead with that. I had some more questions.

Stream stream = Stream.createInstance(appInstance, “Stream1”);

i get that the above line of code will produce a stream called Stream1. If my wowza has transcoder running will this “Stream1” stream be transcoded without any extra code to multiple streams (according to my transrate.xml settings) ?

Also is there a way to switch streams without any need to be called from client. In the above examples flash client needs to call some method on backend to do the switch. Is there a way to monitor a stream and do a switch when a stream is switched off by broadcaster.