• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Serverside recording suddenly stops

Explorer ,
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

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

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2009 Jun 04, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 04, 2009 Jun 04, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 05, 2009 Jun 05, 2009

Copy link to clipboard

Copied

I checked the Flash Media Server logs, and there were no events at all around the time the recording stopped.

As you can see by the attached main.asc file (in the first post) you can see that I also log to a webservice on most events, and none of these events have been logged at the time the recording stopped.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 05, 2009 Jun 05, 2009

Copy link to clipboard

Copied

I'm looking through the code, and I'm wonder where the recordLive function is being invoked. Is there a Flash client that also connects to this application that triggers the recording?

Also (and I'd need to spend some time with your code to test this) what happens if/when a second FME client connects? Is the application protected somewhere else in code you haven't posted? When a client invokes the recordLive function, you're looping through the client list looking for one that has a property named FMEPublisher. If more than one FME client is connected, wouldn't that cause the first one in the list to begin recording? I'm not certain that's the problem... just trying to narrow things down.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 13, 2009 Jun 13, 2009

Copy link to clipboard

Copied

You're right in assuming there's another Flash Application invoking the recordLive function.

I've also set up our streaming computers so that no computers attach to the same stream.

I've also tried with several Flash Media Encoders all connected to different streams, and recording works just like it should... except for the sudden stopping of the recording sometimes, of course.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 19, 2009 Jun 19, 2009

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 06, 2015 Mar 06, 2015

Copy link to clipboard

Copied

LATEST

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines