[Red5] simple red5 setup ?
Adam Procter
adam.procter at luton.ac.uk
Tue Nov 1 12:57:03 EST 2005
I have it all go on 1936 currently :)
I actually have unity 2 (www.moock.org) running on 1935 (just had the
free port from FCS tests and have stuck with it for unity)
so that would be much harder to change now ! :(
Thanks again
Adam
On 1 Nov 2005, at 17:48, Chris Allen wrote:
> Adam,
>
> It doesn't really mater which port you choose as long as it's not in
> use by another program. Try 1936. Just keep in mind that you will
> need to change the connection to the NetStream to the appropriate
> port. rtmp://localhost:1936/demoService/oflaDemo aught to work. ;-)
> With 1935 it's the default and you don't have to include it.
>
> I hope that helps.
>
> -Chris
>
> On 11/1/05, Adam Procter <adam.procter at luton.ac.uk> wrote:
>> If I cant run red5 on port 1935
>> what is the best alternative port ?
>>
>> Thanks
>> Adam
>>
>>
>>
>> On 1 Nov 2005, at 17:20, John Grden wrote:
>> Yeah, I agree with that, cause it seems that there are times I've
>> seen
>> NetStream.play("fileNameNoExtensionIncluded") and
>> NetStream.play("fileName.flv")
>>
>> so, suffix, prefix, and none at all ;)
>>
>> On 11/1/05, Luke Hubbard (luke at codegent.com)
>> <king.selassie at gmail.com >
>> wrote:
>>> LOL, looks like a hack to me because they forgot to include the
>>> type on
>> the end :)
>>> IMHO having the extension on the end seems the most logical thing
>>> to do.
>>> So lets support on the end (my.flv), none at all (auto add .flv),
>>> and
>> prefix (flv:my).
>>> What do people thing ?
>>>
>>> -- Luke
>>>
>>>
>>> On 11/1/05, Dominick Accattato < daccattato at gmail.com> wrote:
>>>> I blelieve there is a mp3: prefix as well.
>>>>
>>>>
>>>>
>>>> On 11/1/05, Luke Hubbard (luke at codegent.com) <
>>>> king.selassie at gmail.com>
>> wrote:
>>>>>
>>>>> Hi Guys,
>>>>>
>>>>> Just a quick email.
>>>>>
>>>>> 1. red5 isnt really ready for using yet, only fun and testing
>>>>> really
>> at the moment.
>>>>> 2. bandwidth check code looks interesting, i would think we
>>>>> would do
>> it in java though instead of js and have some method in the api
>> which can be
>> called to run the check.
>>>>> 3. components, we will change the stream code once the refactoring
>> code is done so FLV: is an optional prefix. has anyone seen any other
>> prefixes ?
>>>>>
>>>>> -- Luke
>>>>>
>>>>>
>>>>> On 11/1/05, Dominick Accattato <daccattato at gmail.com > wrote:
>>>>>>
>>>>>> Anyone trying to use the flash video components. There are
>>>>>> issues
>> with interoperability at this time. I believe that I understand
>> the reason
>> why there is a connection problem. some components send a prefix
>> of flv: to
>> the server. We currently don't account for this, but we will look
>> into
>> getting this working soon. Just a heads up. serve on!
>>>>>>
>>>>>> example:
>>>>>>
>> .\hosts\__default__\apps\oflaDemo\streams\flv:OFLA_PROMO
>> (The system cannot find the file specified)
>>>>>>
>>>>>>
>>>>>> So, all we have to do is have a service that checks for the flv:
>> prefix and strip that. I'm sure the component makes other calls,
>> but this
>> is the one that will return the streaming video.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 11/1/05, John Grden <neoriley at gmail.com> wrote:
>>>>>>> ah Thanks T, appreciate you filling in the blanks!
>>>>>>>
>>>>>>> we do have server side services working with Java at the moment,
>> so I wonder what the team thinks about how to implement this on
>> Red5? we
>> probably won't approach it right now since we're gearing up for
>> Spark, but
>> this WOULD be very cool to show
>>>>>>>
>>>>>>> Thanks again,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 11/1/05, Thijs Triemstra | Collab <thijs at collab.nl > wrote:
>>>>>>>> The FLV playback needs the serverside scripts below to work
>>>>>>>> with
>> flashcom flv's.. you can also find this main.asc in the
>> Flash8/Samples/Components/FLVPlayback folder on your hd.
>> not sure if and how this works with red5 though :)
>>>>>>>>
>>>>>>>>
>>>>>>>> Thijs
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> application.onConnect = function(p_client, p_autoSenseBW)
>>>>>>>> {
>>>>>>>> //Add security here
>>>>>>>>
>>>>>>>>
>>>>>>>> this.acceptConnection(p_client);
>>>>>>>>
>>>>>>>>
>>>>>>>> if (p_autoSenseBW)
>>>>>>>> this.calculateClientBw(p_client);
>>>>>>>> else
>>>>>>>> p_client.call("onBWDone");
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> Client.prototype.getStreamLength =
>> function(p_streamName) {
>>>>>>>> return Stream.length(p_streamName);
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> Client.prototype.checkBandwidth = function() {
>>>>>>>> application.calculateClientBw(this);
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> application.calculateClientBw = function(p_client)
>>>>>>>> {
>>>>>>>>
>>>>>>>>
>>>>>>>> p_client.payload = new Array();
>>>>>>>> for (var i=0; i<1200; i++){
>>>>>>>> p_client.payload[i] = Math.random(); //16K approx
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> var res = new Object();
>>>>>>>> res.latency = 0;
>>>>>>>> res.cumLatency = 1;
>>>>>>>> res.bwTime = 0;
>>>>>>>> res.count = 0;
>>>>>>>> res.sent = 0;
>>>>>>>> res.client = p_client;
>>>>>>>> var stats = p_client.getStats();
>>>>>>>> var now = (new Date()).getTime()/1;
>>>>>>>> res.pakSent = new Array();
>>>>>>>> res.pakRecv = new Array();
>>>>>>>> res.beginningValues = {b_down:stats.bytes_out,
>> b_up:stats.bytes_in, time:now};
>>>>>>>> res.onResult = function(p_val) {
>>>>>>>>
>>>>>>>>
>>>>>>>> var now = (new Date()).getTime()/1;
>>>>>>>> this.pakRecv[this.count] = now;
>>>>>>>> //trace( "Packet interval = " +
>> (this.pakRecv[this.count] - this.pakSent[this.count])*1 );
>>>>>>>> this.count++;
>>>>>>>> var timePassed = (now - this.beginningValues.time);
>>>>>>>>
>>>>>>>>
>>>>>>>> if (this.count == 1) {
>>>>>>>> this.latency = Math.min(timePassed, 800);
>>>>>>>> this.latency = Math.max(this.latency, 10);
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> //trace("count = " + this.count + ", sent = " +
>> this.sent + ", timePassed = " + timePassed);
>>>>>>>>
>>>>>>>>
>>>>>>>> // If we have a hi-speed network with low latency send
>> more to determine
>>>>>>>> // better bandwidth numbers, send no more than 6
>>>>>>>> packets
>>>>>>>> if ( this.count == 2 && (timePassed<2000))
>>>>>>>> {
>>>>>>>> this.pakSent[res.sent++] = now;
>>>>>>>> this.cumLatency++;
>>>>>>>> this.client.call("onBWCheck", res,
>> this.client.payload);
>>>>>>>> }
>>>>>>>> else if ( this.sent == this.count )
>>>>>>>> {
>>>>>>>> // See if we need to normalize latency
>>>>>>>> if ( this.latency >= 100 )
>>>>>>>> { // make sure we detect sattelite and modem
>> correctly
>>>>>>>> if ( this.pakRecv[1] - this.pakRecv[0] >
>>>>>>>> 1000 )
>>>>>>>> {
>>>>>>>> this.latency = 100;
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> delete this.client.payload ;
>>>>>>>> // Got back responses for all the packets compute
>> the bandwidth.
>>>>>>>> var stats = this.client.getStats();
>>>>>>>> var deltaDown = (stats.bytes_out -
>> this.beginningValues.b_down )*8/1000;
>>>>>>>> var deltaTime = ((now -
>>>>>>>> this.beginningValues.time) -
>> (this.latency * this.cumLatency) )/1000;
>>>>>>>> if ( deltaTime <= 0 )
>>>>>>>> deltaTime = (now - this.beginningValues.time
>> )/1000;
>>>>>>>>
>>>>>>>> var kbitDown = Math.round(deltaDown/deltaTime);
>>>>>>>>
>>>>>>>>
>>>>>>>> trace("onBWDone: kbitDown = " + kbitDown + ",
>> deltaDown= " + deltaDown + ", deltaTime = " + deltaTime + ",
>> latency = " +
>> this.latency + "KBytes " + (stats.bytes_out -
>> this.beginningValues.b_down)/1024) ;
>>>>>>>>
>>>>>>>>
>>>>>>>> this.client.call("onBWDone", null, kbitDown,
>> deltaDown, deltaTime, this.latency );
>>>>>>>> }
>>>>>>>> }
>>>>>>>> res.pakSent[res.sent++] = now;
>>>>>>>> p_client.call("onBWCheck", res, "");
>>>>>>>> res.pakSent[res.sent++] = now;
>>>>>>>> p_client.call("onBWCheck", res, p_client.payload);
>>>>>>>>
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Op 1-nov-2005, om 3:53 heeft John Grden het volgende
>>>>>>>> geschreven:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hey Adam, I tried this with the FLV playback and it failed here
>> as well. Not sure why that would be, but I have to assume there's
>> some
>> calls that Red5 hasn't implemented yet ;) That's very likely
>> since the only
>> one that I know of is "play" on the NetStream object - that was
>> the last I
>> had heard. So while metaData and play work, there are probably a
>> ton of
>> other things that need to be added.
>>>>>>>>
>>>>>>>> However, if you're wanting to build your own app, this code
>>>>>>>> DOES
>> work:
>>>>>>>>
>>>>>>>> var nc = new NetConnection();
>>>>>>>> nc.connect("rtmp:/oflaDemo/demoService");
>>>>>>>> var ns:NetStream = new NetStream(nc);
>>>>>>>> ns.onStatus = function(obj)
>>>>>>>> {
>>>>>>>> trace(obj.code);
>>>>>>>> }
>>>>>>>> av.attachVideo(ns)
>>>>>>>> ns.play("LUCASARTS_FLIP_320_high.flv");
>>>>>>>>
>>>>>>>> Just drag a new video object on stage and name it "av" and
>> you're good to go!
>>>>>>>>
>>>>>>>>
>>>>>>>> On 10/31/05, Adam Procter <Adam.Procter at luton.ac.uk > wrote:
>>>>>>>>> I am trying to connect to my red 5 server from scratch
>>>>>>>>> and to try it out with flash 8 and the video components ?
>>>>>>>>>
>>>>>>>>> I have added the following code to frame
>>>>>>>>>
>>>>>>>>> my_nc = new NetConnection();
>>>>>>>>> my_nc.connect("
>> rtmp://localhost:1936/oflaDemo/demoService")
>>>>>>>>>
>>>>>>>>> I have then added a FLV playback component
>>>>>>>>> do I just add contentpath as on2_flash8_w_audio.flv ? or
>> other items in the flvs
>>>>>>>>> folder ?
>>>>>>>>>
>>>>>>>>> Adam
>>>>>>>>>
>>>>>>>>>
>> _______________________________________________
>>>>>>>>> Red5 mailing list
>>>>>>>>> Red5 at osflash.org
>>>>>>>>>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> John Grden - Blitz
>>>>>>>> _______________________________________________
>>>>>>>> Red5 mailing list
>>>>>>>> Red5 at osflash.org
>>>>>>>>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Red5 mailing list
>>>>>>>> Red5 at osflash.org
>>>>>>>>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> John Grden - Blitz
>>>>>>> _______________________________________________
>>>>>>> Red5 mailing list
>>>>>>> Red5 at osflash.org
>>>>>>>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Red5 mailing list
>>>>>> Red5 at osflash.org
>>>>>>
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Red5 mailing list
>>>>> Red5 at osflash.org
>>>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>> _______________________________________________
>>> Red5 mailing list
>>> Red5 at osflash.org
>>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>>
>>>
>>>
>>
>>
>>
>> --
>> John Grden - Blitz
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20051101/9ab7ffd9/attachment-0001.htm
More information about the Red5
mailing list