Professional Web Applications Themes

strange live stream recording issue - Macromedia Flash Flashcom

We are trying to record longer live streams on FMS 2.0 real-time by duplicating the stream on the FMS and recording plus broadcasting at the same time. The recording seems to work but for some strange reason FMS stops recording after the first 4-5 minutes without throwing any error. Any idea what might be causing this? Which settings should we check? Any assistance is highly appreciated. Here is the code portion that handles the recording ('play' is the stream that is published from the streaming client): var stream = Stream.get('broadcast/'+chid+'/'+date.getTime()); stream.owner = this; stream.onStatus = function(info) { if (info.code == ...

  1. #1

    Default strange live stream recording issue

    We are trying to record longer live streams on FMS 2.0 real-time by duplicating
    the stream on the FMS and recording plus broadcasting at the same time. The
    recording seems to work but for some strange reason FMS stops recording after
    the first 4-5 minutes without throwing any error. Any idea what might be
    causing this? Which settings should we check? Any assistance is highly
    appreciated.

    Here is the code portion that handles the recording ('play' is the stream that
    is published from the streaming client):

    var stream = Stream.get('broadcast/'+chid+'/'+date.getTime());
    stream.owner = this;
    stream.onStatus = function(info) {
    if (info.code == 'NetStream.Play.UnpublishNotify') {
    application.saveVideo(this.owner, this.name, Stream.length(this.name));
    }
    };
    stream.record();
    stream.play('channel.'+chid);

    Thank you.

    graphite12 Guest

  2. #2

    Default Re: strange live stream recording issue

    This is similar to another problem that came up not sol long ago... it turned
    out to be how the stream variable was declared.

    Is the portion of code you posted part of a function? If so, this line:

    var stream = Stream.get('broadcast/'+chid+'/'+date.getTime());

    might be the problem.

    If you declare a variable inside of a function, the scope of that the variable
    is function, not the application. When the function terminates, the variable
    will get garbage collected on the next GC. As I understand things, that will
    cause the stream to be closed.

    I might try assiging the stream var to the application object:

    application.stream = Stream.get('broadcast/'+chid+'/'+date.getTime());


    JayCharles Guest

  3. #3

    Default Re: strange live stream recording issue

    Tried as you suggested and it worked. Thanks for saving the day!
    graphite12 Guest

Similar Threads

  1. Lag When Recording Live Stream
    By yairekko in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: October 10th, 05:57 PM
  2. Embed live cue data in live stream?
    By mconnell1 in forum Macromedia Flash Flashcom
    Replies: 7
    Last Post: July 12th, 06:01 PM
  3. Recording a stream and using it on the fly
    By maelick in forum Macromedia Flash Flashcom
    Replies: 4
    Last Post: March 13th, 09:53 AM
  4. Problem with recording a live-stream
    By alcedis in forum Macromedia Flash Flashcom
    Replies: 2
    Last Post: February 28th, 02:29 PM
  5. Problems when recording a live Stream
    By fcMX in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: June 1st, 09:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139