Wowza Community

how to use vlc to provide rtsp stream to wowz server?

i am trying to use vlc to stream a rtsp stream to wowza server.

this is my vlc setting:

:sout=#duplicate{dst=rtp{sdp=rtsp://:8554/test.sdp},dst=display} :sout-keep

this is my wowza server setting:

rtsp.stream:

rtsp://10.136.38.57:8554/test.sdp

this is my wowza server info:

1

2

2

0

0.0

3.0

defaultVHost

5473.254

0

1

2

2

0

0.0

3.0

live

loaded

5453.598

1

2

2

0

0.0

3.0

definst

5453.582

1

2

2

0

0.0

3.0

rtsp.stream

1

0

0

0

0

1

i can use vlc to get stream and play the video,but i can get the re-published stream from wowza server

and the 0.0

3.0 always be 0 .

and i got this from logs

RTPSessionDescriptionDataProviderBasicRTSPWorker.sessionStart: PLAY: rtsp://10.136.38.57:8554/test.sdp - - - 4068.373 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:20:55 PDT comment server INFO 200 - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: PLAY: rtsp://10.136.38.57:8554/test.sdp - - - 4068.373 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:20:55 PDT comment server INFO 200 - RTPMediaCaster.Reconnector[1484233049:live/definst:rtsp.stream]: done: 157 - - - 4068.378 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:21:07 PDT comment server INFO 200 - RTPMediaCaster.streamTimeout[1484233049:live/definst:rtsp.stream]: timeout:12000 diff:12025 reason:101 - - - 4080.542 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:21:07 PDT comment server INFO 200 - RTPMediaCaster.resetConnection[1484233049:live/definst:rtsp.stream]: - - - 4080.542 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:21:07 PDT comment server INFO 200 - RTPMediaCaster.closeRTPSession[1484233049:live/definst:rtsp.stream] - - - 4080.542 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:21:07 PDT comment server INFO 200 - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession - - - 4080.542 - - - - - - - - - - - - - - - - - - - - - - - - -

2012-07-04 22:21:07 PDT comment server INFO 200 - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose - - - 4080.544 -

You are missing the IP address in the RTSP URL of the VLC command. The Wowza example use mpeg-ts output

https://www.wowza.com/docs/how-to-use-vlc-as-a-live-stream-encoder-with-wowza-media-server-mpeg-ts

Richard

Try adding this to the Application.xml /MediaCaster Properties list

<Property>
    <Name>rtspValidationFrequency</Name>
    <Value>0</Value>
    <Type>Integer</Type>
</Property>

That is from trouble-shooting section of the IP camera tutorial, which has other things to try if that does not help.

https://www.wowza.com/docs/how-to-re-stream-video-from-an-ip-camera-rtsp-rtp-re-streaming#cameraSpecific

Richard

I don’t think I missed the ip,i think that means all ips of that server will be accepted.Because I can use this url “rtsp://10.136.38.57:8554/test.sdp” on vlc to play the stream,but i will try to add the specific ip and try again.

i tried to add specific ip in vlc command

:sout=#duplicate{dst=rtp{sdp=rtsp://192.168.1.3:8554/test.sdp},dst=display} :sout-keep

and my rtsp.stream is

rtsp://192.168.1.3:8554/test.sdp

still it works on vlc but no luck on wowza server:<

still dose’t work,the log is

Dose this “INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/definst]: RTSP/RTP re-streaming. Success, received SDP data.” mean that wowza server has already get the sdp data from the url and this is not a network issue which caused the problem?

INFO stream create - -
INFO stream publish rtsp.stream -
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.sessionStart: PLAY: rtsp://192.168.1.3:8554/test.sdp
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: PLAY: rtsp://192.168.1.3:8554/test.sdp
INFO server comment - RTPMediaCaster.Reconnector[74291610:live/_definst_:rtsp.stream]: done: 3
INFO server comment - RTPMediaCaster.streamTimeout[74291610:live/_definst_:rtsp.stream]: timeout:12000 diff:12019 reason:101
INFO server comment - RTPMediaCaster.resetConnection[74291610:live/_definst_:rtsp.stream]:
INFO server comment - RTPMediaCaster.closeRTPSession[74291610:live/_definst_:rtsp.stream]
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose
INFO server comment - RTPSessionTracker.remove[rtsp://192.168.1.3:8554/test.sdp]: 0:true
INFO stream unpublish rtsp.stream -
INFO stream destroy rtsp.stream -
INFO server comment - RTPMediaCaster.Reconnector[74291610:live/_definst_:rtsp.stream]: start: 4
INFO server comment - RTPSessionTracker.add[rtsp://192.168.1.3:8554/test.sdp]: 1
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: sessionId:null sessionTimeout:0
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: RTSP/RTP re-streaming. Success, received SDP data.

Some detailed log(debug level)

DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.send(open): command:DESCRIBE:rtsp://192.168.1.3:8554/test.sdp
DESCRIBE rtsp://192.168.1.3:8554/test.sdp RTSP/1.0
CSeq: 1
Accept: application/sdp
User-Agent: Wowza Media Server Pro (Wowza Media Server 3 Developer Edition (Expires: Dec 25, 2012) 3.1.2 build1624)
INFO server comment - RTPSessionTracker.add[rtsp://192.168.1.3:8554/test.sdp]: 1
DEBUG server comment -   server: VLC/2.0.2
DEBUG server comment -   date: Thu, 05 Jul 2012 15:47:27 GMT
DEBUG server comment -   content-type: application/sdp
DEBUG server comment -   content-base: rtsp://192.168.1.3:8554/test.sdp
DEBUG server comment -   content-length: 718
DEBUG server comment -   cache-control: no-cache
DEBUG server comment -   cseq: 1
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 -   server: VLC/2.0.2
DEBUG server comment -   date: Thu, 05 Jul 2012 15:47:27 GMT
DEBUG server comment -   content-type: application/sdp
DEBUG server comment -   content-base: rtsp://192.168.1.3:8554/test.sdp
DEBUG server comment -   content-length: 718
DEBUG server comment -   cache-control: no-cache
DEBUG server comment -   cseq: 1
DEBUG server comment - *** RTSPMessageReceive ***
RTSP/1.0 200 OK
cache-control: no-cache
content-type: application/sdp
response: OK
protocol: RTSP/1.0
cseq: 1
status: 200
content-length: 718
content-base: rtsp://192.168.1.3:8554/test.sdp
server: VLC/2.0.2
date: Thu, 05 Jul 2012 15:47:27 GMT
uri: RTSP/1.0 200 OK
DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: command:DESCRIBE response:RTSP/1.0 200 OK status:200 handled:false
DEBUG server comment - v=0
o=- 15249247226952714186 15249247226952714186 IN IP4 shadowlin-nbook
s=Unnamed
i=N/A
c=IN IP4 0.0.0.0
t=0 0
a=tool:vlc 2.0.2
a=recvonly
a=type:broadcast
a=charset:UTF-8
a=control:rtsp://192.168.1.3:8554/test.sdp
m=audio 0 RTP/AVP 96
b=RR:0
a=rtpmap:96 mpeg4-generic/24000/2
a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=131056e59d4800; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1;
a=control:rtsp://192.168.1.3:8554/test.sdp/trackID=0
m=video 0 RTP/AVP 96
b=RR:0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=64001f;sprop-parameter-sets=Z2QAH6zZQNQ9sBEAAZdPAExLQI8YMZY=,aOvssiw=;
a=control:rtsp://192.168.1.3:8554/test.sdp/trackID=1
DEBUG server comment - DESCRIBE: SDP: trackCount:2 trackNames:[rtsp://192.168.1.3:8554/test.sdp/trackID=1,rtsp://192.168.1.3:8554/test.sdp/trackID=0,header]
DEBUG server comment - *** RTSPMessageSend ***
SETUP rtsp://192.168.1.3:8554/test.sdp/trackID=0 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 2
DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.send: command:SETUP
SETUP rtsp://192.168.1.3:8554/test.sdp/trackID=0 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 2
DEBUG server comment -   server: VLC/2.0.2
DEBUG server comment -   date: Thu, 05 Jul 2012 15:47:27 GMT
DEBUG server comment -   content-length: 0
DEBUG server comment -   cache-control: no-cache
DEBUG server comment -   cseq: 2
DEBUG server comment -   uri: RTSP/1.0 461 Unsupported transport
DEBUG server comment -   protocol: RTSP/1.0
DEBUG server comment -   status: 461
DEBUG server comment -   response: Unsupported
DEBUG server comment -   server: VLC/2.0.2
DEBUG server comment -   date: Thu, 05 Jul 2012 15:47:27 GMT
DEBUG server comment -   content-length: 0
DEBUG server comment -   cache-control: no-cache
DEBUG server comment -   cseq: 2
DEBUG server comment - *** RTSPMessageReceive ***
RTSP/1.0 461 Unsupported
cache-control: no-cache
response: Unsupported
protocol: RTSP/1.0
cseq: 2
status: 461
content-length: 0
server: VLC/2.0.2
date: Thu, 05 Jul 2012 15:47:27 GMT
uri: RTSP/1.0 461 Unsupported transport
DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: command:SETUP response:RTSP/1.0 461 Unsupported transport status:461 handled:false
DEBUG server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.send: command:SETUP
SETUP rtsp://192.168.1.3:8554/test.sdp/trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=2-3

“uri: RTSP/1.0 461 Unsupported transport” this seems to be a problem?

I figured the problem out by myself:)

The problem is the transport,it seems vlc(mine is v2.0.2 which is the newest one) doesn’t support interleave.

so after i changed RTPTransportMode to udp like below everything is fine:)

Hope this would help others who have the same problem as me.

<MediaCaster>
     <RTP>
          <RTSP>
               <!-- udp, interleave -->
     		<RTPTransportMode>interleave</RTPTransportMode> //
          </RTSP>
     </RTP>
     <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
     <Properties>
     </Properties>
</MediaCaster>

Well another problem occured:<

It seems the stream will be reconnected every few minutes

this is what log said

INFO stream play rtsp.stream -
INFO server comment - RTPMediaCaster.streamTimeout[564124619:live/_definst_:rtsp.stream]: timeout:12000 diff:12025 reason:101
INFO server comment - RTPMediaCaster.resetConnection[564124619:live/_definst_:rtsp.stream]:
INFO server comment - RTPMediaCaster.closeRTPSession[564124619:live/_definst_:rtsp.stream]
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.close closeSession
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.onClose
INFO server comment - RTPSessionTracker.remove[rtsp://192.168.1.3:8554/test.sdp]: 0:true
INFO server comment - RTPUDPTransport.unbind[live/_definst_]: 0.0.0.0/0.0.0.0:6984 sent:0 recv:1406
INFO server comment - RTPUDPTransport.unbind[live/_definst_]: 0.0.0.0/0.0.0.0:6985 sent:13 recv:13
INFO server comment - RTPUDPTransport.unbind[live/_definst_]: 0.0.0.0/0.0.0.0:6982 sent:0 recv:3865
INFO server comment - RTPUDPTransport.unbind[live/_definst_]: 0.0.0.0/0.0.0.0:6983 sent:13 recv:13
INFO stream unpublish rtsp.stream -
INFO stream destroy rtsp.stream -
INFO server comment - RTPMediaCaster.Reconnector[564124619:live/_definst_:rtsp.stream]: start: 5
INFO server comment - RTPSessionTracker.add[rtsp://192.168.1.3:8554/test.sdp]: 1
INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: sessionId:fa9efc0385d538af sessionTimeout:60000
INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: RTSP/RTP re-streaming. Success, received SDP data.