Wowza Community

Re-streaming an RTSP stream through Wowza Pro (RTSP/RTP)

Hi,

I am evaluating Wowza Media Server Pro for a SaaS solution. But I got some troube when streaming from a AXIS 207MW camera. Iam using Wowza Media Server Pro 1.7.2 + WowzaMediaServerPro1.7.0-patch21.zip and added the property’s described in this thread.

First I tried to stream via vlc using rtsp (vlc rtsp://172.16.10.51:554/mpeg4/media.amp), this works perfectly. But when I try to stream to Wowza I don’t see the live video. (Iam using the LiveVideoStreaming example.)

Server: rtmp://172.16.9.140/live-stream

Stream: rtsp://172.16.10.51/mpeg4/med

I got the following output:

(forceInterleaved -> disabled / Only a snippet, cause’ many thousand lines, This seems like stream data, but dunno)

DEBUG server comment - checkFlush[true,false,50]: tc:1250597684125>1250597684105 || rt:1250597684144>1250597684042
DEBUG server comment - flush: notify:false tSize:1 dataObjs:72 time:152 tOffset:-89
DEBUG server comment -   writePacket[vid]: sz:19478 tc:1250597684125:1120469521:1250597684144 key:false
DEBUG server comment - checkFlush[false,false,50]: tc:1250597684125>1250597684175 || rt:1250597684145>1250597684194
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 30 42 c9 4b 69 43 3b 77 83 00 00 01 b6 }
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 31 42 c9 4b 69 43 3b 77 83 f8 1c 50 14 }
DEBUG server comment -   STAP-A: end:false tc:1120488297
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 32 42 c9 4b 69 43 3b 77 83 8c 30 6f 18 }
DEBUG server comment -   SINGLE: end:false tc:1120488297 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 33 42 c9 4b 69 43 3b 77 83 60 14 ad b0 }
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 34 42 c9 4b 69 43 3b 77 83 02 9f 05 51 }
DEBUG server comment -   SINGLE: end:false tc:1120488297 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 35 42 c9 4b 69 43 3b 77 83 30 bc 95 3c }
DEBUG server comment -   SINGLE: end:false tc:1120488297 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 36 42 c9 4b 69 43 3b 77 83 29 22 7a d2 }
DEBUG server comment -   SINGLE: end:false tc:1120488297 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 37 42 c9 4b 69 43 3b 77 83 21 4a f8 38 }
DEBUG server comment -   SINGLE: end:false tc:1120488297 sz:1460
DEBUG server comment - rtp[trackID=1:1107] {80 e0 65 38 42 c9 4b 69 43 3b 77 83 59 3b 58 c9 }
WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: STAP-B
DEBUG server comment -   nalUnit: hdr:24 sz:1459:13750 typ:DPC
DEBUG server comment -   nalUnit: hdr:b1 sz:1460:13750 typ:17
DEBUG server comment -   nalUnit: hdr:d3 sz:1460:13750 typ:AUXILIARY_SLICE
DEBUG server comment -   nalUnit: hdr:c2 sz:1460:13750 typ:DPA
DEBUG server comment -   nalUnit: hdr:10 sz:1460:13750 typ:16
DEBUG server comment -   nalUnit: hdr:b sz:1460:13750 typ:END_STREAM
DEBUG server comment -   nalUnit: hdr:11 sz:1460:13750 typ:17
DEBUG server comment -   nalUnit: hdr:81 sz:1460:13750 typ:SLICE
DEBUG server comment -   sliceType:1 frameType:3
DEBUG server comment -   nalUnit: hdr:d sz:1460:13750 typ:SPS_EXT
DEBUG server comment -   nalUnit: hdr:a9 sz:571:13750 typ:AUD
DEBUG server comment -   writePacket[vid]: sz:13755 tc:1250597684264:1120482037:1250597684184 key:false
DEBUG server comment - checkFlush[true,false,50]: tc:1250597684264>1250597684175 || rt:1250597684184>1250597684194
DEBUG server comment - flush: notify:false tSize:2 dataObjs:73 time:40 tOffset:-188
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 39 42 c9 63 dd 43 3b 77 83 00 00 01 b6 }
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3a 42 c9 63 dd 43 3b 77 83 d3 07 bb 58 }
DEBUG server comment -   SINGLE: end:false tc:1120494557 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3b 42 c9 63 dd 43 3b 77 83 bd 80 37 04 }
WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: FU-B
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3c 42 c9 63 dd 43 3b 77 83 d9 ac 5d 20 }
WARN server comment - RTPDePacketizerRFC3984H264.handleRTPPacket: Unsupported packet type: STAP-B
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3d 42 c9 63 dd 43 3b 77 83 b0 06 21 60 }
DEBUG server comment -   SINGLE: end:false tc:1120494557 sz:1460
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3e 42 c9 63 dd 43 3b 77 83 1c c1 b3 e0 }
DEBUG server comment -   FU-A: end:false tc:1120494557 st:true
DEBUG server comment - rtp[trackID=1:1472] {80 60 65 3f 42 c9 63 dd 43 3b 77 83 80 e3 6d 62 }
DEBUG server comment - rtp[trackID=1:1397] {80 e0 65 40 42 c9 63 dd 43 3b 77 83 c8 60 8d ec }
DEBUG server comment -   SINGLE: end:true tc:1120494557 sz:1385
DEBUG server comment -   nalUnit: hdr:8c sz:1460:7320 typ:FILLER_DATA
DEBUG server comment -   nalUnit: hdr:2 sz:1460:7320 typ:DPA
DEBUG server comment -   nalUnit: hdr:30 sz:1460:7320 typ:16
DEBUG server comment -   nalUnit: hdr:29 sz:1460:7320 typ:AUD
DEBUG server comment -   nalUnit: hdr:21 sz:1460:7320 typ:SLICE
DEBUG server comment -   sliceType:1 frameType:3
DEBUG server comment -   writePacket[vid]: sz:7325 tc:1250597684333:1120488297:1250597684261 key:false
DEBUG server comment - checkFlush[true,false,50]: tc:1250597684333>1250597684314 || rt:1250597684261>1250597684234
DEBUG server comment - flush: notify:false tSize:1 dataObjs:73 time:77 tOffset:-180

(forceInterleaved-> Enabled)

]DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.send(open): command:GET_PARAMETER
DEBUG server comment -   cseq: 4
DEBUG server comment -   uri: RTSP/1.0 200 OK
DEBUG server comment -   protocol: RTSP/1.0
DEBUG server comment -   status: 200
DEBUG server comment -   response: OK
DEBUG server comment -   cseq: 4
DEBUG server comment - *** RTSPMessageReceive ***
RTSP/1.0 200 OK
response: OK
protocol: RTSP/1.0
cseq: 4
status: 200
uri: RTSP/1.0 200 OK
DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: command:GET_PARAMETER response:RTSP/1.0 200 OK status:200 handled:false
DEBUG server comment - send[1139941015]: size:0 filter:7 time:252 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:251 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:252 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:250 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:253 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:251 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:252 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:258 tOffset:0
DEBUG server comment - send[1139941015]: size:0 filter:7 time:246 tOffset:0

hi charlie

my self venkat from mascon global limited,I have facing RTSP Streaming problem.The problem statement is as follows

My camera pushing data in the form of rtsp(rtsp://172.16.50.11/12345)i want to retransmit using WowzaMedaiServer ,I have installed the trail verssion of the server.i found some of the example were there in installation package,i picked the"Live streamvideo "example,in that example it is picking up only rtmp url as an input not rtsp.how to retransmit the RTSP stream again using WowzMediaServer?

please help us

Thanks in advance

Thanks

venkat

I’m having a disconnect on where to point to the stream to use when using the flowplayer or JW viewer.

I was able to get our axis live stream to work using the the live.html example, but I typed in the stream name to the camera directly into the .swf just at the bottom of the wowza viewer.

how do i associate this with the JW or flowplayer viewer? By “this” i mean the stream name rtsp://[camera-ip-address]:554/axis-media/media.amp as an example. Obviously i’ll update our camera ip address in the stream name. Is this defined somehwere in the application.xml?

We have the streaming of video working properly. Is there a trick to stream the sound and play in jw player?

Hi, Charlie,

I tried the instructions in this article step by step, but got this in the error log:

RTSPCore.handleMessage: java.lang.NullPointerException

Could you tell me what’s wrong with it?

regards

Chen Fan

Step by step instructions for Re-streaming and RTSP stream through Wowza Pro.

  • Download and install Wowza Media Server Pro (version: Wowza Pro 1.7.0 or greater is required)

  • Download and install the most recent patch to get RTSP/RTP interleaving feature: http://www.wowza.com/devbuild.html

  • 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>
    
    
  • Startup the Wowza Pro server

  • To play the stream, double click [install-dir]/examples/LiveVideoStreaming/client/live.html enter the following information 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])
    
    

    Where [server-ip-address] is the ip address of the server running Wowza Pro and [encoder-ip-address] is the ip address of the RTSP device.

    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:

    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:

    where [camera-ip-address] is the ip adress of the Axis camera.

    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 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

    HI,

    I managed to stream video from a rtsp stream, but I can not get audio … my test is: www.meway.it/clienti/genius

    With vlc I can receive audio and video from the address rtsp://212.103.211.83:554/geniustv_live

    I hope you can help me!

Hi, also wanted to use your WOWZA server to test our AXIS camera stream with the streaming server. So i installed the Wowza Media Server Developer on my machine, configured it like in the first post.

When i run examples/LiveVideoStreaming/client/live.html and put the URL for the axis cam:

rtsp://CAM-IP:554/axis-media/media.amp

There is no output :frowning:

when i use the same URL in the VLC player it runs!

Is the wowza server version wrong(developer) ? any ideas?

My last ouput in the console which is running:

INFO vhost comment defaultVHost Bind attempt ([any]:1935:4)

INFO vhost comment defaultVHost Bind successful ([any]:1935)

INFO vhost comment defaultVHost Bind attempt ([any]:8086:1)

INFO vhost comment defaultVHost Bind successful ([any]:8086)

… by the fact that Wowza Pro does not send RTCP Receiver Report packets back … We are investigating supporting RTCP RR packets in a future release of Wowza Pro.

Have RTCP Receiver Reports been implemented? I am not seeing any RTCP RR packets coming back from Wowza. I am using the latest Developer install for testing.

Wowza Pro does not support live pause. So the pause button in the FlowPlayer player will not work properly. This is most likely the issue. Only play and stop are going to work correctly with live video.

Charlie

From these log statements it looks as though the server running Wowza Pro cannot reach the camera. Is there a way to test connectivity between the server running Wowza Pro and the camera? It looks like the camera and server running Wowza Pro are on different networks: 192.168.1.56 and 192.161.1.34. Are you sure they have access to each other?

Charlie

It sounds like it might be some kind of firewall issue. The RTSP session is used to negotiate the port numbers. Wowza Media Server does not enforce an uppper limit. We start at 6970 and move up reusing ports as they are no longer being used. The camera controls the port numbering on its end but Wowza Media Server controls the ports it is going to use for streaming. If you can turn on debug logging and log a session with the camera and I can take a look at it.

Charlie

Did you setup an application named live or rtplive? Try connecting with the following info:

Server: rtmp://localhost/rtplive
Stream: rtsp://192.168.1.13/h264.sdp?res=half&x0=0&y0=0&x1=1600&y1=1200&qp=30& ssn=1&doublescan=0 

Charlie

I don’t see a memory error in the logs you posted. Either way, please zip up and send me your conf and logs folder so I can have a look at it (charlie@wowza.com).

Charlie

This all looks correct. Try turning on debug logging (edit conf/log4j.properties and change the log level on the first line from INFO to DEBUG and start Wowza) and try it again and send me the debug logs (charlie@wowza.com).

Charlie

This camera does not support H.264/AAC. The AXIS 207MW camera only support MPEG-4 and motion JPEG neither of which are supported by Wowza Media Server and Flash. That is why it does not work.

Charlie

I take that back. Looking at the specs more closely I see both cameras say they support H.264. Is this camera available on the Internet. If it is I can give it a quick try. Send me the RTSP url to the camera (charlie@wowza.com).

Charlie

Wowza Media Server and the Flash player only support H.264/AAC. So neither MPEG-2 or MPEG-4 are going to work properly. We do not have a way to transcode the stream on the fly. Some folks have had luck using VLC to accomplish this but it is very tricky to setup and not super stable.

Charlie

It sounds like you application is not setup properly. You should not be getting packet loss if you are using interleaved mode. Post your Application.xml file so we can take a look at it.

Charlie

What do you seen in the logs when Wowza connects to the stream? If you are truley using interleaved mode the log entries should look different. Post the log entries that show the connection since you have changed this setting.

Charlie

We always suggest interleaving. It was just misconfigured (commented out) in your config. It avoids packet loss by sending the video/audio packets over lossless TCP rather then UDP.

Charlie