• How to troubleshoot problematic or failed RTSP streams between IP cameras and Wowza Streaming Cloud

    The Wowza Streaming Cloud™ service offers a handful of advanced properties that you can use to troubleshoot streams that originate from IP cameras connected to Wowza Streaming Cloud 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 Streaming Cloud via RTSP, transcoded, and sent to a Wowza CDN stream target for delivery.

    Contents


    Confirm that your IP camera supports H.264
    Check or change the transport mode to address packet loss
    Turn off validation to prevent the camera from disconnecting
    Filter unknown tracks
    Fix out of sync audio and video
    Fix blank or corrupted video caused by a bad SDP message
    Generate advanced logs for failed connections
    More resources

    Confirm that your IP camera supports H.264


    First, perform a sanity check and make sure that your IP camera can successfully send H.264 content to Wowza Streaming Cloud. 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.

      • (OS X) In the player window, click Open media and then click the Network tab of the Open Source dialog box.

    3. Enter your camera's RTSP URL and then click Play (Windows) or Open (OS X).

    4. After the stream starts playing, check the codec information:

      • (Windows) Click the Tools menu and choose Codec Information.

      • (OS X) Right click the URL in the playlist, choose Media Information, and then click the Codec Information tab of the Media Information window.

    5. Make sure that H.264 is listed.

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

    Check or change the transport mode to address packet loss


    Wowza Streaming Cloud can pull an RTSP stream from an IP camera by using one of two transport modes: TCP over UDP or RTP over TCP (interleave).

    By default, Wowza Streaming Cloud uses TCP over UDP (TCP/UDP). TCP (transmission control protocol) numbers data packets so that they're received in order, reliably, and content isn't lost or corrupted in transit.

    UDP, which stands for unreliable datagram (packet) protocol, doesn't include error-checking and maintains an open connection to the source. It sends packets continually across the network, which can be faster and makes it ideal for live streaming.

    With TCP/UDP, TCP controls transmission and UDP delivers the content, offering reliable transmission and allowing the stream to start playing with minimal delay.

    Note: UDP allocates ports dynamically. If you're using TCP/UDP—which you are if you haven't changed anything in Wowza Streaming Cloud—be sure that UDP ports 0 through 65535 are open on your network.
    If your RTSP streams experience high packet loss (playback freezes briefly and then resumes further along in the broadcast) or if your network or routers filter or ignore UDP packets, switch to RTP over TCP (RTP/TCP), which is called Interleave in the Wowza Streaming Cloud.

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

    Notes:
    • 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.

    • Not all IP cameras support RTP/TCP. Check your camera's documentation or website to see if it does before you use try using RTP/TCP interleave mode.

    • 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 Streaming Cloud:

    1. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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 Streaming Cloud 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. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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 Streaming Cloud can't parse, which can cause the Video Snapshot preview to not appear in Wowza Streaming Cloud 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. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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 Streaming Cloud uses Sender Report (SR) packets to synchronize audio and video tracks in a live stream. SR packets provide timing information, so Wowza Streaming Cloud 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 Streaming Cloud more time to receive SR packets by increasing the SR timeout property. If that doesn't work, tell Wowza Streaming Cloud to use RTP stream packet timecodes instead to synchronize audio and video tracks in your stream.

    1. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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 Streaming Cloud to use RTP stream packets instead to synchronize audio and video.

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

    Fix blank or corrupted video caused by a bad SDP message


    By default, Wowza Streaming Cloud 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 Streaming Cloud 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 Streaming Cloud 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 Streaming Cloud 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 Streaming Cloud to use it.
    1. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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 Streaming Cloud 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 Streaming Cloud to use the SPS/PPS NAL units in the stream to derive the H.264 profile level ID. The default, False, instructs Wowza Streaming Cloud to attempt to derive the H.264 profile ID from sprop parameter sets in the stream's SDP message.

    Generate advanced logs for failed connections


    Every RTSP connection begins with a handshake that establishes the communications channel between the IP camera and Wowza Streaming Cloud. 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 the IP camera can't send the encoded stream to Wowza Streaming Cloud.

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

    1. Click Advanced on the menu bar and then click Transcoders.

    2. Select the RTSP transcoder in the Transcoders panel.

    3. Click the Protocol 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




    Originally Published: 02-03-2016.
    Updated: 09-08-2016.

    If you're having problems or want to discuss this article, post in our forum.