Troubleshoot problematic or failed RTSP streams between IP cameras and Wowza Video Legacy

The Wowza Video™ service offers a handful of advanced properties that you can use to troubleshoot streams that originate from IP cameras connected to Wowza Video over RTSP. If you experience problems such the stream not appearing in the Video Snapshot or not playing for your viewers, try the troubleshooting steps in this article.

There are so many cameras and so many variables that there isn't a one-size-fits-all solution for troubleshooting RTSP streams from IP cameras. Try these solutions one at a time and test your stream after each change. If it works, don't change anything else. If it doesn't work, reset the option to the default and try something else. If changing any individual setting doesn't work, then try combinations.

Important: Edit these settings with caution. For most RTSP source connections, none of these settings needs to be enabled or changed. Edit them only if your viewers experience failed playback of streams that are produced by cameras connected to Wowza Video via RTSP, transcoded, and sent to a Wowza CDN stream target for delivery.

Confirm that your IP camera supports H.264


First, make sure that your IP camera can successfully send H.264 content to Wowza Video. You can do this by using the VLC player, an open-source player by the VideoLAN organization.

  1. If necessary, download the VLC media player.
     
  2. Do one of the following:
  • (Windows) Click the Media menu and choose Open Network Stream.
  • (macOS) In the player window, click Open media and then click the Network tab of the Open Source dialog box.
  1. Enter your camera's RTSP URL and then click Play (Windows) or Open (macOS).
     
  2. After the stream starts playing, check the codec information:
  • (Windows) Click the Tools menu and choose Codec Information.
  • (macOS) Right click the URL in the playlist, choose Media Information, and then click the Codec Information tab of the Media Information window.
     
  1. Make sure that H.264 is listed.

If not, your camera isn't supported by Wowza Video.

Check or change the transport mode to address packet loss


Wowza Video can pull an RTSP stream from an IP camera by using one of two transport modes: UDP or interleave.

By default, Wowza Video uses interleave mode, which uses real-time transport protocol (RTP) and transmission control protocol (TCP) to deliver content. RTP includes timestamps for synchronization and sequence numbers to keep packets in order and to reduce loss. In addition, interleave mode sends all packets through port 554, reducing the need for a spectrum of open ports and the risk of firewalls blocking open ports. As a result, interleave may be slower UDP but it can be more reliable.

UDP, which stands for unreliable datagram (packet) protocol, uses TCP over UDP. In this mode, TCP controls transmission and UDP delivers the content. This mode doesn't include error-checking and allocates ports dynamically. It sends packets continually across the network, which can be faster but more error-prone.

If your RTSP streams experience high packet loss (playback freezes briefly and then resumes further along in the broadcast) or if your IP camera doesn't support RTP/TCP, switch from interleave to UDP in Wowza Video.

Notes:
  • If you're using TCP/UDP, be sure that UDP ports 0 through 65535 are open on your network.
     
  • Some mobile devices will roll over to RTP/TCP interleave if the carrier doesn't support UDP. If the device doesn't support RTP/TCP interleave, however, playback won't work if UDP is blocked by the carrier. To troubleshoot playback on a specific device, use the RTSP/RTP test stream on that device to see if it works.
     
  • Make sure you don't have other encoders using TCP port 554 while you're trying to stream from your IP camera. Otherwise, port conflicts may occur.

To change the transport mode in Wowza Video:

  1. Under Advanced on the left navigation bar, click Transcoders.
     
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the Transport Mode property and then specify UDP (TCP/UDP) or Interleave (RTP/TCP).

Turn off validation to prevent the camera from disconnecting


When connecting IP cameras to Wowza Video over RTSP, the service periodically tries to validate the connection. This may cause some IP cameras to disconnect. To prevent this from occurring, turn off RTSP validation by changing the Validation Frequency property.

  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the Validation Frequency property and then specify 0 to turn off validation. The default is 2000 ms (2 seconds).

Filter unknown tracks


Some IP cameras send application tracks or metadata that Wowza Video can't parse, which can cause the Video Snapshot preview to not appear in Wowza Video even though data shows for Inbound Bitrate: Actual. You can remove these tracks from the stream by using turning on the Filter Unknown Tracks property.

  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the Filter Unknown Tracks property and then specify True to remove the tracks from the RTSP source stream. The default, False, leaves unidentifiable tracks in the stream.

Fix out of sync audio and video


By default, Wowza Video uses Sender Report (SR) packets to synchronize audio and video tracks in a live stream. SR packets provide timing information, so Wowza Video has to wait for them in order to synchronize audio and video. If they don't arrive in a timely manner, audio and video may fall out of sync.

If audio and video are out of sync during playback, try giving Wowza Video more time to receive SR packets by increasing the SR timeout property. If that doesn't work, tell Wowza Video to use RTP stream packet timecodes instead to synchronize audio and video tracks in your stream.

  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the RTP Timeout property.
     
  5. Change the default value, 2000 ms, to something higher. The RTP Timeout value can be as high as 30000 ms.

If SR packets don't arrive within the maximum timeout period, or if audio and video are still out of sync when the maximum timeout period is specified, instruct Wowza Video to use RTP stream packets instead to synchronize audio and video.

  1. Select Enabled for the Set AV Sync to rtptimecode property and set it to True to tell Wowza Video to use RTP stream packet timecodes to synchronize the audio and video. If set to False (the default), Wowza Video uses SR packets for synchronization information.

Fix blank or corrupted video caused by a bad SDP message


By default, Wowza Video uses the sprop parameter data sets in a stream's Session Description Protocol (SDP) message to identify the stream's H.264 profile ID. The ID allows Wowza Video to recognize the requirements to decode the stream. However, many IP cameras publish an incorrect profile ID in the SDP message, which can cause the streamed video to be blank or corrupted.

If your stream is blank or corrupted during playback, instruct Wowza Video to use the sequence parameter set (SPS) and picture parameter set (PPS) in the stream's network abstraction layer (NAL) to derive the stream's H.264 profile ID instead.

Note: Not all source encoders or IP cameras provide SPS/PPS NAL data. If you instruct Wowza Video to ignore the SDP message in favor of NAL data and the IP camera doesn't provide it, the stream will fail. Check your camera's documentation to make sure it provides SPS/PPS NAL stream data before you instruct Wowza Video to use it.
  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the Ignore Profile Level ID property and then set the value to True. This tells Wowza Video to ignore the profile level ID in the sprop parameter data sets of the stream's SDP message when decoding the stream. The default, False, uses the ID in the decoding process.
     
  5. Select Enabled for the Ignore SProp Parameter Sets property and set it to True to tell Wowza Video to use the SPS/PPS NAL units in the stream to derive the H.264 profile level ID. The default, False, instructs Wowza Video to attempt to derive the H.264 profile ID from sprop parameter sets in the stream's SDP message.

Add jitter buffer to prevent timecodes arriving out of order


If you find that the timecodes on arriving stream data are out of order, it may be caused by source encoder performance issues or poor network conditions. In some cases, you can compensate for this by adding a jitter buffer. A jitter buffer is an area where packets can be collected and stored before being sent to the depacketizer at regularly spaced intervals to enable more even playback. Enabling a jitter buffer will increase the latency of your stream by a small amount, depending on your selected buffer settings.

  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the RTP Depacketizer Wrapper property and then enter RTPDePacketizerWrapperPacketSorter.
  5. Click Save.

    This turns on the jitter buffer but keeps the RTP Depacketizer Sorter Buffer Time set to its default value of 500 milliseconds and the RTP Depacketizer Sorter Flush Time property set to its default value of 10 milliseconds.
  6. If the timecode issue persists after making the adjustments above, try the following:
    1. Click Edit, then select Enabled for the RTP Depacketizer Sorter Buffer Time property and set it to something greater than 500.
    2. Select Enabled for the RTP Depacketizer Sorter Flush Time property and set it to something greater than 10

Generate advanced logs for failed connections


Every RTSP connection begins with a handshake that establishes the communications channel between the IP camera and Wowza Video. Handshakes can fail for any of a number of reasons, including security issues, an unknown or expired certificate, or an illegal parameter in the TCP request. If the handshake fails, the IP camera can't send the encoded stream to Wowza Video.

You can enable an advanced logging mode for RTSP streaming coming into Wowza Video that provides extra debug information about the RTSP handshake between Wowza Video and the RTSP/RTP source stream. Wowza Support can view the advanced log and provide guidance on how to resolve the handshake error.

  1. Under Advanced on the left navigation bar, click Transcoders.
  2. Select the RTSP transcoder.
     
  3. Click the Properties tab and then click Edit.
     
  4. Select Enabled for the Advanced Logging property and then set the value to True. The default, False, generates logs without handshake data.
     
  5. Contact Wowza Support for help resolving the problem.

More resources