Skip to main content
Inspiring
June 3, 2009
Question

Serverside recording suddenly stops

  • June 3, 2009
  • 3 replies
  • 2254 views

I've implemented a serverside script that records the current stream to disk. This record method is called from another clientside flash application.
On some occasions the recording suddenly stops after a few hours without giving any errors, and without there being any network dropouts (Flash Media Encoder doesn't report any dropouts).
What can be the cause of this, and what can I do to make the recording more stable?

My main.asc file is attached

Any other suggestions on how the code in this can be improved, or better practices on how to do stuff, is also appreciated

    This topic has been closed for replies.

    3 replies

    Participant
    March 6, 2015

    GTHvidsten‌, this is a pretty old thread, but just in case you are still stuck with the problem, the solution offered by ctdavids‌ here: https://forums.adobe.com/thread/865510 worked for me!

    The problem was that the recording stream was being assigned to a variable inside the function (that starts the recording) is enough to start the recording. But, within a few minutes, the variable would get garbage collected. This would make the recording to abruptly stop with no status notifications or error messages.

    To fix the issue, just put the variable inside of a global object, say,

    var recordingStreamReference = Stream.get("recording");

    strMaps[recordingStreamName] = recordingStreamReference;

    where strMaps is the global variable (Object), recordingStreamName is just a unique name for the recording, and the recordingStreamReference is the variable that has the recording stream. Based on your main.asc file, I'm not sure how the application.clients.livestream was working, but no harm in trying an explicit global variable, right?

    Hope this helps!

    Inspiring
    June 19, 2009

    Last night this happened again.

    Someone was recording on the server, and the recording stopped 45 minutes before they initiated the stop command.

    There's nothing in the FMS logs indicating a disconnect, there's nothing in my own logs indicating that it stopped too soon, and there's nothing in the server logs indicating network dropouts or excessive CPU usage (or any other abnormalities at all).

    I've got a vague hunch that it might be a sort of a buffering issue. The serverside recording buffers the livestream, but can't record quick enough, so the buffer builds up so that when the user stops the recording, the recording stops without writing its buffer to the recorded file... not that this should be an issue in the first place because the server is definitely quick enough to cope with it.

    Does anyone have any other good ideas on things to check or what might go wrong?

    June 4, 2009

    Are you using the latest version of Flash Media Encoder -- Flash Media Live Encoder 3? Or are you using a custom Flash Player client to encode?

    Inspiring
    June 4, 2009

    We use Adobe Flash Encoder 2.5 to stream to the server.

    However, the recording suddenly stops on the server, not the client, so the problem would seem to be unrelated to the client, right?

    June 4, 2009

    Hmm... makes me wonder if the connection is dropping, but FMLE doesn't detect it. The Flashplayer does that sometimes.

    Have you checked the logs to see if the disconnect event gets logged at the same time recording stops?