# Live and mp4 streaming schedule

**URL:** <https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761>\
**Category:** Wowza Streaming Engine\
**Created:** [July 11, 2012, 11:04pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761 "2012-07-11T23:04:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 11, 2012, 11:04pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/1 "2012-07-11T23:04:44Z")

</div>

Hi,

I have a requirement to have around 50 applications broadcasting live for most of the day, but then at midnight for a few hours for it to play some form of recording (either mp4 or even to display a simple jpg) and then at a later time to return to the live stream. My preferred option would be a tiny jpg file as it will just sit on the users screen instead of a 6 hour video of a black screen with text saying ‘back later…’

I am currently using the type of ‘live’ for the main part but am not sure how I would switch each application to be type ‘none’ (I think) in order to play an mp4 or flv file.

My idea was to have a seperate .stream file somehow to have a url to the mp4 but I cant seem to get that working im thinking because of the ‘live’ stream type. I am happy and have already got working a method using the command line java code to stop and start streams which will enable me to do that if it is needed and cant be done within the server. But to be honest I dont want to have 50 (possibly more in the future) application configurations that I then have to go round to change the type.

What other options do I have to this ?

On a side note the web application uses http streaming to the wowza server using manifest.f4m files if that has any relevance or could help?

---

<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:** [July 11, 2012, 7:08pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/2 "2012-07-11T19:08:23Z")

</div>

Kris,

Take a look at this scheduler example:

[https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher)

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:** [July 12, 2012, 4:32pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/3 "2012-07-12T16:32:49Z")

</div>

What is in /content/closed.smil?

The Scheduler’s schedule.smil is run when Wowza starts. Use the schedule.smil file that is in the example, modify that to your needs.

The stream that you playback, referring to the schedule.smil that is included in the package, is “Stream1” (and “Stream2”)

```auto
<smil>
    <head>
    </head>
    <body>
        <stream name="[B]Stream1[/B]"></stream>
        <stream name="[B]Stream2[/B]"></stream>
...
    

```

You can playback in Wowza example LiveVideoStreaming player:

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

Stream:Stream1

If any of the Playlist items contain MediaCaster streams, as yours will, you have to start those streams using the .stream file names in /conf/StartUpStreams.xml for this to work. Those sources should be available when Wowza starts, though Wowza will keep trying to connect if any are not indefinitely. You do not have to do anything with schedule.smil itself in StartUpStreams.xml, it is just parsed by Wowza on server start to start the streams you define.

For testing, adjust the schedule so the first Playlist you play is scheduled in the past so it starts right away. You can schedule the ad for the near future for testing.

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:** [July 13, 2012, 5:02pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/4 "2012-07-13T17:02:24Z")

</div>

We got off track, that switch.smil is for multi-bitrate streaming. The [scheduler](https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher) uses a file named schedule.smil, you can use that for this. Something like below example. For simplicity there is one stream named “Stream1”, and there are three Playlists. When Wowza starts, the first Playlist will play because the scheduled attribute is in the past. Tomorrow (July 14th) at 00:00:00 (this coming midnight) the 2nd Playlist will play on Stream1, interrupting the camera. The 3rd playlist will play 4 minutes later, but you want to set that to the exact length of the midroll video. The 3rd playlist plays the same live stream (camera1.stream) as was playing before the midroll.

```auto
<smil>
    <head>
    </head>
    <body>
        <stream name="Stream1"></stream>
    
        <playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2009-12-11 16:00:00">
            <video src="camera1.stream" start="-2" length="-1"/>
        </playlist>
        <playlist name="pl2" playOnStream="Stream1" repeat="true" scheduled="2012-07-14 00:00:00">
            <video src="mp4:midroll.mp4" start="0" length="-1"/>
        </playlist>
        <playlist name="pl3" playOnStream="Stream1" repeat="true" scheduled="2012-07-14 00:04:00">
            <video src="camera1.stream" start="-2" length="-1"/>
        </playlist>
    </body>
</smil>

```

This covers 1 day for 1 stream. You can continue this for many days and repeater for each stream. I imagine that will be difficult to manage after awhile; If you setup the schedule for 7 days, it will have to be adjusted and Wowza will have to be re-started after 7 days. But it can be done with this file indefinitely and it is a starting place for integration or other customization to make it more manageable for 50 streams.

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:** [July 13, 2012, 6:55pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/5 "2012-07-13T18:55:34Z")

</div>

Kris,

That is correct for sanjosestreaming to Flash OSMF player, like the Wowza LiveVideoStreaming/clientOSMF example player. Make sure the /conf/live/Application.xml /LiveStreamingPacketizers includes “sanjosestreamingpacketizer”

For Flash RTMP, like the Wowza LiveVideoStreaming/client player it would be:

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

Stream: Stream1

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:** [July 16, 2012, 7:27pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/6 "2012-07-16T19:27:20Z")

</div>

50 incoming live streams is high. You want a late model quad core and 8 - 16 gigs of RAM to handle that many live streams.

You could have a system that set a time only in the playlist, a start date and a number of days to schedule as Property settings in Server.xml. The scheduler source code could be a starting place for 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:** [July 17, 2012, 2:37pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/7 "2012-07-17T14:37:19Z")

</div>

I’m not sure what to add. There are different limitations for incoming streams. You might have to split the load between another server. Try the different GC options, and be sure to try without any special GC as recommended in tuning guide.

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:** [July 17, 2012, 3:06pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/8 "2012-07-17T15:06:54Z")

</div>

You can get some savings by removing any LiveStreamPacketizers that you are not using.

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:** [July 17, 2012, 3:27pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/9 "2012-07-17T15:27:42Z")

</div>

You can modify HTTPStreamer also but I’m not sure that you will get any savings.

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:** [July 17, 2012, 4:53pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/10 "2012-07-17T16:53:41Z")

</div>

The camera stream take up more resources, because it is incoming. But while the mp4 files is playing on the wrapper stream the camera stream will probably still be a running MediaCaster stream, so resource use overall will probably be the same while the mp4 file is playing

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:** [July 17, 2012, 5:43pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/11 "2012-07-17T17:43:11Z")

</div>

We don’t recommend setting heap size over about 8000M

You will have to test to see how well 50 incoming live streams works with the number of subscribe clients you want to support.

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:** [July 18, 2012, 6:53pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/12 "2012-07-18T18:53:13Z")

</div>

That is right. The scheduler streams are live streams and count against the limit of 1 live stream using developer license

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:** [July 12, 2012, 8:43am UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/13 "2012-07-12T08:43:23Z")

</div>

Hi krisisdnbdjmx,

On point for you: The .smil file is opened by the client in the context of a single application. So, stream names, or .stream files mentioned in the .smil will be in relation to that Wowza application. Therefore, if you have 50 .stream files referenced in one smil, all the .stream files would need to be started in stream manager under that one application.

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [July 13, 2012, 1:15pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/14 "2012-07-13T13:15:17Z")

</div>

Hi

Something like this,

```auto
<smil>
	<head>
	</head>
	<body>
		<switch>
			<video src="camera.stream" system-bitrate="200000"/>
			<video src="camera2.stream" system-bitrate="500000"/>
			<video src="camera3.stream" system-bitrate="500000"/>
			<video src="camera4.stream" system-bitrate="500000"/>
			<video src="camera5.stream" system-bitrate="500000"/>
		</switch>
	</body>
</smil>

```

Where camera.stream and camera2.stream are text files in the content folder (alongside the smil) that contain the full url to the camera stream, something like:

```auto
rtmp://[wowza-address]/live/myStream1

```

If you are doing HTTP streaming (Cupertino, Smooth or Sanjose), or the origin stream is a MediaCaster type (e.g., a rtsp stream from an IP camera), then use StreamManager or /conf/StartUpStreams.xml on the edge to start the streams (camera.stream and camera2.stream) with MediaCaster Type “liverepeater”.

Set-up referenced at the bottom of this page,

[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)

Jason

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 3:54pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/15 "2012-07-12T15:54:07Z")

</div>

Thanks I had seen that but was wondering if there was a simpler way or not. If not then I will dig deeper into it ! Thanks for now !

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 4:37pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/16 "2012-07-12T16:37:58Z")

</div>

The instructions for the scheduler are fairly straightforward apart from the terminology…

My current setup I have 50 applications with 50 xxxx.stream files which run on 1 vhost broadcasting to a html page with osmf player streaming over http (not rtmp or rtsp even though they can)

The smil file will have 1 stream in it with a single file set on repeat to somehow last 6 hours (not quite sure how to do that yet)

The Server.xml file has a listener added which waits for a trigger of some sort to do something (hopefully play my smil file) and it has PublishToApplication set to be live (I know its default but want it in there just so I know where it should be if I want to change it in the future)

First question : What connects my smil file to anything (an application, a content/xxxx.stream file, or the server) to make it happen as nowhere have I even told it the name of the smil file?

Second : As I said above in the Server.xml file I have added the property to publish to application live. As I have 50 applications I guess I need to set 50 of these properties to apply to each application?

Third : Once I have worked out what start and length are in the smil file to make it play at midnight on one day I would then want the same to happen every day. Therefore am I right in saying I would need to add 365 playlist chunks in the xml for each day of the year? or is there a way to just say ‘daily’ at a specific time (I want to be like BBC 3 where virtually the same schedule happens every day of the week hahaha)

Maybe my understanding of the logic is wrong if someone can advise?

Thanks !

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 6:49pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/17 "2012-07-12T18:49:13Z")

</div>

I have just cleared my logs and started Wowza with the config below :

The wms-plugin-collection.jar file is in the wowza lib directory

Server.xml :

**com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher**

and…

PublishToApplication

**live**

PassthruMetaData

false

Boolean

conf/live/Application.xml :

**live**

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer\</LiveSt

reamPacketizers\>

content/closed.smil :

more closed.smil

I adjusted the schedule time so it was in the future at the time.

So my regular webcam stream is on application live and through VLC I would normally watch it using this url :

rtsp://:1935/live/camera-live.stream

or to see the http stream i would use [http://www.osmf.org/configurator/fmp/](http://www.osmf.org/configurator/fmp/) and put in url :

http://:1935/live/camera-live.stream/manifest.f4m

and select Are you using HTTP Streaming or Flash Access 2.0? yes

What url would I then use to watch my stream ‘with closed.smil’ through http?

Server.xml … There is just 1 of these files for the Wowza server as I understand and not per application therefore how do I decide which applications will use my smil file schedule and which dont?

Anyway the server starts and i search the error and access logs for my smil file but it is not there suggesting it doesnt know to read it (because nowhere apart from creating the smil file itself) is it referenced.

Do I need to use streammanager / StartupStreams.xml to connect the smil file to the application? or continue as I am to use StartupStreams.xml to connect the camera-live.stream to the application live ?

Last thing (for now) thats bugging me is for the last point about linking the smil file to the application… if the smil file is started in streammanager or StartupStreams.xml then presumably that means my normal camera-live.stream also needs to be in there somewhere to make it play most of the time?

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 7:37pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/18 "2012-07-12T19:37:52Z")

</div>

Just found following post :

rrlanham - 03-01-2011, 10:30 PM

This type playlist is involved with scheduler example, which is a server listener. It has to be named streamschedule.smil and be located in the content folder

So i have renamed my smil file but see this in my logs :

[root@srv001 logs]# grep streamschedule wowzamediaserver\_access.log

2012-07-12 18:22:51 GET comment server INFO 200 - ServerListenerStreamPublisher: Could not find playlist file: /usr/local/WowzaMediaServer/content/streamschedule.smil - - - 6.62 - - - - - – - - - - - - - - - - - - - - - - - -

[root@srv001 logs]# ls -l /usr/local/WowzaMediaServer/content/streamschedule.smil

-rw-r–r-- 1 root root 274 Jul 12 15:56 /usr/local/WowzaMediaServer/content/streamschedule.smil

Im still looking around to see if there are any other posts that can help me understand the process but any advice appreciated !!

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 7:54pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/19 "2012-07-12T19:54:33Z")

</div>

rrlanham - 09-29-2011, 12:50 AM

What are you trying to do?

This one schedule.smil file could be used to define and schedule many sets of streams to be used in any number of multi-bitrate smil files. **The scheduler is limited to one application** , but as many streams as you want to schedule.

Richard

Dont think this is going to be what I need as I have 50 applications (possibly more in the future) where I would want all of them to start playing the mp4 file at midnight. Is there any other way or am in interpreting the above message wrong?

---

<div class="post-metadata">

**Author:** ![Malcolm\_Taylor](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Malcolm\_Taylor](https://community.wowza.com/u/Malcolm_Taylor)\
**Post date:** [July 12, 2012, 8:55pm UTC](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761/20 "2012-07-12T20:55:08Z")

</div>

closed.smil contains this (now renamed to streamschedule.smil) as per your other post so it gets picked up :

Also I have had a thought after a previous post said ‘only 1 application can have a schedule’… currently I have 50 applications and 50 .stream files all set to auto start using StartupStreams.xml, but I have now tried manually and i can have 1 application with all 50 .stream files attached to it which I didnt know before which (apart from a lot of code changes my end to change how I have it all set up from an administration point of view) means this should be possible in the 1 ‘live’ application. That sound about right?

I dont understand your point ‘The stream that you playback, referring to the schedule.smil that is included in the package, is “Stream1” (and “Stream2”)’ - Package? I am ok with the basics of the smil file I think apart from the link between what ‘’ is and how it links to anything else (for example my xxxxx.stream files?).

Are you saying that the stream names in the smil file refer to the content files xxxx.stream ? In which case I think thats the link I didnt understand.

So in summary i think my questions now are )

1. For 50 live streams all doing the same thing should I have 1 application and 50 .stream files (1 for each different source camera) instead of 50 apps and 50 .stream files?

2. wheres the link between the stream name in the smil file and where I want them to go (maybe the stream files in content)?

3. where can I find a definition for the parameters in the smil file for start and length and any others that are available?

And lastly (i think) is would I still use the following url to connect over http to each camera (if i changed to use the single app with multiple inputs) :

http://:1935/live/camera.stream/manifest.f4m

http://:1935/live/camera2.stream/manifest.f4m

http://:1935/live/camera3.stream/manifest.f4m

etc

[Next page](https://community.wowza.com/t/live-and-mp4-streaming-schedule/38761.md?page=2)
