Step by step instructions for Re-streaming and RTSP stream through Wowza Pro.
-
Download and install Wowza Media Server from the Wowza Store
-
Create a new Wowza Pro application for streaming (may already exist if examples installed)
-
Create the folder [install-dir]/applications/rtplive
-
Create the folder [install-dir]/conf/rtplive
-
Copy the file [install-dir]/conf/Application.xml into this new folder [install-dir]/conf/rtplive
-
Edit the newly copied Application.xml and make the following changes:
-
Change Streams/StreamType to rtp-live
-
Add following properties to Streams/Properties container (there are several containers, be sure to add to correct container)
<Property> <Name>sortPackets</Name> <Value>true</Value> <Type>Boolean</Type> </Property> <Property> <Name>sortBufferSize</Name> <Value>500</Value> <Type>Integer</Type> </Property>
-
Add following properties to MediaCaster/Properties container (there are several containers, be sure to add to correct container)
<Property> <Name>forceInterleaved</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
-
(for iPhone/iPod touch/Silverlight playback): Set the LiveStreamPacketizers to cupertinostreamingpacketizer, smoothstreamingpacketizer:
<LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer</LiveStreamPacketizers>
-
(for RTSP/RTP playback): Set the RTP/Authentication/PlayMethod to none
<PlayMethod>none</PlayMethod>
-
Smooth Streaming only: Add the following property to the application level container at the bottom of the Application.xml file (be sure to get the correct container - there are several in the Application.xml file)
<Property> <Name>smoothStreamingMediaMajorVersion</Name> <Value>2</Value> <Type>Integer</Type> </Property>
-
Smooth Streaming only: Using a text editor create the file [install-dir]/conf/clientaccesspolicy.xml with the following content (For more information see the article Network Security Access Restrictions in Silverlight):
<?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy>
-
(for iPhone/iPod touch playback): In some cases it might be necessary to follow this guide to Force a non-compliant H.264 live stream to use Baseline level 3 profile
-
Startup the Wowza Pro server
Playback:
-
To play using Adobe Flash player:
Double-click [install-dir]/examples/LiveVideoStreaming/client/live.html, enter the information below and click the Play button.
[b]Server[/b] to [b]rtmp://[server-ip-address]/rtplive[/b] [b]Stream[/b] to [b][noparse]rtsp://[encoder-ip-address][/noparse][/b] (Example: [noparse]rtsp://192.168.1.8:554[/noparse])
-
For IPhone, IPod Touch, IPad, Silverlight and RTSP/RTP players and devices follow these steps first:
-
Use the built-in alias method: Add a text file to the applications’s content folder with a .stream extension, “myRTSPStream.stream”, make its contents the RTSP url. Or, you can use the StreamName Alias package to create an alias. The following steps will assume you are using a .stream file in the content folder named “myRTSPStream.stream”
-
Optionally Change the Application.xml StreamType from “rtp-live” to “live”. (This allows you to be in full control of the stream using the StreamManager in the next step. Otherwise, Flash players that play the stream will start it.)
-
Start the stream in the StreamManager.
-
Open http://[wowza-address]:8086/streammanager (You have to add a username and password to the /conf/admin.password file for access to the StreamManager).
-
Click “Start Receiving Streaming” under the “rtplive” application.
-
Select MediaCaster type “rtp” (default) or “rtp-record” (if you also want to record the stream on the server).
-
Enter “myRTSPStream.stream” in the Stream Name box
-
Click OK
-
To play using iPhone or iPod touch:
Enter the following URL into the Safari web browser:
http://[wowza-address]:1935/live/myRTSPStream.stream/playlist.m3u8
-
To play using Microsoft Silverlight:
-
Download the Smooth Streaming player from here: IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe
-
Double click IIS_Smooth_Streaming_Player_Development_Kit_1.0_Beta_2.exe to extract the player
-
Edit Default.html and change the mediaSource property (line 85) to:
http://[wowza-address]:1935/live/myRTSPStream.stream/Manifest
-
Double click Default.html and the video will begin to play.
-
To play using RTSP/RTP player or device:
Enter the following URL into the RTSP/RTP player:
rtsp://[wowza-address]:1935/live/myRTSPStream.stream
Note: Some cameras do not support RTSP/RTP interleaving (sending the RTP packet data over the RTSP TCP connection) If this is the case then set the forceInterleaved property above to false, restart Wowza Media Server and try to play the stream.
Note: Some cameras do not send RTCP packets. If you see the warning log message:
Waiting for RTCP packet. See docs for (Application.xml: RTP/AVSyncMethod and RTP/MaxRTCPWaitTime).
Edit [install-dir]/rtplive/Application.xml and change the RTP/AVSyncMethod to systemclock.
Note: If you are re-streaming an H.264 stream from an Axis Communications camera such as the following models (which natively support H.264): M1011(-W), M1031-W, P3301(-V), Q1755, Q6032 the RTSP url take the form:
rtsp://[camera-ip-address]:554/axis-media/media.amp
where [camera-ip-address] is the ip adress of the Axis camera.
You can add a username and password to the RTSP url like this:
rtsp://username:password@[camera-ip-address]:554/axis-media/media.amp
Where username and password are the credentials that you have set in the camera’s web interface.
Note: By default Wowza Pro streams using UDP on ports 6970 - 9999 and TCP port 554. This can be a problem if you are streaming to a Wowza Pro server or Oscar that is behind a firewall on which these ports are blocked. To resolve this issue, you need to open up the UDP port range 6970 - 9999 and TCP port 554 on any firewalls between the Oscar encoder and Wowza Pro. You may also need to adjust the [oscar-ip-address] if the Oscar is behind a router that has provided a NAT address for the device.
Note: Many players will not accept stream names that look like urls. You can use the built-in alias method (as mentioned above in the Playback section): Add a text file to the applications’s content folder with a .stream extension, make its contents the rtsp url, the reference the stream by the file name, e.g., “myIPCam.stream” Or, you can use the stream name alias package to create an alias for the stream name url. This package can also be used to secure Wowza Pro so that it will only be able to restream urls that you specify. This package can be downloaded from here: StreamNameAlias.
Note: There is an issue when re-streaming an RTSP/RTP stream that is hosted by Quicktime Streaming Server (Darwin, QTSS) that after 2 minutes of streaming the stream will be dropped by QTSS. This is caused by the fact that Wowza Pro does not send RTCP Receiver Report packets back to QTSS. This causes QTSS to timeout and disconnect the stream based on the rtp_timeout value defined in streamingserver.xml. The current workaround for this issue is to set the rtp_timeout property in QTSS to 0 (zero) which will disable this timeout feature. We are investigating supporting RTCP RR packets in a future release of Wowza Pro.
Note: If you experience problems getting either the audio or video to play through Flash, double check the version number of the Flash player (Flash player version 9.0.115.0 or above is required). If you still have problems, turn on Wowza Pro debug logging (edit [install-dir]/conf/log4j.properties and change the log4j.rootCategory on the first line from INFO to DEBUG), try the encoder several more times, zip up and send your [install-dir]/logs folder along with screen shots of the encoder setup screens and the LiveVideoStreaming player screen and send a detailed description of your problem to support@wowza.com.
See this post for troubleshooting tips:
Troubleshooting live streaming issues
Charlie