Red 5 recording RTMP web-cam configuration works on localhost but not externally on a server

StackOverflow https://stackoverflow.com/questions/21878021

  •  13-10-2022
  •  | 
  •  

Question

I have installed Red 5 and have it nicely working on localhost on my machine recording FLV files streamed up from a Flash application.

I'm currently using the red 5 oflaDemo demo application as my test repository to record the web-cam FLVs into its streams folder.

I'm trying to move to a server. I have Red 5 set up there and can view http://[ my server ip]:5080/demos/ofla_demo.html on that server OK

The actual oflaDemo application I was not able to install via installer.swf so I copied the folder structure of oflaDemo up from my local machine into webapps.

In oflaDemo.html I can connect OK to the rtmp port - rtmp://localhost/oflaDemo

Reading the red 5 manual - http://www.red5.org/downloads/docs/red5-reference-1.0.pdf I can see the application configuration is in this file

red5-web.properties

webapp.contextPath=/oflaDemo
webapp.virtualHosts=11.22.33.44:1935

[my server ip] shown as 11.22.33.44 here

I've tried lots of other ports against this ip address but it should be 1935 according to the manual that I want.

I have this section as well in web.xml

<param-name>webAppRootKey</param-name>
<param-value>/oflaDemo</param-value>
</context-param>

I restarted the Red 5 service.

but I cannot connect to rtmp://[my server ip]/oflaDemo

I have tested the port with a port checker and the 1935 port is open on this server.

This is the error that shows on the oflaDemo web page (just to test connection)

(29168) NetConnection.onStatus: 
 description = No scope 'oflaDemo' on this server.
 code = NetConnection.Connect.Rejected
 level = error

So it appears the configuration is still not right. Any clues anyone?

Was it helpful?

Solution

The problem was due to the fact that oflaDemo was install via a folder copy.

I read recently in the manual (and on http://red5guide.com/) that applications are normally loaded via a war file being dropped into the webapps folder. After 10 minutes the application would be installed.

So after googling I came across a copy of ofla demo war file : http://red5.googlecode.com/svn-history/r3990/snapshots/oflaDemo-r3989-java6.war

I dropped this into webapps after deleting the old oflademo folder structure and restarting the red5 service - it didn't create a new one so I check the red 5 logs and found a comment saying it thought oflademo was already loaded so I search the folder structure and found reference to oflademo in red5/work/red5engine (just a folder) and deleted this.

Oflademo then, in time, installed itself from the war file.

http://[ my server ip]:5080/demos/ofla_demo.html then ran correctly - played some example videos and accepted rtmp stream connection (and remote Flash uploads) to url rtmp://[my server ip]/oflaDemo.

This is the default properties (file red5-web.properties) that seem to work without any reference to the local ip address of that server.

webapp.contextPath=/oflaDemo webapp.virtualHosts=*, localhost, localhost:8088, 127.0.0.1:8088

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top