View Full Version : Live Streaming Problem
tales
01-04-2010, 03:43 AM
We are using FMS (Flash Media Server) Dev version.
We are unable to get a stream to work, though it does work locally. But when trying it on another machine it doesn't work.
http://i47.tinypic.com/6yl6z4.jpg
Also when we use the interactive panel from the default FMS build it works, but when trying it with out own client, it doesn't work.
LeonBlade
01-04-2010, 08:15 AM
Basically what it is... is that I have two Hard Coded clients that will stream 2 separate streams.
Tales and myself would both start our designated clients and we SHOULD be able to see each other.
However, for whatever reason, the client will only show My cam on my machine, and his cam on his machine.
If I open up BOTH clients I am able to see both cams no problem.
So it works Locally in that sense, however it wont work otherwise.
On the FMS Interactive page where you can test the streaming, Tales was able to see my stream by typing in my stream name "leon" and broadcasting from his stream name "tales" and I could see his cam in the client I made, and he could see MY cam from the client I made.
However, it doesn't work my client to my client between other users.
I hope I've explained this enough... please let me know if you require more information.
bowljoman
01-04-2010, 05:04 PM
when you hardcode rtmp or any other address, use the externally visible IP's.
LeonBlade
01-05-2010, 03:18 PM
That's what we're doing, we are only hardcoding the stream names that's all we need... the RTMP server is obviously going to be hardcoded considering it is the ONLY server it will be on (unless the IP changes or what have you).
Is there any more information I should include possible the AS code I'm using to help anyone help solve our issue?
bowljoman
01-05-2010, 05:00 PM
ah, it just sounds like you guys are not too careful about which ones are loaded during the testing.
Do you check for and respond to a 'NetStream.Publish.BadName' event?
Typically this error is a brain fart on behalf of the testing. Since you are testing with another person on two or more machines, I would suspect that there are some variables concerning the humans that are causing the issue. ;)
tales
01-05-2010, 10:06 PM
ah, it just sounds like you guys are not too careful about which ones are loaded during the testing.
Do you check for and respond to a 'NetStream.Publish.BadName' event?
Typically this error is a brain fart on behalf of the testing. Since you are testing with another person on two or more machines, I would suspect that there are some variables concerning the humans that are causing the issue. ;)
Could you please explain this issue a little more? Well how we would fix out issue?
bowljoman
01-05-2010, 10:34 PM
How many machines involved? 1,2, or 3?
and yes, show the code. It almost sounds like a 'Who's on first' joke.
MAybe firewall? if not that, then it is human error.
LeonBlade
01-05-2010, 11:46 PM
There will be multiple machines but for now 10 or less but later one MANY.
Here is the AS code that I use... sorry for the length:
var nc:NetConnection = new NetConnection;
nc.client = this;
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
nc.addEventListener(SecurityErrorEvent.SECURITY_ER ROR, onSecurityError);
nc.connect("rtmp://SERVER_IP_HERE/live");
var ns:NetStream;
var ns2:NetStream;
var vid:Video;
var vid2:Video;
var cam:Camera = Camera.getCamera();
function netStatusHandler(event:NetStatusEvent):void
{
trace("Connected is: " + nc.connected);
trace("event.info.level: " + event.info.level);
trace("event.info.code: " + event.info.code);
switch (event.info.code)
{
case "NetConnection.Connect.Success":
trace("Connected!\n");
doWorkSon();
break;
case "NetConnection.Connect.Rejected":
trace("Oops! You were rejected :(\n");
break;
case "NetConnection.Connect.Closed":
trace("Connection closed!");
break;
}
}
function asyncErrorHandler(event:AsyncErrorEvent):void
{
trace(event);
}
function onSecurityError(event:SecurityErrorEvent):void
{
trace(event);
}
function onBWDone():void{}
function doWorkSon():void
{
ns = new NetStream(nc);
ns.attachCamera(cam);
ns.publish("tales"); // this will get swapped with "leon" for the other client
vid = new Video();
vid.attachCamera(cam);
this.addChild(vid);
ns2 = new NetStream(nc);
ns2.play("leon"); // This will get swapped with "tales" for the other client
vid2 = new Video();
vid2.attachNetStream(ns2);
vid2.x = 320;
this.addChild(vid2);
}
Those last two error event handlers aren't really handled well but... you get he idea :P
tales
01-05-2010, 11:48 PM
How many machines involved? 1,2, or 3?
and yes, show the code. It almost sounds like a 'Who's on first' joke.
MAybe firewall? if not that, then it is human error.
We are on 2 different machines.
And the server is at a different place. Firewall isn't the problem.
bowljoman
01-06-2010, 05:08 PM
I thouhgh i posted earlier, but something must have happened.
Add status listeners to the netstream, as well as specify a client.
Are you needing yourself to make an FCSubscribe call?
LeonBlade
01-06-2010, 10:22 PM
I thouhgh i posted earlier, but something must have happened.
Add status listeners to the netstream, as well as specify a client.
Are you needing yourself to make an FCSubscribe call?
We got something to work out finally, basically it was a stupid IP issue that Tales was having :/ our bad...
However, I was wondering if you knew possibly how we could grab all the streams that was from live.
Like if there are 5 active streams, what AS code would you use to grab those stream names?
bowljoman
01-06-2010, 10:33 PM
I would write an asc file with an array to store the names and a method to call for retrieval. at publsh, the name is pushed into the array, on broadcast stop, it would be removed.
I knew you guys were havin an IP issue! :)
LeonBlade
01-06-2010, 10:39 PM
Is that the ONLY way to do it?
I know that the information is there on the server... is there a better way of doing it?
Like grabbing the data direct off the server from the list instead of having to generate the stream list yourself?
bowljoman
01-06-2010, 11:01 PM
wouldnt it be documented in the live app already?
I recommend to drop FCS/FMS for red5.
seriously.
LeonBlade
01-06-2010, 11:08 PM
Tales wanted to go with FMS :P
I actually looked at red5 yesterday, I'll talk with him and we'll probably end up using that instead.
Thanks for your help.
bowljoman
01-06-2010, 11:10 PM
Compare the prices
tales
01-06-2010, 11:14 PM
Looks like im going to install Red5
bowljoman
01-06-2010, 11:23 PM
There is a small bug in the trunk at the moment.
If you set up the environment to build red5, I can give you the patch.
It is here:
http://forums.winamp.com/showthread.php?postid=2599323#post2599323
I have tools available that even allows you to stream AAC audio playlist from winamp into flash clients.
http://www.thebitstream.com/?p=173
Feel free to join the google group for red5 users, and we'll get you up to speed in no time...
I already have crap-loads of code to share, including how to get stream names to the clients.
LeonBlade
01-07-2010, 01:16 AM
I'm having the worst time in the world trying to install Red5 on my Ubuntu server...
bowljoman
01-07-2010, 01:27 AM
I never used the installers, I create or download a distribution, upload it to the server, define JAVA_HOME, CD into the distribution and then call red5.sh
Dunno much about the installers.
LeonBlade
01-07-2010, 01:29 AM
That's what I did... the red5.sh stops at random points... currently it's stuck here:
[INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer service created
Umm... scratch that... it works >.<
Will I have to run red5.sh every time or... will it create a service for me?
bowljoman
01-07-2010, 01:42 AM
/red5.sh nohup
my prefered way
or branch command. &/red5.sh
bowljoman
01-07-2010, 01:44 AM
errr... nohup ./red5.sh
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.