yashprit / red5-recorder

Automatically exported from code.google.com/p/red5-recorder
0 stars 0 forks source link

Cannot change rtmp IP in red5-recorder #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download and extract package
2. Change the IP of the server to public in 
/var/lib/red5/webapps/root/red5recorder/src/classes/Recorder.as
3. Go to the http://ip.ip.ip.ip:5080/red5recorder/bin-debug/red5recorder.html

What is the expected output? What do you see instead?

I exepect that the recorder is connecting to the server, as all other apps do. 
Instead I still get: ERROR:Could not connect to: rtmp://127.0.0.1/red5recorder/

What version of the product are you using? On what operating system?

Latest version, red5-server 0.9.1-1 in amd64 (Release) 

Please provide any additional information below.

I can telnet to the ip of the server and connect on port 1935, other 
applications can connect to rtmp.

Original issue reported on code.google.com by yamakasi...@gmail.com on 27 Sep 2011 at 7:31

GoogleCodeExporter commented 9 years ago
I am having the same issue where ERROR:Could not connect to: 
rtmp://127.0.0.1/red5recorder/.  I need to be able to change the localhost ip = 
127.0.0.1 to point to server ip.

My guess i we need to edit the red5recorder.as in Flash and we need to edit 
this line:
if(Application.application.parameters.server!=null) myRecorder.server= 
Application.application.parameters.server;

and set myRecorder.server="rtmp://your-server-ip/red5recorder"

change to 
if(Application.application.parameters.server!=null) myRecorder.server= 
"rtmp://your-server-ip/red5recorder";

assuming red5recorder in webapps folder as webapps/red5recorder.

Then compile the red5recorder.as and create a new red5recorder.swf.

Original comment by chandrap...@gmail.com on 26 Oct 2011 at 6:28

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for your reply.

What I can't find out is if I can fully import the project in Flash and just 
recompile it.

There are no docs about this, would be nice to have some information about this.

Original comment by yamakasi...@gmail.com on 27 Oct 2011 at 9:09

GoogleCodeExporter commented 9 years ago
hey, no need to recompile the as file - you can use FlashVars:
http://stackoverflow.com/questions/7479015/red5-recorder-not-working

quote from there:
ERROR:could not connect to the server rtmp://127.0.0.1 is caused by

if(Application.application.parameters.server!=null) myRecorder.server= 
Application.application.parameters.server;

which defaults to nc.connect(myRecorder.server) which returns 
127.0.0.1/red5recorder

In order to get around this, you can pass along the server= FlashVar.

Edit red5recorder.html and add this in the appropriate place (after line #91):

"FlashVars", "server=rtmp://your.external.server.ip/red5recorder"

This is because the swf is downloaded and run client side, and needs to connect 
to your server's RTMP service. It can't connect to 127.0.0.1/red5recorder 
because that's your PC. This is why you set the server= paramerter. :-)

I hope that helps.

answered Jan 16 at 2:26
Atir Javid

Original comment by david.av...@gmail.com on 27 Dec 2013 at 12:58