# wowza streaming with banners (ads)

**URL:** <https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825>\
**Category:** Wowza Streaming Engine\
**Created:** [January 4, 2012, 2:33am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825 "2012-01-04T02:33:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 4, 2012, 2:33am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/1 "2012-01-04T02:33:54Z")

</div>

hello all,

how can I run ads every certain time , lets say that i want to run ad video every 10 mins , does wowza support this feature or do I need to do it from the video player , please advice regarding this issue .

thanks,

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [January 4, 2012, 5:14am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/2 "2012-01-04T05:14:59Z")

</div>

Hey ehuman,

Here’s one way: [StreamClass Example with Playlists](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher)

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 10, 2012, 3:37pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/3 "2012-01-10T15:37:56Z")

</div>

This creates a live stream. You can use static content as the source, but it will be a live stream.

VOD = Video On Demand. The scheduler can use static content (video/audio files) but it is not vod.

If you want your users to play a file as vod, then switch to a live stream, this will not do that.

If you want to interrupt a live stream periodically with the content from a static file, this will do that.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 10, 2012, 4:06pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/4 "2012-01-10T16:06:00Z")

</div>

Run Wowza in stand-alone mode (/bin/startup.bat) instead of the service so you can see what is happening: log output in the console. When you start Wowza you should see logging regarding this ServerListener, as Randal mentioned.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 10, 2012, 4:17pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/5 "2012-01-10T16:17:58Z")

</div>

Show the whole /conf/Server.xml file.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 10, 2012, 4:56pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/6 "2012-01-10T16:56:06Z")

</div>

This scheduler example works by the clock not a timer. It could be modified to use a timer, but as it is you would have to create a schedule that switched back and forth every 50 seconds by the clock

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 10, 2012, 5:09pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/7 "2012-01-10T17:09:59Z")

</div>

The included schedule.smil file is the example.

Richard

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [January 4, 2012, 6:04pm UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/8 "2012-01-04T18:04:48Z")

</div>

The module affects the time the ad is played not the position. I don’t quite understand what you mean by page. You mean at the bottom of your web page? You would use HTML to position a flash player there.

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [January 8, 2012, 12:42am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/9 "2012-01-08T00:42:50Z")

</div>

The example I posted shows how to play VOD files at certain times.

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [January 9, 2012, 1:13am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/10 "2012-01-09T01:13:09Z")

</div>

1. See the steps for creating a live application in the beginning of one of the live tutorials, such as: [https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder](https://www.wowza.com/docs/how-to-set-up-live-streaming-using-an-rtmp-based-encoder)

2. You can paste that code into the Wowza IDE. Or you can download a compiled version as mentioned here: “A compiled version of this server listener is included in the Wowza Modules Collection. Download and unzip the collection, then copy /lib/wms-plugin-collection.jar from the package to the Wowza /lib folder. Then restart Wowza.”

3. From the article:

To play open [install-dir]/examples/LiveVideoStreaming/client/live.html

Server: rtmp://[wowza-address]/live

Stream: Stream1 (or Stream2. As set in smil file).

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [January 10, 2012, 4:51am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/11 "2012-01-10T04:51:33Z")

</div>

Look at the module code. You will see several logging messages like: log.info(“ServerListenerStreamPublisher Started.”);

If you don’t see those messages in your Wowza console/logs then it is likely that the module is not being loaded. Check your Server.xml as per the instructions, and restart Wowza.

What is the name of your live app? If you have [Wowza]/conf/live, then set the PublishToApplication like this:

```auto
<Property>
<Name>PublishToApplication</Name>
<Value>live</Value>
</Property>

```

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 4, 2012, 8:10am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/12 "2012-01-04T08:10:40Z")

</div>

thanks for your cooperation, how can i add this ad at the bottom of the page ? , is it in same article ?

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 8, 2012, 1:08am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/13 "2012-01-08T01:08:23Z")

</div>

thanks for your cooperation, how can I run this service on VOD .

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 8, 2012, 3:46am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/14 "2012-01-08T03:46:46Z")

</div>

I have more than one question ,

- regarding this note from the article ( IMPORTANT: this server listener requires that there be an application named “live” where the Streams and Playlists are created. ) , what/ where should i create this

- regarding the first block that contains code starts with ( package com.wowza.wms.plugin.collection.serverlistener; ) where should i use it

- when i finish all the steps in the article , how can I run the playlist ( example : [http://localhost:1935/vod/mp4:sample.mp4/manifest.f4m](http://localhost:1935/vod/mp4:sample.mp4/manifest.f4m) )

your effort is highly appreciated , thanks for you effort 🙂

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 6:43am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/15 "2012-01-10T06:43:03Z")

</div>

sorry for any inconvenience , I tried all the steps but I received the following message:

Failed to play Stream1; stream not found. ( I also used Stream 2 )

please note that I’m trying to implement this service on VOD.

many thanks in advance , thanks for your cooperation.

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 7:31am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/16 "2012-01-10T07:31:01Z")

</div>

sorry to tell you that its still not working , I need to run this service on VOD , so I need to play a movie (VOD) then show ads (another short movies ) after certain time , so why i need to configure the live folder ? , I tried VOD and Live streaming and many of your amazing services and all works great , but i don’t know why i have problem with this case ☹ , please advice , thanks 🙂

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 7:59am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/17 "2012-01-10T07:59:19Z")

</div>

I did all the steps in article again , I noticed the following line in the article .

from the article ( Create at least one stream, then create at least one playlist that plays on that stream. Set repeat to true or false for each playlist. )

I did the code that start with

(

)

so did I create the stream and the playlist ??! , Error message is ( Failed to play stream1; stream not found. )

thanks

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 8:13am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/18 "2012-01-10T08:13:24Z")

</div>

please guys don’t hate me 🙂 , kindly find the logs below

[root@Stream bin]# ./startup.sh

Configure logging: file:///usr/local/WowzaMediaServer/conf/log4j.properties

INFO server server-start Wowza Media Server 3 Trial Edition (Expires: Feb 06, 2012) 3.0.3 build882 -

INFO server comment - Server License Key: SVRT3-XXXXX-XXXXX-XXXXX-XXXXX-T8uPE

INFO server comment - Maximum Connections: Unlimited

INFO server comment - Transcoder Streams Available: Unlimited

INFO server comment - Transcoder Watermark: Yes

INFO server comment - nDVR Available: Yes

INFO server comment - DRM Available: Yes

INFO server comment - Hardware Available Processors: 2

INFO server comment - Hardware Physical Memory: 346MB/1972MB

INFO server comment - Hardware Swap Space: 3926MB/3967MB

INFO server comment - Max File Descriptor Count: 20000

INFO server comment - Open File Descriptor Count: 49

INFO server comment - OS Name: Linux

INFO server comment - OS Version: 2.6.32-220.2.1.el6.x86\_64

INFO server comment - OS Architecture: amd64

INFO server comment - Java Name: OpenJDK 64-Bit Server VM

INFO server comment - Java Vendor: Sun Microsystems Inc.

INFO server comment - Java Version: 1.6.0\_22

INFO server comment - Java VM Version: 20.0-b11

INFO server comment - Java Spec Version: 1.6

INFO server comment - Java Home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86\_64/jre

INFO server comment - Java Max Heap Size: 1066MB

INFO server comment - Java Architecture: 64

INFO server comment - Java Encoding[file.encoding]: UTF-8

INFO server comment - Java Args[0]: -Xmx1200M

INFO server comment - Java Args[1]: -Djava.net.preferIPv4Stack=true

INFO server comment - Java Args[2]: -Dcom.sun.management.jmxremote=true

INFO server comment - Java Args[3]: -Dcom.wowza.wms.runmode=standalone

INFO server comment - Java Args[4]: -Dcom.wowza.wms.native.base=linux

INFO server comment - Java Args[5]: -Dcom.wowza.wms.AppHome=/usr/local/WowzaMediaServer

INFO server comment - Java Args[6]: -Dcom.wowza.wms.ConfigURL=

INFO server comment - Java Args[7]: -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaMediaServer

INFO server comment - Java GC[0]: PS Scavenge

INFO server comment - Java GC[1]: PS MarkSweep

INFO server comment - Server runmode: standalone

INFO server comment - Server native.platform: linux

INFO server comment - Server threads[h/t]: 10/10

INFO server comment - CMDInterface now listening: [any]:8083

INFO vhost vhost-start _defaultVHost_ -

INFO server comment - _defaultVHost_ threads[h/t]:120/80 home:/usr/local/WowzaMediaServer

INFO vhost comment _defaultVHost_ Bind attempt ([any]:1935:4)

INFO vhost comment _defaultVHost_ Bind successful ([any]:1935)

INFO vhost comment _defaultVHost_ Bind attempt ([any]:8086:1)

INFO vhost comment _defaultVHost_ Bind successful ([any]:8086)

INFO server comment - ServerListenerStreamPublisher Started.

INFO server comment - ServerListenerStreamPublisher: VHost or Application failed, not running.

INFO server comment - Wowza Media Server is started!

INFO application app-start _definst_ live/_definst_

INFO session connect-pending 127.0.0.1 -

INFO session connect 127.0.0.1 -

INFO stream create - -

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 8:42am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/19 "2012-01-10T08:42:52Z")

</div>

I read my Server.xml again and I found the problem , thank you so much guys 🙂 , I’m streaming from the a Video ( sample 4 ) , but how can I add ad every 50 sec then get back to the original video ( sample 4 ) ?

I want one video to be the main , and other videos ( ads ) to be shown every certain time.

thank you again and again 🙂

---

<div class="post-metadata">

**Author:** ![Human](https://avatars.discourse-cdn.com/v4/letter/h/3bc359/32.png) [@Human](https://community.wowza.com/u/Human)\
**Post date:** [January 10, 2012, 9:06am UTC](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825/20 "2012-01-10T09:06:08Z")

</div>

I didn’t get your point clearly , do you have any example related to this subject ?

[Next page](https://community.wowza.com/t/wowza-streaming-with-banners-ads/37825.md?page=2)
