Wowza Community

problems using schedule

Hello, first of all let me introduce myself, I’m pqangel and work for a website where we use wowza to stream live fitness sessions.

This is my first time using wowza and I’m no developer or sysadmin but i try to know my way around.

This being said, I’ve been trying to configure wowza with the scheduler module for quite a long time now but the manual (https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher ) doesn’t seems to be enough.

I’ve done everything it says in there with many different results but not the one i want.

So far i’ve managed to actually get and play my smil file, but it plays it as soon as i start the server and not when i want it to.

I have added the loadandlock module to the application i want.

I have added the stream modules both to the server listener and the application (pointing it streamschedule.smil)

I have created streamschedule.smil and stored it in /…/Wowza…/content/ although i have also tried the path /…/applications/[appname]/content

here is a copy of my smil, as you can see it’s really basic.

<smil>
    <head>
    </head>
    <body>
        <stream name="Stream1"></stream>
        <playlist name="pl1" playOnStream="Stream1" repeat="false" scheduled="2014-10-11 00:00:29">
            <video src="mp4:myStream_10.mp4" start="0" length="60"/>
        </playlist>
    </body>
</smil>

1.- What I want to do is: record all the live streams (source and transcode) I am streaming in an application name gymoxion

2.- load those recorded files on streamschedule.smil to be played on 3 different streams (stream1, stream2, stream3) at a given date/hour

3.- load those streams on a smil file with a switch to be loaded on jwplayer as an adaptative bit rate stream

so, steps 1 and 3 have been easily acomplished, but step 2 is being a pain in the a**

anyone out there who cares to give me a helping hand?? I seriously can’t understand why scheduler is not loading the streams when I tell it to.

BTW i’m running wowza 4.0.3 on centos

Thanks in advance :wink: cheers

Hi,

You could post any warnings or errors that you see occur in the error log located at [install-dir]/logs/wowzastreamingengine_error.log

That may give some clues as to the problem.

Daren

Hello there. Thank you for choosing Wowza for your streaming needs, and welcome to the forum.

I am not exactly sure what problem you are having when you say "it plays it as soon as i start the server and not when i want it to". But I will do my best to help.

With the server listener enabled, the schedule will be loaded when the server starts. This means if you modify the .smil file after server start, these modifications will not take effect until sever restart.

If the scheduled start parameter is set to any time in the past, the schedule will be loaded immediately, and will start playing as soon as the application starts.

Also, the ServerListener to load and lock an appinstance is meant to be used if the application module is used on its own. It may be causing an issue to have both server listeners, and the application module configured. But I have not tested this.

Kind regards.

Salvadore

I have tested this out using all the different configurations you have described and I cant reproduce the behavior you are experiencing.

I would suggest starting with a fresh application, and follow the guide closely. Start out with either the server listener or the application module configured to test that you can get the desired results.

If this does not work then you can post your application.xml file and your .smil file in the forum. When posting .xml, .smil files etc to the forum please wrap them in code tags. (the little pound sign above the message box when posting)

Or you can open a ticket by sending a zipped copy of your /conf and /logs folders to support@wowza.com Please include your .smil file with the zip files when opening a ticket.

Thank you.

Salvadore

Okay, so you should be following this guide to set up the scheduler:

How to schedule streaming with Wowza Streaming Engine (ServerListenerStreamPublisher)

And according to that guide:

The Wowza Streaming Engine™ Manager SMIL Files feature cannot be used to edit the SMIL files for the Scheduler. The SMIL file here has extra tags that the manager does not recognize. Use a regular text editor to create and edit the Scheduler SMIL files.

Follow this guide for creating the .smil files and playback:

How to do scheduled, adaptive bitrate streaming using Stream class streams

And this guide provides example URLs for ABR in JWPlayer:

How to use JW Player with adaptive bitrate streaming from Wowza Streaming Engine

Also, keyframe alignment is critical for adaptive bitrate streaming, so you can check for keyframe alignment:

How to debug encoder multi-bitrate keyframe alignment

I hope this gets you going.

Salvadore

Good morning,

If you are still having trouble with this, and have not done so already. Please open a ticket with support.

To do so, please zip the following folders and send them, along with a link to this thread as reference to support@wowza.com:

[install-dir]/conf

[install-dir]/logs

[install-dir]/transcoder

[install-dir]/manager/logs

Please also include any .smil files you are suing as well

Thank you,

Salvadore

Thank you very much for this update. This will surely come in handy in the future and I learned something from it as well.

I am happy to hear the wonderful support team was able to help you get this sorted out.

Best,

Salvadore

Hi,

You could post any warnings or errors that you see occur in the error log located at [install-dir]/logs/wowzastreamingengine_error.log

That may give some clues as to the problem.

Daren

Hi daren, thanks for your reply

the thing is that neither the error log nor the access log is throwing anything useful.

error log is blank and access log all it says is “wowza started”.

when i load on the server loadandlock with the aplication name that has the schedule module it loads the stream as soon as wowza starts, ignoring the schedule.

when i delete that loadandlock module from the server (either i delete it or point it to another location) nothing happens, but, if i stream something live to that aplication from my studio then it catches the live streaming and the scheduled streaming…

it’s as if the trigger for schedule was missing.

hey salvadore,

Wowza is a very poweful tool and it has been a real helper on the development of our website, sadly i think that documentation and information is sometimes really hard to find and understand if you don’t know the system… luckily we have this forum to help us all the way down :slight_smile:

coming back to my problem, if i lock and load the application, the schedule is loaded as soon as the service (wowza) starts. This means that as soon as wowza has been rebooted (with the new smil configuration, of course) the first file in the schedule is loaded and begins to stream, even if the file was scheduled to play 3 hours later.

when i “disable lock and load” (to do this, instead of deleting the server listener i change the string value from “application” to “application_dummy” so it points to an application that doesn’t exists or a dummy application that does nothing), load the new schedule.smil and reboot the server, once it reaches the scheduled hour, the application loads nothing, is as if no schedule.smil file was there.

i have configured the scheduler as an application module, adding com.wowza.wms.plugin.collection.module.ModuleStreamPublisher to the application modules, streamPublisherSmilFile on Root/Application in the application properties and com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher to the server listener.

of course every time i change the schedule.smil file i restart the wowza service (i do this from the manager). maybe i can post some logs or conf files that would help you see what i’m doing wrong??

thank you very much for your help :slight_smile:

I have tested this out using all the different configurations you have described and I cant reproduce the behavior you are experiencing.

I would suggest starting with a fresh application, and follow the guide closely. Start out with either the server listener or the application module configured to test that you can get the desired results.

If this does not work then you can post your application.xml file and your .smil file in the forum. When posting .xml, .smil files etc to the forum please wrap them in code tags. (the little pound sign above the message box when posting)

Or you can open a ticket by sending a zipped copy of your /conf and /logs folders to support@wowza.com Please include your .smil file with the zip files when opening a ticket.

Thank you.

Salvadore

Hello salvadore, sorry that it took me so long to answer but I’ve been really busy to get and do all sort of testings.

So here is what i’ve done:

Created a live application called “diferido”

Added com.wowza.wms.plugin.collection.serverlistener.ServerListenerLoadAndLockAppInstances to server listeners

Added loadAndLockApplications to server properties at /root/server with string value “diferido”

Added com.wowza.wms.plugin.collection.module.ModuleStreamPublisher to modules on application “diferido”

Added streamPublisherSmilFile to applicacion “diferido” properties at /root/application with string value “streamschedule.smil”

Created “streamschedule.smil” at /usr/local/WowzaStreamingEngine-4.0.3/content with the following lines:

<smil>
    <head>
    </head>
    <body>
        <stream name="Stream_1"></stream>
        <stream name="Stream_2"></stream>
        <playlist name="pl1" playOnStream="Stream_1" repeat="false" scheduled="2014-10-15 18:50:00">
            <video src="mp4:myStream_0.mp4" start="0" length="60"/>
        </playlist>
        <playlist name="pl2" playOnStream="Stream_2" repeat="false" scheduled="2014-10-15 18:50:00">
            <video src="mp4:myStream_720p_0.mp4" start="0" length="60"/>
        </playlist>
        <playlist name="pl3" playOnStream="Stream_1" repeat="false" scheduled="2014-10-15 18:52:00">
            <video src="mp4:myStream_0.mp4" start="0" length="60"/>
        </playlist>
        <playlist name="pl4" playOnStream="Stream_2" repeat="false" scheduled="2014-10-15 18:52:00">
            <video src="mp4:myStream_720p_0.mp4" start="0" length="60"/>
        </playlist>
    </body>
</smil>

Created diferido.smil from wowza manager and added 2 video SMIL streams with src, language, width, height, etc… The resulting file was stored at /usr/local/WowzaStreamingEngine-4.0.3/content with the following lines:

<?xml version="1.0" encoding="UTF-8"?>
<smil title="diferido">
        <body>
                <switch>
                        <video height="1080" src="Stream_1" systemLanguage="es" width="1920">
                                <param name="videoBitrate" value="2500000" valuetype="data"></param>
                                <param name="audioBitrate" value="128000" valuetype="data"></param>
                        </video>
                        <video height="720" src="Stream_2" systemLanguage="es" width="1280">
                                <param name="videoBitrate" value="1500000" valuetype="data"></param>
                                <param name="audioBitrate" value="96000" valuetype="data"></param>
                        </video>
                </switch>
        </body>
</smil>

Restarted wowza from CLI (with service WowzaStreamingEngine stop/start) and manager (server/restart)

This is what happened:

As soon as Wowza service starts, Stream_1 and Stream_2 appear on Applications/diferido/incoming streams even if scheduled time hasn’t come yet, this streams have “active” status.

When trying to view this streams before the scheduled time arrives with test player it says “status: playing”

When trying to view this streams when the scheduled time arrives with test player it says “status: started playing Stream_1”

When the scheduled time of streaming finishes both Stream_1 and Stream_2 dissapear from “incoming streams”

When the second scheduled time of streaming arrives nothing happens, “incoming streams” have no stream and of course if you try to watch either Stream_1 or Stream_2 on test player it says no such stream or file exists.

I’ve also loaded diferido.smil from jwplayer (for adaptative bitrate) and this are the results:

When trying to load jwplayer before schedule time comes a loading symbol appears.

When scheduled time comes the video stream starts playing with all options available and working, 1080, 720 and auto.

When the first scheduled stream finishes jwplayer stops and show a “reload” symbol

When “reloading” Before or during second scheduled stream an “Error loading stream: ID not found on server” message appears.

This is my application.xml file (located at /usr/local/WowzaStreamingEngine-4.0.3/conf/):

<?xml version="1.0" encoding="UTF-8"?>
<Root version="1">
        <Application>
                <Name></Name>
                <AppType></AppType>
                <Description></Description>
                <!-- Uncomment to set application level timeout values
                <ApplicationTimeout>60000</ApplicationTimeout>
                <PingTimeout>12000</PingTimeout>
                <ValidationFrequency>8000</ValidationFrequency>
                <MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
                <MaximumSetBufferTime>60000</MaximumSetBufferTime>
                <MaximumStorageDirDepth>25</MaximumStorageDirDepth>
                -->
                <Connections>
                        <AutoAccept>true</AutoAccept>
                        <AllowDomains></AllowDomains>
                </Connections>
                <!--
                        StorageDir path variables
                        ${com.wowza.wms.AppHome} - Application home directory
                        ${com.wowza.wms.ConfigHome} - Configuration home directory
                        ${com.wowza.wms.context.VHost} - Virtual host name
                        ${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
                        ${com.wowza.wms.context.Application} - Application name
                        ${com.wowza.wms.context.ApplicationInstance} - Application instance name
                -->
                <Streams>
                        <StreamType>default</StreamType>
                        <StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
                        <KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
                        <!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, mpegdashstreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater -->
                        <LiveStreamPacketizers></LiveStreamPacketizers>
                        <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
                        <Properties>
                        </Properties>
                </Streams>
                <Transcoder>
                        <!-- To turn on transcoder set to: transcoder -->
                        <LiveStreamTranscoder></LiveStreamTranscoder>
                        <!-- [templatename].xml or ${SourceStreamName}.xml -->
                        <Templates>${SourceStreamName}.xml,transrate.xml</Templates>
                        <ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
                        <TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
                        <Properties>
                        </Properties>
                </Transcoder>
                <DVR>
                        <!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->
                        <!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->
                        <!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->
                        <!-- If this is a dvrstreamingrepeater, define Application/Repeater/OriginURL to point back to the origin -->
                        <!-- To turn on DVR recording set Recorders to dvrrecorder.  This works with dvrstreamingpacketizer  -->
                        <Recorders></Recorders>
                        <!-- As a single server or as an origin, set the Store to dvrfilestorage-->
                        <!-- edges should have this empty -->
                        <Store></Store>
                        <!--  Window Duration is length of live DVR window in seconds.  0 means the window is never trimmed. -->
                        <WindowDuration>0</WindowDuration>
                        <!-- Storage Directory is top level location where dvr is stored.  e.g. c:/temp/dvr -->
                        <StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>
                        <!-- valid ArchiveStrategy values are append, version, delete -->
                        <ArchiveStrategy>append</ArchiveStrategy>
                        <!-- Properties for DVR -->
                        <Properties>
                        </Properties>
                </DVR>
                <TimedText>
                        <!-- VOD caption providers (separate with commas): vodcaptionprovidermp4_3gpp, vodcaptionproviderttml, vodcaptionproviderwebvtt,  vodcaptionprovidersrt, vodcaptionproviderscc -->
                        <VODTimedTextProviders>vodcaptionprovidermp4_3gpp</VODTimedTextProviders>
                        <!-- Properties for TimedText -->
                        <Properties>
                        </Properties>
                </TimedText>
                <!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming, dvrchunkstreaming -->
                <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming,mpegdashstreaming</HTTPStreamers>
                <MediaCache>
                        <MediaCacheSourceList></MediaCacheSourceList>
                </MediaCache>
                <SharedObjects>
                        <StorageDir>${com.wowza.wms.context.VHostConfigHome}/applications/${com.wowza.wms.context.Application}/sharedobjects/${com.wowza.wms.context.ApplicationInstance}</StorageDir>
                </SharedObjects>
                <Client>
                        <IdleFrequency>-1</IdleFrequency>
                        <Access>
                                <StreamReadAccess>*</StreamReadAccess>
                                <StreamWriteAccess></StreamWriteAccess>
                                <StreamAudioSampleAccess></StreamAudioSampleAccess>
                                <StreamVideoSampleAccess></StreamVideoSampleAccess>
                                <SharedObjectReadAccess>*</SharedObjectReadAccess>
                                <SharedObjectWriteAccess>*</SharedObjectWriteAccess>
                        </Access>
                </Client>
                <RTP>
                        <!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
                        <Authentication>
                                <PublishMethod>block</PublishMethod>
                                <PlayMethod>none</PlayMethod>
                        </Authentication>
                        <!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
                        <AVSyncMethod>senderreport</AVSyncMethod>
                        <MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
                        <IdleFrequency>75</IdleFrequency>
                        <RTSPSessionTimeout>90000</RTSPSessionTimeout>
                        <RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
                        <RTSPBindIpAddress></RTSPBindIpAddress>
                        <RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
                        <RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
                        <IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
                        <!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
                        <Properties>
                        </Properties>
                </RTP>
                <MediaCaster>
                        <RTP>
                                <RTSP>
                                        <!-- udp, interleave -->
                                        <RTPTransportMode>interleave</RTPTransportMode>
                                </RTSP>
                        </RTP>
                        <StreamValidator>
                                <Enable>true</Enable>
                                <ResetNameGroups>true</ResetNameGroups>
                                <StreamStartTimeout>20000</StreamStartTimeout>
                                <StreamTimeout>12000</StreamTimeout>
                                <VideoStartTimeout>0</VideoStartTimeout>
                                <VideoTimeout>0</VideoTimeout>
                                <AudioStartTimeout>0</AudioStartTimeout>
                                <AudioTimeout>0</AudioTimeout>
                                <VideoTCToleranceEnable>false</VideoTCToleranceEnable>
                                <VideoTCPosTolerance>3000</VideoTCPosTolerance>
                                <VideoTCNegTolerance>-500</VideoTCNegTolerance>
                                <AudioTCToleranceEnable>false</AudioTCToleranceEnable>
                                <AudioTCPosTolerance>3000</AudioTCPosTolerance>
                                <AudioTCNegTolerance>-500</AudioTCNegTolerance>
                                <DataTCToleranceEnable>false</DataTCToleranceEnable>
                                <DataTCPosTolerance>3000</DataTCPosTolerance>
                                <DataTCNegTolerance>-500</DataTCNegTolerance>
                                <AVSyncToleranceEnable>false</AVSyncToleranceEnable>
                                <AVSyncTolerance>1500</AVSyncTolerance>
                                <DebugLog>false</DebugLog>
                        </StreamValidator>
                        <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
                        <Properties>
                        </Properties>
                </MediaCaster>
                <MediaReader>
                        <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
                        <Properties>
                        </Properties>
                </MediaReader>
                <MediaWriter>
                        <!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
                        <Properties>
                        </Properties>
                </MediaWriter>
                <LiveStreamPacketizer>
                        <!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
                        <Properties>
                        </Properties>
                </LiveStreamPacketizer>
                <HTTPStreamer>
                        <!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
                        <Properties>
                        </Properties>
                </HTTPStreamer>
                <Manager>
                        <!-- Properties defined are used by the Manager -->
                        <Properties>
                        </Properties>
                </Manager>
                <Repeater>
                        <OriginURL></OriginURL>
                        <QueryString><![CDATA[]]></QueryString>
                </Repeater>
                <StreamRecorder>
                        <Properties>
                        </Properties>
                </StreamRecorder>
                <Modules>
                        <Module>
                                <Name>base</Name>
                                <Description>Base</Description>
                                <Class>com.wowza.wms.module.ModuleCore</Class>
                        </Module>
                        <Module>
                                <Name>logging</Name>
                                <Description>Client Logging</Description>
                                <Class>com.wowza.wms.module.ModuleClientLogging</Class>
                        </Module>
                        <Module>
                                <Name>flvplayback</Name>
                                <Description>FLVPlayback</Description>
                                <Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
                        </Module>
                </Modules>
                <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
                <Properties>
                </Properties>
        </Application>
</Root>

thank you very much for your help :slight_smile:

precisely those are the guides I’ve followed.

Of course I didn’t created the smil file from the manager, i did it on vim (text editor on *nix), the one i created in the manager is a simple switch file that needs no further instructions or tags than the ones the manager recognizes.

adaptive bitrate, playing on jwplayer, keyframe alignment… all of that is already working, what I’m missing is the scheduler that doesn’t works with my configuration and i have no idea what I’m doing wrong as I’m following the guides step by step.

Good morning,

If you are still having trouble with this, and have not done so already. Please open a ticket with support.

To do so, please zip the following folders and send them, along with a link to this thread as reference to support@wowza.com:

[install-dir]/conf

[install-dir]/logs

[install-dir]/transcoder

[install-dir]/manager/logs

Please also include any .smil files you are suing as well

Thank you,

Salvadore

Thank you salvadore, i’ve been talking with support and it seems that scheduler does not support what i was trying to do.

For future reference, if someone visits this thread with the same problem i had:

Scheduler does not support “gaps” between scheduled times.

Let’s say i want to stream a 1 hour file at 10am and then re-stream that same file at 2pm. There are 3 “blank” hours in between that need to be filled with something.

I am using the company logo for this purpose.

to have the logo spinning constantly without having to worry about the duration of the file i set repeat=“true” so a 1 minute file keeps looping.

the resulting smil file would look like this:

<smil>
    <head>
    </head>
    <body>
        <stream name="Stream_1"></stream>
	
        <playlist name="pl1" playOnStream="Stream_1" repeat="false" scheduled="2014-10-22 12:00:00">
            <video src="mp4:myStream_test.mp4" start="0" length="600"/>
        </playlist>
	
	<playlist name="pl2" playOnStream="Stream_1" repeat="true" scheduled="2014-10-22 12:10:00">
            <video src="mp4:loop.mp4" start="0" length="-1"/>
        </playlist>
	<playlist name="pl3" playOnStream="Stream_1" repeat="false" scheduled="2014-10-22 14:00:00">
            <video src="mp4:myStream_test.mp4" start="0" length="3600"/>
        </playlist>
        <playlist name="pl4" playOnStream="Stream_1" repeat="true" scheduled="2014-10-22 15:00:00">
            <video src="mp4:myStream_test.mp4" start="0" length="-1"/>
        </playlist>
        <playlist name="pl5" playOnStream="Stream_1" repeat="false" scheduled="2014-10-22 19:00:00">
            <video src="mp4:myStream_test.mp4" start="0" length="3600"/>
        </playlist>
    </body>
</smil>

Support said developers are going to change scheduler module so it supports gaps in between but no date for this was given so let’s hope they do it soon :slight_smile:

thanks for your help.

cheers

Is there any change that Wowza scheduler module is now supports gaps in between ?