Problem with recording streams
Hi all,
I'm having a problem with Flash Media Interactive Server 3.5. I have a simple application setup. I would like to simply to be allow the user to record multiple flvs. This is just because we want them to record, preview and either publish or try again.
This is the code on my FMS side
application.onConnect = function (client) {
application.acceptConnection(client);
application.allowDebug = true;
client.getTeamtalkFilename = function(){
fnameTracker = SharedObject.get("vid_counter", true);
currentCounterObj = fnameTracker.getProperty("counter");
if(currentCounterObj == null || currentCounterObj == "null" || currentCounterObj == "NaN")
currentCounter = 0;
else
currentCounter = parseInt(currentCounterObj, 10);
currentCounter++;
fnameTracker.setProperty("counter", currentCounter);
return "teamtalk_" + currentCounter;
}
}
Then on the client side I just call:
out_ns.publish("flv:" + _fname, "record");
and
out_ns.close();
to start and stop recording. The problem I'm having is that while the first record seems to go ok, the second gets garbled. The video starts about 70% through, and then just plays a small portion. I've tried meta injection to fix it up, but it's just not working. I'm thinking maybe I have to reset the stream or something before starting a record again, but I don't know how.
Does this problem sound familiar to anyone?
Cheers
Troot
