Hello all,
I have tried to compile the given code here: https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
but I obtain:
javac ServerListenerStreamPublisher.java
ServerListenerStreamPublisher.java:3: package com.wowza.wms.application does not exist
import com.wowza.wms.application.*;
^
ServerListenerStreamPublisher.java:4: package com.wowza.wms.server does not exist
import com.wowza.wms.server.*;
^
ServerListenerStreamPublisher.java:5: package com.wowza.wms.vhost does not exist
import com.wowza.wms.vhost.*;
^
ServerListenerStreamPublisher.java:7: package com.wowza.wms.stream.publish does not exist
import com.wowza.wms.stream.publish.*;
^
ServerListenerStreamPublisher.java:8: package com.wowza.wms.logging does not exist
import com.wowza.wms.logging.*;
The wms-plugin-collection.jar is in lib dir…what else?
Could you help me please ?
Thx by advance.
The easiest thing to do is use Wowza IDE
There is a stand-alone (Eclipse based) and Eclipse plugin versions.
Use the File/New wizards to create Wowza projects and application modules. (You might have to do File > New > Other to find them when using the plugin)
Richard
I don’t know what you are intending to happen.
It’s missing a closing tag, but otherwise would probably run.
Richard
Probably this will not do whatever you intend because all the dates are in the past, so everything will start right away, and there will be conflicts for StreamA, StreamB and StreamC. Only one stream will play for each.
Consider pl1 and pl2:
If pl2 had a schedule in the future (which it doesn’t), pl1 would play on StreamA when the server starts (because its schedule is in the past), then pl2 would take over on schedule, effectively switching StreamA to the live stream.
Richard
If there is an actual live stream being published to that application named “live.sdp”, then take out the “mp4:” prefix from the src, and change start to “-2” (start value -2 denotes live stream instead of file)
<playlist name="pl2" playOnStream="StreamA" repeat="true" scheduled="2009-12-11 16:30:00">
<video src="live.sdp" start="-2" length="-1"/>
</playlist>
You should probably remove if you are not using it.
Richard
First, you have to restart Wowza for this schedule to run and these streams to start.
You have set the schedule to today, in the near future I presume. This is very accurate, you will have to wait until that time for a scheduled stream to start, and it is of course the server time that matters.
What is: “rtmp://10.11.90.140/demo/France4-t.sdp”?
Assuming this is a live stream, as mentioned, the start value must be “-2”.
If 10.11.90.140 is another Wowza server, or demo is another application, and you are restreaming, then use a .stream file, and start start the Stream in StreamManager.
<video src="France4-t.stream" start="0" length="-2"/>
Where France4-t.stream is a text file with .stream extension in the content folder:
/content/France4-t.stream
With contents
rtmp://10.11.90.140/demo/France4-t.sdp
However, if 10.11.90.140/demo is the same application, you can just do this:
You might have to start France4-t.sdp in StreamManager
Richard
By default, this Scheduler example publishes to an application named “live”, which should be configured with StreamType “live”
If you create an app named live with StreamType live, then restart Wowza, then play:
rtmp://10.11.90.120/live/StreamA
If you want to publish to demo1, add this property to the /conf/Server.xml /Properties list:
<Property>
<Name>PublishToApplication</Name>
<Value>demo1</Value>
</Property>
The /conf/demo1/Application.xml /StreamType should be “live”
If you run Wowza in stand-alone mode (/bin/startup.bat) you can see what is or isn’t going by watching the log output in the console.
Richard
If you have the jar file then there is no need to compile anything.
As you have this in the lib directory you just need to add the correct XML into the Application.xml for the application in question and it should work.
Shamrock
THX for the reply, bu it is said that We do not need wowza ide:
https://www.wowza.com/docs/utility-modules-for-wowza-streaming-engine-media-server-software
Can you provide a quick step tutorial to implement that features in my debian Wowza install ?
I’m pretty novice in java environement.
Thx by advance,
You just need to add the correct XML into the Application.xml for the application in question and it should work.
Shamrock
Thx for answering me, could you tell me what and where do add in the application.xml ?
Is it possible to do something like this:
<playlist name="pl1" playOnStream="StreamA" repeat="true" scheduled="2009-12-11 16:00:00">
<video src="mp4:Extremists.m4v" start="5" length="5"/>
<video src="mp4:Extremists.m4v" start="50" length="5"/>
<video src="mp4:Extremists.m4v" start="150" length="5"/>
</playlist>
<playlist name="pl2" playOnStream="StreamA" repeat="true" scheduled="2009-12-11 16:30:00">
<video src="mp4:live.sdp" start="0" length="-1"/>
</playlist>
<playlist name="pl3" playOnStream="StreamB" repeat="true" scheduled="2009-12-11 16:00:00">
<video src="mp4:live2.sdp" start="0" length="-1"/>
</playlist>
<playlist name="pl4" playOnStream="StreamC" repeat="true" scheduled="2009-12-11 16:00:00">
<video src="mp4:StreamA" start="0" length="-1"/>
</playlist>
<playlist name="pl5" playOnStream="StreamC" repeat="true" scheduled="2009-12-11 18:00:00">
<video src="mp4:StreamB" start="0" length="-1"/>
</playlist>
<playlist name="pl6" playOnStream="StreamD" repeat="true" scheduled="2009-12-11 16:00:00">
<video src="mp4:StreamA" start="0" length="-1"/>
</playlist>
<playlist name="pl7" playOnStream="StreamD" repeat="true" scheduled="2009-12-11 20:00:00">
<video src="mp4:StreamC" start="0" length="-1"/>
(Assuming a good date sync of course !)
Thx for your answer.
Just wronf copy paste but its ok in my smil,
I try to run: rtmp://10.11.90.120/demo/StreamA
and access logs tell me:
2010-12-27 18:35:46 CET comment server DEBUG 200 - open - - - 714.003 - - - - - - - - - - - -- - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server INFO 200 - handshake0: 1394 - - - 714.003 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server INFO 200 - handshake0: 1537 - - - 714.005 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - Handshake[1]: length:1394 - - - 714.045 - - - - - - - - -- - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - Handshake[1]: length:1826 - - - 714.05 - - - - - - - - -- - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - Handshake[2]: length:290 - - - 714.05 - - - - - - - - -- - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - cmd: connect - - - 714.051 - - - - - - - - - - -- - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - queryStr: - - - 714.051 - - - - - - - - - - -- - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectapp=demo/ - - - 714.052 - - - - - - -- - - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectflashVer=LNX 10,1,102,65 - - - 714.052 - - - - - - -- - - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectswfUrl=undefined - - - 714.052 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connecttcUrl=rtmp://10.11.90.120/demo/ - - - 714.052 - - - -- - - - - - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectfpad=false - - - 714.052 - - - - - - - - -- - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectcapabilities=239.0 - - - 714.052 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectaudioCodecs=3191.0 - - - 714.053 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectvideoCodecs=252.0 - - - 714.053 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectvideoFunction=1.0 - - - 714.053 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectpageUrl=undefined - - - 714.053 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - connect: connectobjectEncoding=3.0 - - - 714.053 - - - - - - - -- - - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET connect-pending session INFO 100 192.168.40.100 - _defaultVHost_ demo _definst_ 0.052 [any] 1935 rtmp://10.11.90.120/demo/ 192.168.40.100 rtmp unknown LNX 10,1,102,65 2063838980 3363 3073 - - - - - - - - - - - - - rtmp://10.11.90.120/demo/ -
2010-12-27 18:35:46 CET connect session INFO 200 192.168.40.100 - _defaultVHost_ demo _definst_ 0.052 [any] 1935 rtmp://10.11.90.120/demo/ 192.168.40.100 rtmp unknown LNX 10,1,102,65 2063838980 3363 3073 - - - - - - - - - - - - - rtmp://10.11.90.120/demo/ -
2010-12-27 18:35:46 CET comment server DEBUG 200 - cmd: createStream - - - 714.084 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - onFlushNotifyClients: false - - - 714.084 - - - - - - - - -- - - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - flushInterval: 75 - - - 714.084 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - verboseDebug: false - - - 714.084 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET create stream INFO 200 - - _defaultVHost_ demo _definst_ 0.0010 [any] 1935 rtmp://10.11.90.120/demo/ 192.168.40.100 rtmp unknown LNX 10,1,102,65 2063838980 3417 3411 1 0 0 0 - - - - - - rtmp://10.11.90.120/demo/ rtmp://10.11.90.120/demo/ - rtmp://10.11.90.120/demo/ -
2010-12-27 18:35:46 CET comment server DEBUG 200 - cmd: play - - - 714.12 - - - - - - - - - - -- - - - - - - - - - - - - -
2010-12-27 18:35:46 CET comment server DEBUG 200 - cmd: setBufferTime - - - 714.121 - - - - - - - - - -- - - - - - - - - - - - - - -
2010-12-27 18:35:46 CET setbuffertime session DEBUG 200 [2063838980,1]: 3000 3000 _defaultVHost_ demo _definst_ 0.118 [any] 1935 rtmp://10.11.90.120/demo/ 192.168.40.100 rtmp unknown LNX 10,1,102,65 2063838980 3486 3638 - - - - - - - - - - - - -rtmp://10.11.90.120/demo/ -
The player tell me: Failed to play StreamA; stream not found.
I have nothing in erro log.
Best,
To resume what I have done:
-1 I put the wms-collection-plugin.jar in the dir lib
-2 I put in server.xml:
<ServerListeners>
<!--
<ServerListener>
<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerListener</BaseClass>
</ServerListener>
-->
<!--
<ServerListener>
<BaseClass>com.wowza.wms.plugin.loadbalancer.ServerListenerLoadBalancerSender</BaseClass>
</ServerListener>
-->
<ServerListener>
<BaseClass>com.wowza.wms.plugin.collection.serverlistener.ServerListenerStreamPublisher</BaseClass>
</ServerListener>
</ServerListeners>
<VHostListeners>
-3 I create my sstreamschedule.smil:
<smil>
<head>
</head>
<body>
<stream name="StreamA"></stream>
<stream name="StreamB"></stream>
<stream name="StreamC"></stream>
<stream name="StreamD"></stream>
<playlist name="pl1" playOnStream="StreamA" repeat="true" scheduled="2010-12-28 10:15:00">
<video src="mp4:avatar_100.mp4" start="5" length="5"/>
<video src="mp4:avatar_1000.mp4" start="50" length="5"/>
<video src="mp4:avatar_100.mp4" start="150" length="5"/>
</playlist>
<playlist name="pl2" playOnStream="StreamA" repeat="true" scheduled="2010-12-28 10:18:00">
<video src="rtmp://10.11.90.140/demo/France4-t.sdp" start="0" length="-2"/>
</playlist>
<playlist name="pl3" playOnStream="StreamB" repeat="true" scheduled="2010-12-28 10:19:00">
<video src="rtmp://10.11.90.140/demo/sdp:FranceO-t.sdp" start="0" length="-2"/>
</playlist>
<playlist name="pl4" playOnStream="StreamC" repeat="true" scheduled="2010-12-28 10:20:00">
<video src="rtmp://10.11.90.120/demo1/StreamA" start="0" length="-1"/>
</playlist>
<playlist name="pl5" playOnStream="StreamC" repeat="true" scheduled="2010-12-28 10:21:00">
<video src="rtmp://10.11.90.120/demo1/StreamB" start="0" length="-1"/>
</playlist>
<playlist name="pl6" playOnStream="StreamD" repeat="true" scheduled="2010-12-28 10:22:00">
<video src="rtmp://10.11.90.120/demo1/StreamA" start="0" length="-1"/>
</playlist>
<playlist name="pl7" playOnStream="StreamD" repeat="true" scheduled="2010-12-28 10:23:00">
<video src="rtmp://10.11.90.120/demo1/StreamC" start="0" length="-1"/>
</playlist>
</body>
</smil>
I call the good url:
rtmp://10.11.90.120/demo1/StreamA B, C or D
Only vod and StreamA,B,C ,D are played on the same server where this module is configured, other are on 10.11.90.120…
But nothing happens…
Here is debug log when I try StreamA…:
EBUG server comment - open
INFO server comment - handshake0: 1394
INFO server comment - handshake0: 1537
DEBUG server comment - Handshake[1]: length:1382
DEBUG server comment - Handshake[1]: length:1826
DEBUG server comment - Handshake[2]: length:290
DEBUG server comment - cmd: connect
DEBUG server comment - queryStr:
DEBUG server comment - Loading Application.xml: file:///usr/local/WowzaMediaServer/conf/demo1/Application.xml
DEBUG server comment - load module: name:base class:com.wowza.wms.module.ModuleCore
DEBUG server comment - add method (method): publish
DEBUG server comment - add method (method): getVersion
DEBUG server comment - add method (method): getRepeaterOriginUrl
DEBUG server comment - add method (method): getStreamType
DEBUG server comment - add method (method): setRepeaterOriginUrl
DEBUG server comment - add method (method): setStreamType
DEBUG server comment - add method (method): getReferrer
DEBUG server comment - add method (method): getPageUrl
DEBUG server comment - add method (method): setBufferTime
DEBUG server comment - add method (method): getStreamLength
DEBUG server comment - add method (method): getLastStreamId
DEBUG server comment - add method (method): play
DEBUG server comment - add method (method): getLiveStreamPacketizer
DEBUG server comment - add method (method): initLiveStreamRepeating
DEBUG server comment - add method (method): receiveAudio
DEBUG server comment - add method (method): receiveVideo
DEBUG server comment - add method (method): setLiveStreamPacketizer
DEBUG server comment - add method (method): getClientID
DEBUG server comment - add method (method): seek
DEBUG server comment - add method (method): deleteStream
DEBUG server comment - add method (method): createStream
DEBUG server comment - add method (method): initStream
DEBUG server comment - add method (method): pause
DEBUG server comment - add method (method): FCPublish
DEBUG server comment - add method (method): FCSubscribe
DEBUG server comment - add method (method): FCUnPublish
DEBUG server comment - add method (method): FCUnSubscribe
DEBUG server comment - add method (method): FCUnpublish
DEBUG server comment - add method (method): FCUnsubscribe
DEBUG server comment - add method (method): closeStream
DEBUG server comment - add method (method): getStreamBitrate
DEBUG server comment - add method (method): pauseRaw
DEBUG server comment - add method (method): play2
DEBUG server comment - add method (method): releaseStream
DEBUG server comment - add method (method): setBandwidthLimit
DEBUG server comment - load module: name:properties class:com.wowza.wms.module.ModuleProperties
DEBUG server comment - add method (method): getAppInstanceProperty
DEBUG server comment - add method (method): getApplicationProperty
DEBUG server comment - add method (method): getClientProperty
DEBUG server comment - add method (method): getStreamProperty
DEBUG server comment - add method (method): setAppInstanceProperty
DEBUG server comment - add method (method): setApplicationProperty
DEBUG server comment - add method (method): setClientProperty
DEBUG server comment - add method (method): setStreamProperty
DEBUG server comment - load module: name:logging class:com.wowza.wms.module.ModuleClientLogging
DEBUG server comment - add method (method): logDebug
DEBUG server comment - add method (method): logError
DEBUG server comment - add method (method): logInfo
DEBUG server comment - add method (method): logWarn
DEBUG server comment - load module: name:flvplayback class:com.wowza.wms.module.ModuleFLVPlayback
DEBUG server comment - add method (event): onDisconnect
DEBUG server comment - add method (event): onConnect
DEBUG server comment - add method (event): onConnectAccept
DEBUG server comment - add method (event): onConnectReject
DEBUG server comment - add method (method): checkBandwidth
DEBUG server comment - SharedObjectReadAccess: *
DEBUG server comment - SharedObjectWriteAccess: *
DEBUG server comment - StreamReadAccess: *
DEBUG server comment - StreamWriteAccess: *
DEBUG server comment - StreamAudioSampleAccess:
DEBUG server comment - StreamVideoSampleAccess:
DEBUG server comment - explodeStorageDir: =
DEBUG server comment - validateStoragePath: start:
DEBUG server comment - parent: null
DEBUG server comment - explodeStorageDir: ${com.wowza.wms.context.VHostConfigHome}/keys=/usr/local/WowzaMediaServer/keys
DEBUG server comment - validateStoragePath: start: /usr/local/WowzaMediaServer/keys
DEBUG server comment - explodeStorageDir: =
DEBUG server comment - validateStoragePath: start:
DEBUG server comment - parent: null
INFO application app-start _definst_ demo1/_definst_
DEBUG server comment - connect: connectapp=demo1/
DEBUG server comment - connect: connectflashVer=LNX 10,1,102,65
DEBUG server comment - connect: connectswfUrl=undefined
DEBUG server comment - connect: connecttcUrl=rtmp://10.11.90.120/demo1/
DEBUG server comment - connect: connectfpad=false
DEBUG server comment - connect: connectcapabilities=239.0
DEBUG server comment - connect: connectaudioCodecs=3191.0
DEBUG server comment - connect: connectvideoCodecs=252.0
DEBUG server comment - connect: connectvideoFunction=1.0
DEBUG server comment - connect: connectpageUrl=undefined
DEBUG server comment - connect: connectobjectEncoding=3.0
INFO session connect-pending 192.168.40.100 -
INFO session connect 192.168.40.100 -
DEBUG server comment - cmd: createStream
DEBUG server comment - onFlushNotifyClients: false
DEBUG server comment - flushInterval: 75
DEBUG server comment - verboseDebug: false
INFO stream create - -
DEBUG server comment - cmd: play
DEBUG server comment - cmd: setBufferTime
DEBUG session setbuffertime [1584925510,1]: 3000 3000
DEBUG server comment - open
INFO server comment - handshake0: 1537
INFO server comment - ServerHandler.exceptionCaught[[any]:1935:10.11.90.192]: java.io.IOException: Connection reset by peer
DEBUG server comment - sessionClosed: closeConnection: vhost:_defaultVHost_ clientId:450385481
INFO session disconnect 450385481 -
DEBUG server comment - ServerHandler.handleSessionIdle: isDidClose
Do I need to add something in Application.xml ?
Plz help me…
Thx for you live precisions,
Let start easy:
Im in Frnce so time your are viewing are already passed :), so stream shoud start automatically
<smil>
<head>
</head>
<body>
<stream name="StreamA"></stream>
<playlist name="pl1" playOnStream="StreamA" repeat="true" scheduled="2010-12-28 11:05:00">
<video src="mp4:avatar_1600.mp4" start="0" length="100"/>
</playlist>
</body>
</smil>
Assuming wowza is restarted.
It is still do not work.
Look:
When I test with an applicaztion.xml (with streatype default) and call:
rtmp://10.11.90.120/demo1/mp4:avatar_1600.mp4 it is working
but when passing as asked in the tuto to stream type: live and call:
rtmp://10.11.90.120/demo1/StreamA it is NOT working .
Your client player tell me: Failed to play StreamA; stream not found.
But how does wowza know where to look for Stream A if we do not define anything in app.xml or/and if I do not call the smil explicitly in the player url ? (maybe stupid question… I just become crazy it seemms so esay on your side!!)
Thx for your help.