Skip navigation
Currently Being Moderated

Serverside stream recording suddenly stops

Jun 15, 2011 2:28 PM

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.

 
Replies
  • Currently Being Moderated
    Jun 15, 2011 2:36 PM   in reply to ImAStreamer

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 25, 2012 9:23 AM   in reply to Nikhil Pavan Kalyan

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 4:03 PM   in reply to rexdtripod

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 5, 2012 1:36 AM   in reply to rexdtripod

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

    }

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 9:51 AM   in reply to Nitin Goel

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 7, 2012 10:57 PM   in reply to rexdtripod

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 7:49 AM   in reply to Nitin Goel

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 21, 2013 7:00 AM   in reply to ImAStreamer

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

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 29, 2013 10:49 PM   in reply to ImAStreamer

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points