Server-to-Server Publishing doesn't start live
Hey Folks,
We're having a small issue with server-to-server publishing (FMS 4.5).
We currently have a cluster that looks like this:
Flash Media Encoder > Host Machine > Relay Machine (NY), Relay Machine (CHI), Relay Machine(EU)
We accomplish this with the following code in main.asc on onPublish:
var nc = new Array();
var ns = new Array();
nc[1] = new NetConnection();
nc[1].connect("rtmp://xxx.xxx.xxx.xxx/publishing/"+ newpoint);
ns[1] = new NetStream(nc[1]);
ns[1].setBufferTime(10);
ns[1].attach(streamObj);
ns[1].publish(streamObj.name + "?adbe-live-event=liveevent", "live");
ns[1].onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing to NY");
}
}
nc[2] = new NetConnection();
nc[2].connect("rtmp://xxx.xxx.xxx.xxx/publishing/"+ newpoint);
ns[2] = new NetStream(nc[2]);
ns[2].setBufferTime(10);
ns[2].attach(streamObj);
ns[2].publish(streamObj.name + "?adbe-live-event=liveevent", "live");
ns[2].onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing to CHI");
}
}
nc[3] = new NetConnection();
nc[3].connect("rtmp://xxx.xxx.xxx.xxx/publishing/"+ newpoint);
ns[3] = new NetStream(nc[3]);
ns[3].setBufferTime(10);
ns[3].attach(streamObj);
ns[3].publish(streamObj.name + "?adbe-live-event=liveevent", "live");
ns[3].onStatus = function(info) {
trace("Stream Status: " + info.code)
if (info.code == "NetStream.Publish.Start") {
trace("The stream is now publishing to EU");
}
}
This works wonderuflly, except for one issue.
If we have one flash media encode going, the stream will start live. After this any consequent flash media encode will ALWAYS start at the beginning. In Strobe Media Player, You canm easily go to live by dragging the seekbar all the way to the right - but in Android for example, the seek doesn't work, so you cant go live. What causes this?
We were thinking it has something to do with timecodes, but we may be wrong.
Please please please someone help ![]()
