Help getting a simple livestream set up

167 views
Skip to first unread message

Rodrigo Ipince

unread,
Jun 18, 2015, 12:30:35 PM6/18/15
to red5in...@googlegroups.com

Hi,

I'm trying to get a simple livestream set up w red5.

I downloaded the installation and ran red5.sh. I then used OBS to start streaming to localhost:<port>/someKey. OBS didn't fail, and the server logs appear to indicate the incoming stream was being received.

1. Where is the stream served? I.e. where do I get the playback url?

2. Is the video being saved to disk anywhere? I couldn't find it.

Thanks!
-Rodrigo

Chris Allen

unread,
Jun 18, 2015, 2:07:48 PM6/18/15
to red5in...@googlegroups.com
On Jun 18, 2015, at 12:30 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Hi,

I'm trying to get a simple livestream set up w red5.

I downloaded the installation and ran red5.sh. I then used OBS to start streaming to localhost:<port>/someKey. OBS didn't fail, and the server logs appear to indicate the incoming stream was being received.

1. Where is the stream served? I.e. where do I get the playback url?


You need a Flash application that will playback the stream. I would look at any NetStream tutorial out there as a quick way to get something running. Or look at the OFLA Demo app that ships with Red5. In particular look at the SimpleSubscriber.

2. Is the video being saved to disk anywhere? I couldn't find it.


Red5  won’t record unless it’s told to do so by the publisher. I don’t know much about OBS, but there should be a way to cause OBS to add the NetStream record flag to tell the server to record the stream. 

Thanks!
-Rodrigo


--

---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rodrigo Ipince

unread,
Jun 18, 2015, 2:50:25 PM6/18/15
to red5in...@googlegroups.com
Thank you Chris!

Some follow-ups inline.

On Thu, Jun 18, 2015 at 11:07 AM, Chris Allen <mrchri...@gmail.com> wrote:

On Jun 18, 2015, at 12:30 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Hi,

I'm trying to get a simple livestream set up w red5.

I downloaded the installation and ran red5.sh. I then used OBS to start streaming to localhost:<port>/someKey. OBS didn't fail, and the server logs appear to indicate the incoming stream was being received.

1. Where is the stream served? I.e. where do I get the playback url?


You need a Flash application that will playback the stream. I would look at any NetStream tutorial out there as a quick way to get something running. Or look at the OFLA Demo app that ships with Red5. In particular look at the SimpleSubscriber.

I have a player (e.g. SimpleSubscriber), but I don't know what the playback url is to connect the player to.

The more detailed story: I'm sending my stream to: rtmp://localhost/testStream.  The logs read:

[INFO] [RTMPConnectionExecutor#2KHDOP3RFIFBQ-1] org.red5.server.stream.ClientBroadcastStream - Stream start: testStream

LGTM. Then, if I go to, say, the SimpleSubscriber demo (localhost:5080/demos/simpleSubscriber.html) to play back the stream, I'm asked to put in a URL. It is pre-populated with "rtmp://localhost/oflaDemo". I tried oflaDemo, testStream, and live/testStream, but the result is always the same:

[WARN] [RTMPConnectionExecutor#WE1XZXYWL8IRR-1] org.red5.server.scope.Scope - Requested scope: testStream is not of IScope type: org.red5.server.scope.BroadcastScope
[WARN] [RTMPConnectionExecutor#WE1XZXYWL8IRR-1] org.red5.server.net.rtmp.RTMPHandler - Scope not found
org.red5.server.exception.ScopeNotFoundException: Scope not found: testStream in null
at org.red5.server.scope.ScopeResolver.resolveScope(ScopeResolver.java:106) ~[red5-server.jar:na]
at org.red5.server.Context.resolveScope(Context.java:154) ~[red5-server.jar:na]


How do I set testStream's scope type to BroadcastScope?

 

2. Is the video being saved to disk anywhere? I couldn't find it.


Red5  won’t record unless it’s told to do so by the publisher. I don’t know much about OBS, but there should be a way to cause OBS to add the NetStream record flag to tell the server to record the stream. 

Interesting. I'll look more into OBS, but I expect my users to use different broadcasting software, some of which might not be able to set that flag.

Is there a way to configure the red5 server to record all incoming streams by default?
 

Thanks again! :)

Chris Allen

unread,
Jun 18, 2015, 3:50:14 PM6/18/15
to red5in...@googlegroups.com
On Jun 18, 2015, at 2:50 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Thank you Chris!

Some follow-ups inline.

On Thu, Jun 18, 2015 at 11:07 AM, Chris Allen <mrchri...@gmail.com> wrote:

On Jun 18, 2015, at 12:30 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Hi,

I'm trying to get a simple livestream set up w red5.

I downloaded the installation and ran red5.sh. I then used OBS to start streaming to localhost:<port>/someKey. OBS didn't fail, and the server logs appear to indicate the incoming stream was being received.

1. Where is the stream served? I.e. where do I get the playback url?


You need a Flash application that will playback the stream. I would look at any NetStream tutorial out there as a quick way to get something running. Or look at the OFLA Demo app that ships with Red5. In particular look at the SimpleSubscriber.

I have a player (e.g. SimpleSubscriber), but I don't know what the playback url is to connect the player to.

The more detailed story: I'm sending my stream to: rtmp://localhost/testStream

Try configuring OBS to send the stream to  rtmp://localhost/oflaDemo/testStream
Or alternatively, try rtmp://localhost/live/testStream

Basically you need to tell your broadcaster to stream to a specific application or Scope. The OFLA Demo stuff is setup to use the oflaDemo application. “live” is also another preinstalled application on Red5.

The logs read:

[INFO] [RTMPConnectionExecutor#2KHDOP3RFIFBQ-1] org.red5.server.stream.ClientBroadcastStream - Stream start: testStream

LGTM. Then, if I go to, say, the SimpleSubscriber demo (localhost:5080/demos/simpleSubscriber.html) to play back the stream, I'm asked to put in a URL. It is pre-populated with "rtmp://localhost/oflaDemo". I tried oflaDemo, testStream, and live/testStream, but the result is always the same:

[WARN] [RTMPConnectionExecutor#WE1XZXYWL8IRR-1] org.red5.server.scope.Scope - Requested scope: testStream is not of IScope type: org.red5.server.scope.BroadcastScope
[WARN] [RTMPConnectionExecutor#WE1XZXYWL8IRR-1] org.red5.server.net.rtmp.RTMPHandler - Scope not found
org.red5.server.exception.ScopeNotFoundException: Scope not found: testStream in null
at org.red5.server.scope.ScopeResolver.resolveScope(ScopeResolver.java:106) ~[red5-server.jar:na]
at org.red5.server.Context.resolveScope(Context.java:154) ~[red5-server.jar:na]


How do I set testStream's scope type to BroadcastScope?

 

2. Is the video being saved to disk anywhere? I couldn't find it.


Red5  won’t record unless it’s told to do so by the publisher. I don’t know much about OBS, but there should be a way to cause OBS to add the NetStream record flag to tell the server to record the stream. 

Interesting. I'll look more into OBS, but I expect my users to use different broadcasting software, some of which might not be able to set that flag.

Is there a way to configure the red5 server to record all incoming streams by default?

Yes there is. There are a few approaches to doing this. I think Andy Shaules is better at answering this one than me. I will see if I can track him down to do that for you. 

 

Thanks again! :)

No problem!

Rodrigo Ipince

unread,
Jun 18, 2015, 4:36:12 PM6/18/15
to red5in...@googlegroups.com
On Thu, Jun 18, 2015 at 12:50 PM, Chris Allen <mrchri...@gmail.com> wrote:

On Jun 18, 2015, at 2:50 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Thank you Chris!

Some follow-ups inline.

On Thu, Jun 18, 2015 at 11:07 AM, Chris Allen <mrchri...@gmail.com> wrote:

On Jun 18, 2015, at 12:30 PM, Rodrigo Ipince <rod...@kamcord.com> wrote:

Hi,

I'm trying to get a simple livestream set up w red5.

I downloaded the installation and ran red5.sh. I then used OBS to start streaming to localhost:<port>/someKey. OBS didn't fail, and the server logs appear to indicate the incoming stream was being received.

1. Where is the stream served? I.e. where do I get the playback url?


You need a Flash application that will playback the stream. I would look at any NetStream tutorial out there as a quick way to get something running. Or look at the OFLA Demo app that ships with Red5. In particular look at the SimpleSubscriber.

I have a player (e.g. SimpleSubscriber), but I don't know what the playback url is to connect the player to.

The more detailed story: I'm sending my stream to: rtmp://localhost/testStream

Try configuring OBS to send the stream to  rtmp://localhost/oflaDemo/testStream
Or alternatively, try rtmp://localhost/live/testStream

Basically you need to tell your broadcaster to stream to a specific application or Scope. The OFLA Demo stuff is setup to use the oflaDemo application. “live” is also another preinstalled application on Red5.

Hmm... I tried all those options and always got the same error... (I did not find any "live" application in the list of available applications/demos though).

I did try SimpleBroadcaster and SimpleSubscriber. Using that, I was able to send a feed of my webcam to red5, and subscribe to is on another tab to view it. Now I just need to make it work for a remote broadcaster.

I'm going to be reading the code to see if I find anything there...

Chris Allen

unread,
Jun 19, 2015, 10:10:30 AM6/19/15
to red5in...@googlegroups.com
Right on. Well like I said, I know nothing about how OBS works, so you may want to see if anyone has used OBS like this with Red5. 

Good luck! Sounds like you are getting close. 
Reply all
Reply to author
Forward
0 new messages