Wowza Community

Unable to setup a waiting video

Hello,

We’re running Wowza Streaming Engine 4.4.1 on Unbuntu 14.04.

We have setup a live application which receives an RTMP stream and transcode it to an HLS stream with 4 stream.

To be able to stream a “waiting” video until the camera RTMP stream starts, we have setup 2 modules :

  • com.wowza.wms.plugin.streampublisher.ModuleStreamPublisher

  • com.wowza.wms.plugin.streampublisher.ModuleLoopUntilLive

For those modules, we added the following custom properties :

/Root/Application/streamPublisherSmilFile : tlsloop.smil

/Root/Application /loopUntilLiveSourceStreams: _320x180,_640x360, _1024x576, _1280x720

/Root/Application /loopUntilLiveOutputStreams : Stream1_320x180,Stream1_640x360, Stream1_1024x576, Stream1_1280x720

The tlsloop.smil contains the following configuration :

<?xml version="1.0" encoding="UTF-8"?>
<smil title="Thales Live Streaming 5 flux">
	<body>
	        <stream name="Stream1"></stream>
        
        	<playlist name="pl1" playOnStream="Stream1" repeat="true" scheduled="2016-04-15 16:30:00">
	            <video src="mp4:sample.mp4" start="0" length="-1"/>
        	</playlist>
		<switch>
			<video height="180" src="Stream1_320x180" systemLanguage="fr" width="320">
				<param name="videoBitrate" value="256000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="360" src="Stream1_640x360" systemLanguage="fr" width="640">
				<param name="videoBitrate" value="1000000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="576" src="Stream1_1024x576" systemLanguage="fr" width="1024">
				<param name="videoBitrate" value="1500000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="720" src="Stream1_1280x720" systemLanguage="fr" width="1280">
				<param name="videoBitrate" value="2000000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
		</switch>
	</body>
</smil>

Another smil file has been configured for the real “live” stream :

<?xml version="1.0" encoding="UTF-8"?>
<smil title="Thales Live Streaming 5 flux">
	<body>
                <stream name="liveStream"></stream>
		<switch>
			<video height="180" src="_320x180" systemLanguage="fr" width="320">
				<param name="videoBitrate" value="256000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="360" src="_640x360" systemLanguage="fr" width="640">
				<param name="videoBitrate" value="1000000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="576" src="_1024x576" systemLanguage="fr" width="1024">
				<param name="videoBitrate" value="1500000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
			<video height="720" src="_1280x720" systemLanguage="fr" width="1280">
				<param name="videoBitrate" value="2000000" valuetype="data"></param>
				<param name="audioBitrate" value="128000" valuetype="data"></param>
			</video>
		</switch>
	</body>
</smil>

When we start the application, the waiting video is correctly streamed,

But when we start the camera rtmp stream, the waiting video is still streamed.

Here are the logs :

2016-11-16	00:11:25	CET	unpublish	stream	INFO	200	-	-	_defaultVHost_	tlsloop	_definst_	5473.701	10.0.0.2	1935	rtmp://37.35.2.25:1935/tlsloop	37.35.2.149	rtmp	-	FMLE/3.0 (compatible; Lavf57.41.100)	164653900	806472009	24844	1	0	805842220	0	-	-	-	-	-	-	rtmp://37.35.2.25:1935/tlsloop	rtmp://37.35.2.25:1935/tlsloop	-	rtmp://37.35.2.25:1935/tlsloop	-
2016-11-16	00:11:25	CET	destroy	stream	INFO	200	-	-	_defaultVHost_	tlsloop	_definst_	5473.702	10.0.0.2	1935	rtmp://37.35.2.25:1935/tlsloop	37.35.2.149	rtmp	-	FMLE/3.0 (compatible; Lavf57.41.100)	164653900	806472009	24844	1	0	805842220	0	-	-	-	-	-	-	rtmp://37.35.2.25:1935/tlsloop	rtmp://37.35.2.25:1935/tlsloop	-	rtmp://37.35.2.25:1935/tlsloop	-
2016-11-16	00:11:25	CET	disconnect	session	INFO	200	164653900	-	_defaultVHost_	tlsloop	_definst_	5473.758	10.0.0.2	1935	rtmp://37.35.2.25:1935/tlsloop	37.35.2.149	rtmp	-	FMLE/3.0 (compatible; Lavf57.41.100)	164653900	806472009	25135	-	-	-	-	-	-	-	-	-	-	-	-	-	rtmp://37.35.2.25:1935/tlsloop	-
2016-11-16	00:11:25	CET	comment	server	INFO	200	-	TranscodingSession.close[tlsloop/_definst_/]	-	-	-	117807.046	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	comment	server	INFO	200	-	TranscodingSession.shutdown[tlsloop/_definst_/]	-	-	-	117807.046	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	decoder-video-stop	transcoder	INFO	200	-	-	-	-	-	117807.046	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	encoder-video-stop	transcoder	INFO	200	-	{name: "1280x720"}	-	-	-	117807.046	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	encoder-video-stop	transcoder	INFO	200	-	{name: "1024x576"}	-	-	-	117807.047	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	encoder-video-stop	transcoder	INFO	200	-	{name: "320x180"}	-	-	-	117807.047	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	encoder-video-stop	transcoder	INFO	200	-	{name: "640x360"}	-	-	-	117807.047	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	unpublish	stream	INFO	200	_1024x576	-	-	-	-	5470.874	-	-	-	-	-	-	-	-	-	-	95	0	955264123	0	_1024x576	-	-	-	-	-	/_1024x576	/_1024x576	-	-	-
2016-11-16	00:11:25	CET	comment	application	INFO	200	-	ModuleLoopUntilLive.StreamListener.onPublish Swapping to playlist [_1024x576]	-	-	-	117807.047	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	destroy	stream	INFO	200	_1024x576	-	-	-	-	5470.88	-	-	-	-	-	-	-	-	-	-	95	0	955264123	0	_1024x576	-	-	-	-	-	/_1024x576	/_1024x576	-	-	-
2016-11-16	00:11:25	CET	unpublish	stream	INFO	200	_320x180	-	-	-	-	5470.879	-	-	-	-	-	-	-	-	-	-	96	0	191824597	0	_320x180	-	-	-	-	-	/_320x180	/_320x180	-	-	-
2016-11-16	00:11:25	CET	comment	application	INFO	200	-	ModuleLoopUntilLive.StreamListener.onPublish Swapping to playlist [_320x180]	-	-	-	117807.054	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	destroy	stream	INFO	200	_320x180	-	-	-	-	5470.904	-	-	-	-	-	-	-	-	-	-	96	0	191824597	0	_320x180	-	-	-	-	-	/_320x180	/_320x180	-	-	-
2016-11-16	00:11:25	CET	unpublish	stream	INFO	200	_1280x720	-	-	-	-	5470.904	-	-	-	-	-	-	-	-	-	-	97	0	1269377041	0	_1280x720	-	-	-	-	-	/_1280x720	/_1280x720	-	-	-
2016-11-16	00:11:25	CET	comment	application	INFO	200	-	ModuleLoopUntilLive.StreamListener.onPublish Swapping to playlist [_1280x720]	-	-	-	117807.079	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	destroy	stream	INFO	200	_1280x720	-	-	-	-	5470.908	-	-	-	-	-	-	-	-	-	-	97	0	1269377041	0	_1280x720	-	-	-	-	-	/_1280x720	/_1280x720	-	-	-
2016-11-16	00:11:25	CET	unpublish	stream	INFO	200	_640x360	-	-	-	-	5470.907	-	-	-	-	-	-	-	-	-	-	98	0	629270152	0	_640x360	-	-	-	-	-	/_640x360	/_640x360	-	-	-
2016-11-16	00:11:25	CET	comment	application	INFO	200	-	ModuleLoopUntilLive.StreamListener.onPublish Swapping to playlist [_640x360]	-	-	-	117807.082	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
2016-11-16	00:11:25	CET	destroy	stream	INFO	200	_640x360	-	-	-	-	5470.908	-	-	-	-	-	-	-	-	-	-	98	0	629270152	0	_640x360	-	-	-	-	-	/_640x360	/_640x360	-	-	-
2016-11-16	00:11:25	CET	connect-pending	session	INFO	100	37.35.2.149	-	_defaultVHost_	tlsloop	_definst_	0.016	10.0.0.2	1935	rtmp://37.35.2.25:1935/tlsloop	37.35.2.149	rtmp	-	FMLE/3.0 (compatible; Lavf57.41.100)	1047868257	3232	3073	-	-	-	-	-	-	-	-	-	-	-	-	-	rtmp://37.35.2.25:1935/tlsloop	-
2016-11-16	00:11:25	CET	connect	session	INFO	200	37.35.2.149	-	_defaultVHost_	tlsloop	_definst_	0.016	10.0.0.2	1935	rtmp://37.35.2.25:1935/tlsloop	37.35.2.149	rtmp	-	FMLE/3.0 (compatible; Lavf57.41.100)	1047868257	3232	3073	-	-	-	-	-	-	-	-	-	-	-	-	-	rtmp://37.35.2.25:1935/tlsloop	-
2016-11-16	0

So we can see that the module detects the new incoming RTMP stream, but why the swith is not effective ?