How to use built in Stream Manager

https://www.wowza.com/docs/how-to-use-stream-manager-in-wowza-media-server-3

That is great!

Do me a favor. Try it again with the OrginURL set to:

rtmp://[origin-ip-address]

It should still work.

Charlie

Cool, thanks, Charlie

any docs on this? I have it running but have no clue what each click does.

You can use a complex RTSP based stream name with the iPhone. Yoiu need to either use the Stream alias package or a .stream file to turn the RTSP url into a simple stream name such as myStream.stream. Then you will use the .stream name to identify the stream.

See the basic instructions for a single stream here:

https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming

The .stream file only needs to exist on the origin. Do not copy it to the edge server. Also be sure you are running the latest patch:

https://www.wowza.com/devbuild.html

Charlie

Be sure you are doing this on two different machines or make sure you have setup two applications that do not share the same content folder. This is very important or it will not work.

On origin:

  • Create folder [install-dir]/applications/liverepeater

  • Create folder [install-dir]/conf/liverepeater and copy [install-dir]/conf/Application.xml into this new folder

  • Edit [install-dir]/conf/liverepeater/Application.xml and make the following changes:

  • Set Streams/StreamType to live

  • Set LiveStreamPacketizer to cupertinostreamingpacketizer

  • Create myStream.stream file in [install-dir]/content folder with full RTSP url to the source.

  • Start stream on origin using the stream manager and the stream name myStream.stream and MediaCaster type rtp

  • Edit [install-dir]/conf/admin.password and add a username and password

  • Go to http://[origin-ip-address]:8086/streammanager and start the stream myStream.stream and MediaCaster type rtp under the application liverepeater

    Note: At this point you should use the iPhone to verify the stream is running on the origin. Do not proceed until it is viewable on the orgin. Be sure the format of the stream is correct (H.264 Baseline level 3.0 lower with AAC audio):

    http://[origin-address]:1935/liverepeater/myStream.stream
    
    

    On edge:

  • Create folder [install-dir]/applications/liverepeater

  • Create folder [install-dir]/conf/liverepeater and copy [install-dir]/conf/Application.xml into this new folder

  • Edit [install-dir]/conf/liverepeater/Application.xml and make the following changes:

  • Set Streams/StreamType to live

  • Set LiveStreamPacketizer to cupertinostreamingrepeater

  • Set Repeater/OriginURL to rtmp://[origin-ip-address]/liverepeater

    Note: At this point you should use the iPhone to verify the stream is running on the edge:

    http://[edge-address]:1935/liverepeater/myStream.stream
    
    

    Charlie

I updated my previous post with more explicit instructions. These instructions are just to get the iPhone working. Focus on that. If you still can’t get it to work, document in detail what you have tried and zip up and send me the conf and logs folders that you generated from the edge and origin after you explicitly follow these instructions.

Charlie

It is covered in the User Guide “MediaCasters, Stream Manager and StartupStreams.xml” section, and in the quickstart guide.

https://www.wowza.com/resources/WowzaMediaServer_UsersGuide.pdf

https://www.wowza.com/quickstart.html

Richard

You can use streammanager on the edge server, with “liverepeater” StreamType. You can automate this on the edge with /conf/StartUpStreams.xml

Richard

If you are re-streaming from rtsp source, like an IP camera or restreaming from a shoutcast server, an origin in the middle is not necessary. You can re-stream from each “edge” directly from the source.

Richard

Um, further info: I’ve been reminded that this might not work in all cases because of limits on how many streams can be started in some cases, like IP cameras. So, I guess origin in the middle might necessary. Sorry to mislead.

Richard

Quick answer: no, they’re not.

Richard

You have to add this HTTPProvider to that VHost.xml /HostPort (/Port 8086) /HTTPProviders list. Make it the first one:

<HTTPProvider>
	<BaseClass>com.wowza.wms.http.streammanager.HTTPStreamManager</BaseClass>
	<RequestFilters>streammanager*</RequestFilters>
	<AuthenticationMethod>admin-digest</AuthenticationMethod>
</HTTPProvider>

Richard

You can use /conf/StartUpStreams.xml to start streams instead:

https://www.wowza.com/docs/how-to-start-streams-at-server-startup

Richard

I have a question on the Stream Manager configuration on an edge server to repeat a live stream from the origin server to the iPhone.

I followed the instructions listed in the ‘Live Stream Repeater’ section of the userguide pdf. After setting it up, I was able to successfully connect to an edge server via the flash player and view the live stream off of the origin server. But I’m not able to get the iPhone stream to work.

I’m running the application ‘liverepeater’ and the stream ‘myStream.sdp’ on both the origin and edge server. I’ve confirmed that wowza is able to bind successfully to port 554 on the origin server.

What would the entries be on the Stream Manager for the edge server? As per the instructions, I clicked on the ‘start receiving stream’ under the ‘liverepeater/definst’ and entered the following:

Application: liverepeater/_definst_
MediaCaster Type: rtp
Stream Name: rtsp://<originhost>:554/myStream.sdp

On doing so, the origin server’s wowza instance returns the warning:

WARN server comment - Application folder ([install-location]/applications/_defapp_) is missing

I then tried changing the ‘Stream Name’ entry to ‘rtsp://:554/liverepeater/definst/myStream.sdp’. That resulted in the following error on the edge server:

INFO server comment - RTPSessionTracker.add[rtsp://xxx.xxx.xxx.xxx:554/liverepeater/_definst_/myStream.sdp]: 1
WARN server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: Authentication required[401]: Username password not available
WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: RTSP/RTP re-streaming timeout.
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose
INFO server comment - RTPSessionTracker.remove[rtsp://xxx.xxx.xxx.xxx:554/liverepeater/_definst_/myStream.sdp]: 0:true

Any idea what I’m doing wrong?

UPDATE:

I managed to get rid of the ‘Authentication required’ error msg by setting the ‘RTP/Authentication/PublishMethod’ and ‘RTP/Authentication/PublishMethod’ (in the ‘liverepeater’ application’s Application.xml file) on the edge server to ‘none’. The ‘Stream Manager’ settings on the edge server are as follows:

Application: liverepeater/_definst_
MediaCaster Type: rtp
Stream Name: rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp

The wowza log in the edge server now displays the following:

INFO application app-start _definst_ liverepeater/_definst_
INFO server comment - RTPMediaCaster.create
INFO server comment - RTPMediaCaster.init
INFO server comment - RTPMediaCaster.Reconnector: start
INFO server comment - HTTPStreamManager.onHTTPRequest: Publish stream successfully started [liverepeater/_definst_]: rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp
INFO server comment - RTPSessionTracker.add[rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: 1
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: sessionId:827345958 sessionTimeout:60000
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: RTSP/RTP re-streaming. Success, received SDP data.
INFO stream create - -
INFO stream publish rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp -
INFO server comment - RTPUDPTransport.bind: 0.0.0.0/0.0.0.0:6972
INFO server comment - RTPUDPTransport.bind: 0.0.0.0/0.0.0.0:6973
INFO server comment - RTPUDPTransport.bind: 0.0.0.0/0.0.0.0:6970
INFO server comment - RTPUDPTransport.bind: 0.0.0.0/0.0.0.0:6971
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.sessionStart: PLAY: rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp
INFO server comment - RTPMediaCaster.Reconnector: stop
INFO server comment - RTCPHandler.sendFirstRTCPRR[567360897,6973,/<originhost>:6977]
INFO server comment - UDPTransport.firstPacket: 0.0.0.0/0.0.0.0:6973
INFO server comment - RTCPHandler.sendFirstRTCPRR[1141292616,6971,/<originhost>:6975]
INFO server comment - UDPTransport.firstPacket: 0.0.0.0/0.0.0.0:6971
INFO server comment - UDPTransport.firstPacket: 0.0.0.0/0.0.0.0:6970
INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: smoothstreamingrepeater:rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp
INFO server comment - LiveStreamPacketizerSmoothStreaming.startStream[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]
INFO server comment - LiveStreamPacketizerCupertino.init[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: chunkDurationTarget: 10000
INFO server comment - LiveStreamPacketizerCupertino.init[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: chunkDurationTolerance: 500
INFO server comment - LiveStreamPacketizerCupertino.init[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: audioGroupCount: 3
INFO server comment - LiveStreamPacketizerCupertino.init[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: playlistChunkCount:3
INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: cupertinostreamingrepeater:rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp
INFO server comment - CupertinoPacketHandler.startStream[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]
INFO server comment - LiveStreamPacketizerCupertino.handlePacket: Audio codec: AAC
INFO server comment - LiveStreamPacketizerCupertino.handlePacket: Audio info[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: {AACFrame: size: 0, rate:32000, channels:2, samples:1024, errorBitsAbsent:true, profileObjectType:2}
INFO server comment - UDPTransport.firstPacket: 0.0.0.0/0.0.0.0:6972
INFO server comment - LiveStreamPacketizerCupertino.handlePacket: Video codec: H264
INFO server comment - LiveStreamPacketizerCupertino.handlePacket: Video info[liverepeater/_definst_/rtsp://<originhost>0:554/liverepeater/_definst_/myStream.sdp]: {H264CodecConfigInfo: profile: "Baseline", level: 1.2, frameSize: 320x240, aspect: 0/1, }
INFO server comment - LiveStreamPacketizerSmoothStreaming.flushPendingAudio: Bitrate[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: 64000
INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[liverepeater/_definst_/rtsp://<originhost>:554/liverepeater/_definst_/myStream.sdp]: Add chunk: id:1 a/v/k:212/0/0 duration:20272

But when I try to access the stream from my iPhone by connecting to:

http://:1935/liverepeater/myStream.sdp/playlist.m3u8

safari just times out with the message ‘Safari could not open the page because the server stopped responding’. And there is no indication of the iphone’s connection attempt in the wowza log.

Thanks for the additional info. I’m guessing you meant to say ‘You CANNOT use a complex RTSP based stream name with the iPhone.’

I followed the ‘Live Streaming (all player technologies):’ instructions in https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming and got both RTMP and iPhone streaming to work using the ‘rtplive’ application.

I’m using wirecast on the origin server with the broadcast settings destination set to ‘Built-in Streaming Server’ and file location set to ‘myStream.sdp’. The resulting stream url from wirecast is rtsp://:7070/myStream.sdp which is what the ‘myStream.stream’ file points to.

In the Stream Manager settings for ‘rtplive’, the ‘MediaCaster Type’ is rtp and the ‘Stream Name’ is myStream.stream.

The above settings work well and I’m able to connect to http://:1935/rtplive/myStream.stream/playlist.m3u8 via my iPhone and view the stream.

Unfortunately, I’m still not able to get the live stream repeater to work. I tried the settings above on my origin server replacing the ‘rtplive’ application with the ‘liverepeater’ application with the Stream/Stream type set to liverepeater-origin. In the Stream Manager settings for ‘liverepeater’, I tried setting the ‘MediaCaster Type’ to both rtp and liverepeater.

The wowza logs look like:

INFO rtsp connect 2122670481 -
INFO rtsp disconnect 2122670481 -
WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: RTSP/RTP re-streaming timeout.
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession
INFO server comment - RTPSessionTracker.add[rtsp://<origin-node-ip>:7070/myStream.sdp]: 2
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose
INFO server comment - RTPSessionTracker.remove[rtsp://<origin-node-ip>:7070/myStream.sdp]: 1:true
INFO rtsp connect 1876471220 -
INFO rtsp disconnect 1876471220 -
WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: RTSP/RTP re-streaming timeout.
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose
INFO server comment - RTPSessionTracker.remove[rtsp://<origin-node-ip>:7070/myStream.sdp]: 0:true
INFO server comment - RTPSessionTracker.add[rtsp://<origin-node-ip>:7070/myStream.sdp]: 1

I’m at a loss as to what the Stream Manager settings should be for both the origin and edge servers.

In the steps you mentioned above, how does the edge know to get the content from the origin when i connect to http://:1935/[application]/myStream.stream/playlist.m3u8 ? Shouldn’t there be a stream manager entry in the edge server’s [application] as well? If so, could you tell me what the settings would be?

Also, just to confirm, the instructions in the userguide specifies that the Streams/Stream Type in the origin’s and edge’s [install-dir]/conf/[application]/Application.xml should be set to liverepeater-origin and liverepeater-edge respectively. I noticed that you asked me to set them both to live. Is that ok?

I had already given that a shot. I tried setting the stream name on the edge server’s stream manager to

rtsp://:554/[origin-application]/myStream.stream and

rtmp://:1935/[origin-application]/myStream.stream.

In both cases, I get a file not found message on the iPhone when i try and connect to http://:1935/[edge-application]/myStream.stream/playlist.m3u8

I even tried setting the Repeater/OriginURL entry in the edge server’s Application.xml to point to rtmp://

Got it. I followed the re-streaming steps just to understand how to set up a .stream file instead of a .sdp file. The goal is to get a Live Stream Repeater setup to work where by multiple edge servers connect to one (or more) origin servers and serve the content. The setup works fine with a .sdp file and RTMP streaming using the liverepeater-origin and liverepeater-edge example but not with iPhone streaming.

That did the trick. Thank you! Just FYI, I had failed to add /liverepeater to rtmp:// in the Repeater/OriginURL entry. The instructions in the userguide (page 31) just asks to enter the IP address.

Thanks again.