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

Serverside stream recording suddenly stops

Community Beginner ,
Jun 15, 2011 Jun 15, 2011

Copy link to clipboard

Copied

I'm running FMS 4.0.2.  I have a server side script that will record a stream that is playing on a remote server.  This script was running fine on FCS 1.5. When running on FMS 4.0.2 the stream starts recording fine, but after a few minutes it stops on its own with no event notifications on the stream.  No NetConnection or NetStream events are registered.

I thought it might have been been an issue staying connected to the remote server, but then I wrote something to publish a stream directly to this server, and have a simple server side script record the stream on the same server, but the same thing happens - it stops after a few minutes with no notifications.

Again the code works fine in older versions of FMS/FCS.

This has obviously proven problematic that I cannot record a stream longer than a few minutes.

The problem occurs both on streams published via the Flash Player (Sorenson Spark) and the FMLE (H.264).

Any help would be greatly appreciated.

Views

4.3K

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
Advocate ,
Jun 15, 2011 Jun 15, 2011

Copy link to clipboard

Copied

Hi,

Thanks for moving to FMS 4.

There shouldn't be any problem /restriction recording on the server with 4.0.

1. Did you check the logs on FMS to see if there anything mentioned ? (core logs mainly).

2. How long is this few minutes ? Everytime the recording stops at the same time ? Did the FMLE recieved any notification or did it continue publishing ?


Also quickly share the server side script you wrote for record, so that it will be available for reference.


Thanks for your co-operation.

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 ,
Jul 25, 2012 Jul 25, 2012

Copy link to clipboard

Copied

Hello,

Has anyone looked into this?  I have the same problem with both FMS 4 and 4.5.  Just a silent failure.  No activity logged on it anywhere.  Recording begins.  A file begins to build.  It then just stops building.  No break in connection.  If I try to play back the portion recorded, the data is a little messed up.  Sometimes no audio.  Sometimes will just stop streaming.  Sometimes won't play at all.

Here is my FMS recording code:

Client.prototype.startRecord = function(){

trace("startRecord");

broadcastStream = Stream.get("live");

        recordedStream = Stream.get("mp4:testRecording.mp4");

if(recordedStream){

  recordedStream.record();

    broadcastStream.play(broadcastStream.name);

}

}

Changing the file extension to "f4v" or "flv" makes no differnence. 

Pretty important issue.  Any help would be appreciated.

Thanks

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 ,
Aug 01, 2012 Aug 01, 2012

Copy link to clipboard

Copied

Anyone?  Hello, is this thing on?

Pretty bad issue here.  I sort of need the stream recording functionality in FMS to work.  As of this writing I just cannot make FMS "reliably" record live streams to files on the server.  It seems others have reported this same silent failure situation as well.  Is there anyone at Adobe who knows for sure if I'm doing something wrong in the code above or if there is a bug here?

Thanks in advance.

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
Adobe Employee ,
Aug 05, 2012 Aug 05, 2012

Copy link to clipboard

Copied

There is problem with the code.. it needs to be

Client.prototype.startRecord = function(){

trace("startRecord");

broadcastStream = Stream.get("live");

        recordedStream = Stream.get("mp4:testRecording.mp4");

if(recordedStream){

  recordedStream.record();

    recordedStream.play(broadcastStream.name);

}

}

or you can simplify further

Client.prototype.startRecord = function(){

trace("startRecord");

recordedStream = Stream.get("mp4:testRecording.mp4");

if(recordedStream){

  recordedStream.record();

    recordedStream.play("live");

}

}

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 ,
Aug 07, 2012 Aug 07, 2012

Copy link to clipboard

Copied

Thanks for the response.

No dice.  Made the change as prescribed above and get the same result. 

The two things that make this difficult are the silent nature of the failure (nothing in console or logs, and no NetStatus activity) and the lack of consistency in the end result - fails a lot, but succeeds once in awhile with no code changes.  Would expect either a total failure if the code is wrong or total success if it's right.  I may be doing something wrong, but these conditions make it difficult to troubleshoot.

ImAStreamer above gets the same result as me so we're either both doing the same thing wrong or FMS 4 and above broke recording somehow.  Where do I go from here?  Need somehow to get this working.

Thanks

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
Adobe Employee ,
Aug 07, 2012 Aug 07, 2012

Copy link to clipboard

Copied

Can you check that livepkgr application is working fine and recording well. Code in livepkgr application is almost on the same basis and this run successfully for the f4f recording. If this doesn't too doesn't result in recording at streams/_definst_/streamName folder than there is some issue in your set-up.

If this run well, then I would suspect that there is some problem in the code above.

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 ,
Aug 08, 2012 Aug 08, 2012

Copy link to clipboard

Copied

I guess I could try that, but I'm not sure I see the point.  What type of issue with set up?  Did you have something in mind?  If there was one, then ImAStreamer above and others have the same issue.  Has anyone ever noted what such an issue might be?

Again, it's not a total failure.  It succeeds aboout 20-30% of the time.  A file is recorded successfully.  If there were a problem with the set up, I would suspect it wouldn't succeed at all.

If there were some problem in the code above, again, it wouldn't succeed at all.  What types of set up problems or code problems would lend to partial successes?

In order to test the livepkgr app I'll have to read about it and figure out how it works and such.  I can do that, but I was looking to get this working a little sooner than that.  ImAStreamer reported his problem June 11th, 2011.  Makes me think a solution might not happen in a timely manner.

I'll take a look at livepkgr here.

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 ,
Jan 16, 2013 Jan 16, 2013

Copy link to clipboard

Copied

I'm still seeing this failure. Sometimes it works, sometimes it doesn't. Seemingly no pattern to it and again with the lack of events in the onStatus function, there is nothing to act upon.

I did watch the livepkgr app and I noticed something happened in the directory when my recording stopped.  There was momentarily an extra file in that folder. It looked like when it was recreating/updating the .bootstrap file. It happened about 10 minutes into the recording of a supposed hour long recording. For just a second or two it looked like there may have been two bootstrap files and then one disappeared and my 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
New Here ,
Jan 21, 2013 Jan 21, 2013

Copy link to clipboard

Copied

We were experiencing similar problems with the recording just stopping without any error or other information. While trying to find the error we started listening on the onStatus event on NetConnection which made the problem completely disappear. If we remove the event lister the problem comes back, every time.

netConnection.onStatus = function(info) {

                       trace('Connection Status: ' + info.code);

}

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 ,
Jan 21, 2013 Jan 21, 2013

Copy link to clipboard

Copied

Well unfortunately, my code has has the onStatus event listener for the NetConnection and that's when the problem occurs.  I'm recording from one server to another so I need the NetConnection handler. I also tried moving the recording application to the same server as the live stream, but still need the NetConnection because I'm trying to record the stream from a different application.

I'm still waiting for someone from Adobe to comment on my post above. It appears there is something going on internally with the server.

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
New Here ,
Jan 29, 2013 Jan 29, 2013

Copy link to clipboard

Copied

I won't claim any great experience with this development environment, so take this for what it's worth and I hope it helps.

We was experiencing this same issue and I noticed that we weren't keeping a persistent reference (read: global variable) to the streams doing the recording.  I started thinking what if the recording streams are being garbage collected (or something similar).  It seemed odd that this would be the case, given that streams often require explicit closing and the existence of Stream.Get/Stream.Destroy, but I figured why not give it a shot.  So I implemented a global map that housed the recording streams and the problem completely disappeared.

Anyway, as I said, I can't claim expertise, but maybe this will help you.

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 ,
Jun 06, 2014 Jun 06, 2014

Copy link to clipboard

Copied

The solution described by ctdavids worked for me as well. We're running FMS 4.5 with custom clients.

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

ctdavids‌, you the man!!


I never would have thought the stream was getting garbage collected! Damn, I spent so many hours (actually days) on this issue. Was getting crazy seeing the recording file start nicely, and then stop increasing in size after a couple of minutes, with absolutely no log or status update anywhere. Tried to update the buffer congurations, file locations, etc., etc., etc., None of them worked!


Assigning the recording stream to a private variable inside of my startRecord() function, and putting this private variable inside a global variable (object map), fixed it. Thank you ctdavids‌ for the solution. And, thank you ImAStreamer‌ for making the same mistake that I did in putting the stream in a private variable. Without that, we wouldn't have this thread and I would still be stuck with the problem .

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
New Here ,
Jun 30, 2015 Jun 30, 2015

Copy link to clipboard

Copied

LATEST

Hello, i have same issues with FMS 4.5, can you put here a sample of code with the assigning of private variabile to the stream and adding to the global valiabile?

Thanks

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