Wowza Community

re-streaming rtsp and origin/edge setup

Hello all!

I am trying to realize the following setup:

Sony IPELA SNC-DH120 Camera

as a Webcam at a Customer

Wowza Pro 2.2.3 running in the location with the camera

Wowza Pro 2.1.2 (soon updated) running in our network center

How far I got …

I can see the stream in vlc and got a rtp-live application on the 2.2.3 running.

examples/LiveVideoStreaming/client/live.html

Server: rtmp://localhost/Leuchturm

Stream: camera.stream

works fine.

Then tried to set up an origin/edge system and followed the user guide.

When I try this:

examples/LiveVideoStreaming/client/live.html

Server: rtmp://localhost/liveedge

Stream: camera.stream

I see this errors:

INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/

video1:rtmp://192.168.0.38:1935/media[video1]

INFO server comment - LivePlayer.play[liveedge/definst/camera.stream]: Dynamic

Stream Markers are on.

WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti

on: Failed to get the session[ConnectException: Connection refused: no further i

nformation].

INFO server comment - MediaStreamMediaCasterPlay: close

INFO stream destroy camera.stream -

INFO session disconnect 328253095 -

WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti

on: Failed to get the session[ConnectException: Connection refused: no further i

nformation].

WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti

on: Failed to get the session[ConnectException: Connection refused: no further i

nformation].

WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti

on: Failed to get the session[ConnectException: Connection refused: no further i

nformation].

Any help would be appreciated!

Cheers,

SW

Before going any further, I’d recommend making sure both origin and repeater are running the same version.

-Ian

The logs show that Wowza cannot connect to that rtsp stream:

INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/
video1:rtmp://192.168.0.38:1935/media[video1]
INFO server comment - LivePlayer.play[liveedge/_definst_/camera.stream]: Dynamic
Stream Markers are on.
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].

TCP port 554 needs to be open in this case.

And the camera is on a LAN IP, so Wowza should be on the same LAN. If not, Wowza should connect to the camera over a public IP.

Richard

Try creating a text files with .stream extension in the content folder:

/content/sony.stream

Make the contents:

rtsp://192.168.0.38/media/video1

You need to start in StreamManager if it is a origin, or if you want to stream to iOS or you if StreamType is “live”. Start stream “sony.stream” on live application with MediaCaster Type “rtp”

https://www.wowza.com/docs/how-to-use-stream-manager-in-wowza-media-server-3

Test in Wowza example player:

Server: rtmp://[wowza-address]:1935/live

Stream: sony.stream

Richard

Woo,

Before you start setting up Liverepeater (origin/edge), have you been able to re-stream from this camera yet? One thing at a time, please.

This WARNing

WARN server comment 2011-03-06 20:34:51 - - - - - 131.033 - - - - - - - - Failed to connect: org.apache.mina.common.RuntimeIOException: Failed to get the session[ConnectException: Connection refused: no further information].

… means Wowza was not able to connect to the camera. Maybe the camera refused the connection, or there is a network problem. It is not a Wowza problem, which is just reporting that it cannot get the camera stream.

Is the camera on a public IP?

Richard

If that works, and you have application named liveedge with StreamType “liverepeater-edge”, play in Wowza LiveVideoStreaming player:

Server: rtmp://localhost:1935/liveedge

Stream: rtmp://localhost:1935/liveorigin/definst/repeat.stream

You can make a origin.stream file that contains the above stream and play origin.stream instead.

Server: rtmp://localhost:1935/liveedge

Stream: origin.stream

Richard

In that case you need a 2nd origin that you are publishing to. You have entered the liverepeater and liveorigin, you want something like:

rtmp://ip1/liveorigin|rtmp://ip2/liveorigin

And if you are using originURL you use simple stream name on the edge, same one that is being published on origin.

Server: rtmp://localhost:1935/liveedge

Stream: repeat.stream

If you are starting the origin stream on the edge in StreamManager, use MediaCaster type “liverepeater”.

Richard

Richard

This is back to problem connecting to the camera, not a Wowza problem really. You have to figure out why you are not able to reach that camera. Network problem? Could be too many connections, IP cameras have connection limits.

Weren’t you always starting the origin as a liverepeater (StreamType “liverepeater-origin”)

Richard

I’m totally lost. I thought it was working at one point.

Yes, this message really means that Wowza was not able to connect to a MediaCaster source:

Failed to connect: org.apache.mina.common.RuntimeIOException: Failed to get the session[ConnectException: Connection refused: no further i

nformation].

The “Connection refused” part suggests that the camera was reachable but rejected the connection, possibly because of a connection limit.

Richard

If you can’t get it working, zip up and send the conf and logs folders to support@wowza.com

Send screen shots

  1. What you are playing, use LiveVideoStreaming Wowza player which shows url and stream name.

  2. What you are doing in StreamManager.

  3. Encoder settings

Include a link to this thread.

Richard

Yes, good idea!

Now I tried it all on the same box with the new Version - same problem :frowning:

sw

Hello Richard,

thank you for your quick answer!

The Wowza servers where in the same ip-net and I now test with all applications on one Wowza Server. Still does not work.

rtsp connects to Sony IPELA Camera work with:

rtsp://192.168.0.38/media/video1

in VLC from Server running the Wowza, firewalls switched off, so I think the port is open.

This line:

INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/

video1:rtmp://192.168.0.38:1935/media[video1]

makes me stumble. The Sony Camera does not talk rtmp which is shown

after the “:” in the URL shown above.

Perhaps there might be a problem?

cu,

Stephan

Hello Support,

finally I found the time to work on this problem again.

I put up all on windows now and on one server with the camera in the same network.

Wowza Version:

INFO server server-start Wowza Media Server 2 Developer 2.2.3 build26454 -

Cam shows video in vlc with this URL:

rtsp://192.168.0.38/media/video1

I also put up a liveorigin and a liveedge along this post:

https://www.wowza.com/docs/how-to-configure-a-live-stream-repeater

The file /content/repeat.stream has this content:

rtsp://192.168.0.38/media/video1

With the Wowza LiveVideoStreaming example player the following tests work:

Server: rtmp://localhost:1935/liveorigin
Stream: repeat.stream
Server: rtmp://localhost:1935/liveedge
Stream: rtmp://localhost:1935/liveorigin/repeat.stream

So far so well.

Now I added

<OriginURL>rtmp://localhost/liveedge/</OriginURL>
<QueryString><![CDATA[]]></QueryString>

to Application.xml of liveedge.

as far as I understand now the stream name in edge could change:

Server: rtmp://localhost:1935/liveedge
Stream: repeat.stream

This fails with:

WARN	server	comment	2011-03-06	20:34:51	-	-	-	-	-	131.033	-	-	-	-	-	-	-	-	Failed to connect: org.apache.mina.common.RuntimeIOException: Failed to get the session[ConnectException: Connection refused: no further information].

We want to use that function to set up failover origins, as described in your UsersGuide:

It is possible to configure more than one origin server to provide a hot backup in case the main origin server goes down. Let’s say the failover origin server has the domain name origin2.mycompany.com. Assuming it is configured in the same manner as the main origin server, you would set the following Repeater/OriginURL in each the edge’s Applications.xml files:

rtmp://origin.mycompany.com/liveedge|rtmp://origin2.mycompany.com/liveedge

I will send my conf and content file with all logs to your support as well, because I did not find any upload for zip files here.

Any help is appreciated!

Yours,

Woo.

Hello Richard,

I tested the ipcam without origin/edge and it is working fine.

This test works:

Server: rtmp://localhost:1935/liveorigin
Stream: repeat.stream

I put up a port forward to the cam - not showing anything useful beside date and time

until now - will go offline tomorrow or on your request.

Try here:

rtsp://kakapo.homedns.org/media/video1

Woo.

Richard,

that works.

Only thing that does not work is to set up the edges as described in the user manual - and only with RTP-Streams - rtmp works fine. When I start the rtp stream with the stream manager, which type of stream you suggest: rtp or liverepeater?

We want to set up failover origins.

i quote myself from my post above:

We want to use that function to set up failover origins, as described in your UsersGuide:

It is possible to configure more than one origin server to provide a hot backup in case the main origin server goes down. Let’s say the failover origin server has the domain name origin2.mycompany.com. Assuming it is configured in the same manner as the main origin server, you would set the following Repeater/OriginURL in each the edge’s Applications.xml files:

<Repeater>
<OriginURL>rtmp://origin.mycompany.com/liveedge|rtmp://origin2.mycompany.com/liveedge</OriginURL>
<QueryString></QueryString>
</Repeater>

Greetings,

Woo.

Richard,

now we are getting somewhere.

When I start the origin as liverepeater it does not work:

INFO server comment - Wowza Media Server is started!
INFO application app-start _definst_ liveorigin/_definst_
INFO stream create - -
INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/
video1:rtmp://192.168.0.38:1935/media[video1]
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
INFO server comment - HTTPStreamManager.onHTTPRequest: Publish stream successful
ly started [liveorigin/_definst_]: flv:repeat.stream
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].
WARN server comment - Failed to connect: org.apache.mina.common.RuntimeIOExcepti
on: Failed to get the session[ConnectException: Connection refused: no further i
nformation].

This line:

INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/
video1:rtmp://192.168.0.38:1935/media[video1]

is the problem - I believe - looks like liverepeater cannot handle RTP streams?

Cheers,

Woo.

Richard,

really, that camera is reachable and connected fine.

Lets look at this line:

INFO server comment - LiveMediaStreamHandler.connect: rtsp://192.168.0.38/media/
video1:rtmp://192.168.0.38:1935/media[video1]

it starts with rtsp and then shows rtmp - can you explain that to me? This cam cannot answer to rtmp requests - that is why it fails.

No, I started the origin with rtp before, then I can use it as described above, with liverepeater it does not work at all.

Woo.

Can you connect to the cam on?

rtsp://kakapo.homedns.org/media/video1

You will see, there is no connection limit.

It works with type rtp but not with liverepeater.

Woo.

ok, I will prepare this tomorrow.

Thank you for your time!

Woo.