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?
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”)
<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
We got off track, that switch.smil is for multi-bitrate streaming. The scheduler 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.
<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
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
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
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
You can get some savings by removing any LiveStreamPacketizers that you are not using.
Richard
You can modify HTTPStreamer also but I’m not sure that you will get any savings.
Richard
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
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
That is right. The scheduler streams are live streams and count against the limit of 1 live stream using developer license
Richard
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.
Hi
Something like this,
<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:
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
Jason
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 !
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 !
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
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 !!
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?
closed.smil contains this (now renamed to streamschedule.smil) as per your other post so it gets picked up :