Copy link to clipboard
Copied
Hi?
I need help for following as
I want know If I make 2 or 3 kinds(example: now my FME3 make 1000K, 600K streams for one channel) of bit rate in FME and send to first server then first server publish to other server.
not only one bit rate stream frist server have to republish to all bite rates of one channel to other server.
find many place but really I'm stupid can't understand.
even I'm not coder and don't have enough knowlegments about this.
can you explain me detail?
example
1. if FME publishs two kinds of bit rate to first server then how can change client side code and what kind of file in client.
2. first server now can publish to client both of bit rates well. publish point is "installroot/applications/live". but if want using multi-point publish then
Do I need to change or create new application?
if can using live applicions then how can setting mean what kind of file add to live applicaton directory and change code.
please help me. almost three months I can't solve this.
Copy link to clipboard
Copied
You can use Multi-point publish feature for doing this - you can read abou this feature here : http://help.adobe.com/en_US/adobemediaserver/devguide/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ffbDev.2...
Copy link to clipboard
Copied
First thanks.
but I already read that before.
normaly if I using singe bit rate then no problems. can works well but If I using MBR then only one stream is OK. other streams are not working.
example using two kinds of bit rates then first few mins can see both of them. but few mins after only one stream can see.
so want know how can change server side and fme side code for using two different bit rates for multi-point publishing
and even now testing just only live application is it possible to keep using live or have to change livestream application and have to create applications.
acccording to guide only second and third server service to clients. is it possible to server also frist server?
I'm beginner so not smart and no knowregemetns about this.
Please give me way more easy.
thanks.
Copy link to clipboard
Copied
Can you share the code which you are using? I don't think its issue with MPP but most proabably its with the code which has been written.
Copy link to clipboard
Copied
I just copy main.as file from document/samples/livestreams to applications/livestremas(already create this directoy) and change server IP and applicaion name
if I using this code then frist server can get mbr stream from FME3 well and also connect another remote server well
after connection I can see both bit rates in remote server. but few mins after then one channel can't watching.
also has some questions about this
1. can first server also prepare to clients or not? mean just only republishing or can service to clients.
2. if I copy main.as to live directly and change code like this then can I using live directly ? not create other application.
if (application.name == "live/_definst_"){
trace("Republishing the stream into remote XXX.XXX.XXX.XXX/live");
nc = new NetConnection();
nc.connect( "rtmp:// XXX.XXX.XXX.XXX/live/" );
3. how can set for MBR? change in main.as if need then where and how ?
/*
* (C) Copyright 2011 Adobe Systems Incorporated. All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
* terms of the Adobe license agreement accompanying it. If you have received this file from a
* source other than Adobe, then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
* THIS CODE AND INFORMATION IS PROVIDED "AS-IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
* THIS CODE IS NOT SUPPORTED BY Adobe Systems Incorporated.
*
*/
// main.asc file
// server-side actionscript
var nc;
var ns;
// Called when a client connects
application.onConnect = function(client) {
// accept the new client's connection
application.acceptConnection(client);
// send a message
trace(client.id + " is connected");
}
// Called when a client disconnects
application.onDisconnect = function(client) {
trace(client.id + "disconnecting at " + new Date());
}
// Called when the client publishes
application.onPublish = function(client, myStream) {
trace(myStream.name + " is publishing into application " + application.name);
// This is an example of using the multi-point publish feature to republish
// streams to another application instance on the local server.
if (application.name == "livestreams/_definst_"){
trace("Republishing the stream into XXX.XXX.XXX.XXX/live");
nc = new NetConnection();
nc.connect( "rtmp:// XXX.XXX.XXX.XXX/live/" );
ns = new NetStream(nc);
// called when the server NetStream object has a status
ns.onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing");
}
}
ns.setBufferTime(2);
ns.attach(myStream);
ns.publish( myStream.name, "live" );
}
}
application.onUnpublish = function( client, myStream ) {
trace(myStream.name + " is unpublishing");
}
Copy link to clipboard
Copied
I think you should not create NetConnection in application.onPublish, create it somewhere before say in onAppStart and reuse that connection inside application.onPublish and also you need to use an array of NetStream as you are publishing 2/3 streams.
The code should look something like
ns = new NetStream(nc);
// called when the server NetStream object has a status
ns.onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing");
}
}
ns.setBufferTime(2);
ns.attach(myStream);
ns.publish( myStream.name, "live" );
i++;
Copy link to clipboard
Copied
really thanks about your answer.
where can I define var i?
mean you told me ns like that after change source then error happen undefine 'i'
sorry I'm not coder so don't know detail how can I change this.
can you give me correct source?
sorry. and thanks
just waiting your reply