Skip to main content
Known Participant
June 15, 2011
Question

Serverside stream recording suddenly stops

  • June 15, 2011
  • 4 replies
  • 4794 views

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.

    This topic has been closed for replies.

    4 replies

    Participant
    March 6, 2015

    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 .

    Participant
    July 1, 2015

    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

    Participant
    June 6, 2014

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

    Known Participant
    January 16, 2013

    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.

    Participant
    January 21, 2013

    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);

    }

    Known Participant
    January 21, 2013

    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.

    Nikhil_Kalyan
    Participating Frequently
    June 15, 2011

    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.

    Known Participant
    July 25, 2012

    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

    Known Participant
    August 1, 2012

    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.