Re-stream video from an IP camera (RTSP/RTP re-streaming) in Wowza Streaming Engine

Learn how to publish a live stream from an IP camera to Wowza Streaming Engine™ media server software for playback on a wide variety of players.

Video tutorial: Send video from an IP camera to Wowza Streaming Engine


Configuration


You can configure live-streaming applications by using Wowza Streaming Engine Manager or by editing Application.xml. Both methods produce the same result; using Wowza Streaming Engine Manager is recommended.

Configure a live application in Wowza Streaming Engine Manager

The easiest way to set up a live-streaming application is to use Wowza Streaming Engine Manager. Live streams are sent to the streaming engine from an IP camera over the RTSP protocol. This task uses the live application that's included in Wowza Streaming Engine but also includes instructions on how to create a new live-streaming application.

Wowza Streaming Engine Manager works on most web browsers that support HTML5 and Cascading Style Sheets level 3 (CSS 3). We recommend Google Chrome.

  1. Make sure Wowza Streaming Engine Manager is running. See Start and stop Wowza Streaming Engine software.
     
  2. In Wowza Streaming Engine Manager, click Applications at the top of the page.
     
  3. Configure the live application:
     
    1. In the Applications contents panel, click live, and then click Edit. (If you want to create a new live-streaming application, click Add Application in the contents panel, click Live, and follow the instructions that appear onscreen.)


       
    2. Select all of the Playback Types, and then click Save.


       

Note: A "Saved!" alert appears after each configuration change. However, wait until all changes are complete before you restart.

  1. Configure playback authentication:
     
    1. In the contents panel, click Playback Security, and then click Edit.


       
    2. On the Playback Security page, select No client restrictions, and then click Save.

  2. Click Restart Now.
     

Publish the stream in Wowza Streaming Engine Manager

Now create a .stream file to publish your live stream to Wowza Streaming Engine.

  1. Consult your camera's documentation to configure an outgoing live stream.
     
  2. Create the .stream file:
     
    1. In the Server contents panel, click Stream Files, and then click Add Stream File.


       
      Note: You can also start the procedure to create a .stream file in the Applications contents panel for the live application.
    2. In the Add Stream File dialog box, enter a name for the new stream file, enter Stream URI, and then click Add.



      IP camera manufacturers use proprietary URL syntax. Consult your camera documentation for the URL syntax of the stream and enter this value in Stream URI. For more information, see Common IP camera RTSP URL formats for use with Wowza Streaming Engine.

  3. Start the stream:
     
    1. In the Server contents panel, click Stream Files, and then click the Connect icon for the stream file you created in step 2.


       
    2. In the Connect a Stream File dialog box, select live in Application Name and rtp in MediaCaster Type, and then click OK.

A message appears indicating the connection is successful.

Configure a live application in XML

Configuring the live-streaming application in XML is an alternative to configuring it in Wowza Streaming Engine Manager. Here's how to configure the live application by editing the Application.xml configuration file.

Note: Wowza Media Server™ software doesn't support Wowza Streaming Engine Manager, so you must edit Application.xml if you're running Wowza Media Server.
  1. Create the folder [install-dir]/applications/live.
     
  2. Create the folder [install-dir]/conf/live and copy [install-dir]/conf/Application.xml to this new folder.
     
  3. Open the newly copied Application.xml file in a text editor and confirm or set the following properties:
     
    1. Set the Streams/StreamType property to:
       
      <StreamType>live</StreamType>
    2. Set the HTTPStreamers property to:
       
      <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming,mpegdashstreaming</HTTPStreamers>
    3. Set the Streams/LiveStreamPacketizers property to:
       
      <LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, mpegdashstreamingpacketizer</LiveStreamPacketizers>
    4. Set the RTP/Authentication/PlayMethod property to:
       
      <PlayMethod>none</PlayMethod>
  4. Restart Wowza Streaming Engine or Wowza Media Server.

Publish the stream in XML

  1. Use a text editor to create the file [install-dir]/content/camera.stream and set the contents of this file to the full RTSP/RTP URL of the camera. The file must have a .stream file name extension. For this example, we use camera.stream.
     
    Note: IP camera manufacturers use proprietary URL syntax for their cameras. Consult your camera documentation for the URL syntax of the stream and enter this value into the camera.stream file. For more information, see Common IP Camera RTSP URL formats.
  2. Using a text editor, edit the file [install-dir]/conf/admin.password and add a user name and password to use to start and stop the publishing of the MPEG-TS stream. In the following example, the user name is myUser and the password is myPassword:
     
    # Admin password file (format [username][space][password])
    # username password
    myUser myPassword
  3. Start the Wowza Streaming Engine or Wowza Media Server.
     
  4. Use Stream Manager to start the stream:
     
    1. Enter the following URL in a web browser:
       
      http://[wowza-ip-address]:8086/streammanager


       
    2. In the Security dialog box, enter your admin user name and password from step 2.
       
    3. In the Stream Manager webpage, click the [start-receiving-stream] link just below the live application folder.
       
    4. In the Start Receiving Stream dialog box, select the following MediaCaster Type option: rtp.
       
    5. In the Stream Name field, enter camera.stream.
       
    6. Click OK.

Test playback

In Wowza Streaming Engine Manager, click Test Players in the upper-right corner of the live application page.

The Test Players window is preconfigured to stream the live stream named myStream over various streaming formats.

Each tab in the Test Players window either hosts a test player that can play the live stream, or provides instructions for playing the live stream. For example, to use the Adobe HDS protocol to play camera.stream, click the Adobe HDS tab, enter the information below, and then click Start.

  • Server – Enter [wowza-ip-address]:1935
  • Application – Enter live
  • Stream – Enter camera.stream

The result when using the Adobe HDS tab on the player is the URL:

http://[wowza-ip-address]:1935/live/camera.stream/manifest.f4m

Where [wowza-ip-address] is the IP address or the domain of the Wowza Streaming Engine server.

The players are also online on our Video Test Players webpage.

Configure adaptive-bitrate streaming

To implement adaptive-bitrate streaming you can ingest camera.stream through Wowza Transcoder to create a Synchronized Multimedia Integration Language (SMIL) file. For details, see Create and play SMIL files with streams created by Wowza Transcoder.

Troubleshooting


Check your IP camera source

First, make sure your camera can send H.264, AAC, or MP3 content. You can do this by using the VideoLAN VLC player.

  1. Open the VLC player.
     
  2. On the Media menu, click Open Network Stream, enter your camera's RTSP URL, and then click Play.
     
  3. After the stream starts playing, on the Tools menu, click Codec Information, and make sure that one or two of the following codecs are listed:
     
    • H.264 or AVC1 or MPEG4 Part10
       
    • AAC
       
    • MP3
Note: If your camera doesn't support the proper formats, the stream must be transcoded before it's sent to Wowza Streaming Engine.

Check your UDP port

If you're delivering streams for playback over RTSP/RTP, be sure that UDP ports 0-65535 are open and properly mapped to your Wowza Streaming Engine server.

Note: To configure Wowza Streaming Engine for RTSP/RTP streaming, follow the instructions in How to troubleshoot RTSP/RTP playback.

Change the RTP transport mode

If your camera doesn't support RTSP/RTP interleaved (RTP over TCP), change the RTPTransportMode property from interleave to udp.

Editing the RTP transport mode in Wowza Streaming Engine Manager requires specifying per-stream settings in a .stream file. For instructions, see How to specify per-stream RTSP settings in stream files.

To edit the RTP transport mode in XML, open the [install-dir]/conf/[application]/Application.xml file for your live application and change RTPTransportMode property as follows:

<MediaCaster>
     <RTP>
          <RTSP>
               <!-- udp, interleave -->
     		<RTPTransportMode>udp</RTPTransportMode>
          </RTSP>
     </RTP>
     ...
</MediaCaster>

Then, restart Wowza Streaming Engine to apply the changes.

Note: Changes to RTPTransportMode in Application.xml apply to all streams delivered by the application. For information on changing RTSP properties for a single stream, see How to specify per-stream RTSP settings in stream files.

Force MPEG-TS output

When streaming out using RTSP/RTP, you can force the output to MPEG-TS, which is required by many set-top boxes. For more information, see How to generate and control MPEG-TS output for set-top boxes.

Turn off RTSP validation

Some IP cameras may fail when Wowza Streaming Engine tries to periodically validate the RTSP/RTP connection. The camera will disconnect and reconnect every 15 to 30 seconds. You can turn off RTSP/RTP validation by adding the rtspValidationFrequency property to your application.

Turn off RTSP validation in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspValidationFrequency
       
    • Type - Select Integer
       
    • Value - Enter 0 (ms). Specifying 0 turns validation off.
  5. Click Save, and then restart the application to apply the changes.

Turn off RTSP validation in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <MediaCaster>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>rtspValidationFrequency</Name>
        <Value>0</Value>
        <Type>Integer</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.
Note: The MediaCaster rtspValidationFrequency property applies to all streams delivered by the application. For information on changing RTSP properties for a single stream, see How to specify per-stream RTSP settings in stream files.

Filter unknown tracks

Some IP cameras send additional application tracks that Wowza Streaming Engine can't understand. You can filter these tracks by adding the rtspFilterUnknownTracks property.

Filter unknown tracks in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspFilterUnknownTracks
       
    • Type - Select Boolean
       
    • Value - Enter true
  5. Click Save, and then restart the application to apply the changes.

Filter unknown tracks in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <MediaCaster>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>rtspFilterUnknownTracks</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.
Note: The MediaCaster rtspFilterUnknownTracks property applies to all streams delivered by the application. For information on changing RTSP properties for a single stream, see How to specify per-stream RTSP settings in stream files.

Turn audio or video tracks off

You can turn off audio or video tracks by adding the rtspStreamAudioTrack and rtspStreamVideoTrack custom properties.

Turn audio or video tracks off in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspStreamAudioTrack
       
    • Type - Select Boolean
       
    • Value - Enter false
  5. Repeat Step 4 to add the rtspStreamVideoTrack property using the following values:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspStreamVideoTrack
       
    • Type - Select Boolean
       
    • Value - Enter false
  6. Click Save, and then restart the application to apply the changes. 

Turn audio or video tracks off in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following properties to the <MediaCaster>/<Properties> container. Be sure to add the properties to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
    	<Name>rtspStreamAudioTrack</Name>
    	<Value>false</Value>
    	<Type>Boolean</Type>
    </Property>
    <Property>
    	<Name>rtspStreamVideoTrack</Name>
    	<Value>false</Value>
    	<Type>Boolean</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.
Notes:

Find missing audio or video

To determine if audio or video is missing from the IP camera source, check Wowza Streaming Engine logs for either of the following warning statements:

RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: SDP data missing rtpmap entry for [audio] track. Try adding MediaCaster/Property rtspDefaultAudioRTPMap with track media information.
RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: SDP data missing rtpmap entry for [video] track. Try adding MediaCaster/Property rtspDefaultVideoRTPMap with track media information.

If either or both statements are present, add the missing track of tracks.

Add missing tracks in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspDefaultAudioRTPMap
       
    • Type - Select String
       
    • Value - Enter PCMU/8000
  5. Click Save, and then restart the application to apply the changes.

Add missing tracks in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <MediaCaster>/<Properties> container with the proper media definition information. For example: for a G.711 µ-law audio track, the entry might look like the code below. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property> 
          <Name>rtspDefaultAudioRTPMap</Name> 
          <Value>PCMU/8000</Value>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.

Add RTSP debugging to the log

You can include debug information in the log file about the RTSP handshake between Wowza Streaming Engine and the IP camera (RTSP/RTP source) by adding the debugRTSPSession property.

Add RTSP debugging to the log in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter debugRTSPSession
       
    • Type - Select Boolean
       
    • Value - Enter true
  5. Click Save, and then restart the application to apply the changes. 

Add RTSP debugging to the log in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <MediaCaster>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>debugRTSPSession</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.

Remove extraneous file extensions from .stream files

Many text editors append a .txt extension to the camera.stream file name, which results in an error message such as:

SDP file missing: c:/program files/wowza media systems/wowza streaming engine [version]/content/camera.stream

To fix this, go to the [install-dir]/content folder and manually remove the .txt extension from the file name.

Change the AAC packetization method

Wowza Streaming Engine can use the mpeg4-generic or mp4a-latm (3gpp) packetization method to output AAC audio. The default packetization method is mpeg4-generic, but you can switch it.

Change the AAC packetization method in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar or scroll to the bottom of the page.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path – Select /Root/Application/RTP
       
    • Name – Enter audioPacketizerAAC
       
    • Type – Select String
       
    • Value – Enter com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM
  5. Click Save, and then restart the application to apply the changes.

Change the AAC packetication method in XML

To switch to mp4a-latm (3gpp):
 
  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <RTP>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>audioPacketizerAAC</Name>
        <Value>com.wowza.wms.rtp.packetizer.RTPPacketizerMPEG4LATM</Value>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.

Remove proprietary data (Flash playback)

Some IP cameras send proprietary data as part of the H.264 stream that can cause pauses or glitches during Flash playback. You can filter this data by adding the nalUnitFilter property.

Add the nalUnitFilter property in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/Streams
       
    • Name - Enter nalUnitFilter
       
    • Type - Select Integer
       
    • Value - Enter 13
  5. Click Save, and then restart the application to apply the changes.

Add the nalUnitFilter property in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <Streams>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>nalUnitFilter</Name>
        <Value>13</Value>
        <Type>Integer</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes.

Fix problematic SDP files

Many IP cameras incorrectly publish the H.264 profile-level-id value in the Session Description Protocol (SDP) message. This can cause the video to be blank or corrupted. You can configure the rtpIgnoreProfileLevelId property in Wowza Streaming Engine to ignore the profile-level-id value in the SDP data and instead derive the value from the sprop-parameter-sets.

Fix problematic SDP files in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/RTP
       
    • Name - Enter rtpIgnoreProfileLevelId
       
    • Type - Select Boolean
       
    • Value - Enter true
  5. Click Save, and then restart the application to apply the changes.

Fix problematic SDP files in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <RTP>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>rtpIgnoreProfileLevelId</Name>
        <Value>true</Value>
        <Type>Boolean</Type>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes. 
Note: The RTP rtpIgnoreProfileLevelId property applies to all streams delivered by the application. For information on changing RTSP properties for a single stream, see How to specify per-stream RTSP settings in stream files.

Check the RTSP KeepAlive property

Some IP cameras require a keepalive to be sent as the GET_PARAMETER to keep the connection open. This can be sent by adding the rtspKeepAliveCommand property.

Set the keep alive property in Wowza Streaming Engine Manager

  1. Click the Applications tab and then click the name of your live application in the contents panel.
     
  2. On the Properties tab of the live application page, click Custom in the Quick Links bar.
     
    Note: Access to the Properties tab is limited to administrators with advanced permissions. For more information, see Manage credentials.
  3. In the Custom area, click Edit.
     
  4. Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
     
    • Path - Select /Root/Application/MediaCaster
       
    • Name - Enter rtspKeepAliveCommand
       
    • Type - Select String
       
    • Value - Enter GET_PARAMETER
  5. Click Save, and then restart the application to apply the changes.

Set the keep alive property in XML

  1. Use a text editor to open the [install-dir]/conf/[application]/Application.xml file for your live application and add the following property to the <MediaCaster>/<Properties> container. Be sure to add the property to the correct <Properties> container in Application.xml, as there are several in the file.
     
    <Property>
        <Name>rtspKeepAliveCommand</Name>
        <Value>GET_PARAMETER</Value>
    </Property>
  2. Restart Wowza Streaming Engine to apply the changes. 
Note: The MediaCaster rtspKeepAliveCommand property applies to all streams delivered by the application.

More resources