Stream Videos(playlist) to a cdn
Hallo,
normal I stream a livestream from Fme to a Fms and than to 2 cdn´s like justinTv. Now I´ve got the problem that i want to change the Script that it streams Viedos to the CDNs. Can Someone help me doing that or tell me what to read?
Thats the Script I use right now to push the livestream:
var nc1=null;
var nc2=null;
var ns1=null;
var ns2=null;
application.onPublish = function(client, myStream) {
if (application.name == "rushTV/_definst_"){
trace("Republishing the stream to justinTV");
nc1 = new NetConnection();
nc1.connect("rtmp://live.justin.tv/app");
ns1 = new NetStream(nc1);
//called when the server NetStream object has a status
ns1.onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing to ustream");
}
}
ns1.setBufferTime(150);
ns1.attach(myStream);
ns1.publish( "xxxxxxxxx","live" );
trace("Republishing the stream to bit");
nc2 = new NetConnection();
nc2.connect("rtmp://rtp1.xxxxxxx");
ns2 = new NetStream(nc2);
//called when the server NetStream object has a status
ns2.onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing to bit");
}
}
ns2.setBufferTime(150);
ns2.attach(myStream);
ns2.publish( "cccxxxxxx","live" );
}
}
