FMS server record stream from stored FLV

Ask a Question related to Macromedia Flash Flashcom, Design and Development.

  1. #1

    Default FMS server record stream from stored FLV

    All,
    I have an application where a user records a temp cam video. This temp video
    is stored on FMS. The user can crop the beginning and end times to save as the
    final video.

    The user passes the times through the nc.call method to FMS where the server
    Stream gets the "final" flv (just the stream name), starts to record on the
    "final" flv, and then plays the temp flv with the start and end times passed as
    variables.

    Now, the problem. If variables are passed, no cropping is accomplished. If I
    hard-code the times, cropping is accomplished. How strange...Anyway, any
    suggestion is appreciated.

    Thanks,
    Shack

    //Client code
    //__userID is varibale passed from logon (i.e. 123)
    //__startTime is variable inputed to TextInput
    //__endTime is variable inputted to TextInput
    __nc.call(""submitVideo", null, __userID, _startTime, _endTime)

    //Server side

    Client.prototype.submitVideo = function(p_userID, p_startTime, p_endTime)
    {
    var userID = p_userID;
    var start = p_startTime;
    var end = p_endTime;

    myStream = Stream.get(userID);//Creates the "final" flv stream for recording
    myStream.onStatus = function(info){
    switch (info.code) {
    case "NetStream.Record.Stop" :
    trace("Stream Record Stopped")
    myStream.flush();
    application.clientID.call("RecordVideo/onSubmitVideo",null);
    break;
    case "NetStream.Record.Start" :
    trace("Stream Start Record")
    //myStream.send("RecordVideo/onSubmitVideo",null);
    break;
    case "NetStream.Record.Failed" :
    trace("Stream Record Failed")
    //myStream.send("RecordVideo/onSubmitVideo",null);
    break;
    case "NetStream.Play.Start" :
    trace("Stream Play Start")
    //myStream.send("RecordVideo/onSubmitVideo",null);
    break;
    case "NetStream.Play.Stop" :
    trace("Stream Play Stopped");
    myStream.record(false);
    //myStream.send("RecordVideo/onSubmitVideo",null);
    break;
    case "NetStream.Play.Failed" :
    trace("Stream Play Failed")
    //myStream.send("RecordVideo/onSubmitVideo",null);
    break;
    }
    }
    if(myStream){
    trace("User ID :" + userID + "\nStart Time :" + start + "\nEnd Time :"+ end)
    myStream.record();//Records the userID stream name to be stored as "final"
    myStream.play("temp_" + userID, start, end); //Hard-coding values here crops
    video
    }
    }


    B_Shack Guest

  2. Similar Questions and Discussions

    1. Record live stream with different name
      Hi all! I have a live streaming application running with FMS2 and I have come across an issue with recording streams. My application allows a...
    2. FMS2 fails to record the stream
      Hi, This has been a frustrating week, so i REALLY appreciate any help in advance We have installed FMS 2.0.4 on linux (tried both ubunto and...
    3. FLV record stream varying quyality?
      I am wondering how you would create an app which streams varying quality recorded FLVs, based on user input or bandwidth. Is it possible to take a...
    4. To record Stream de V?deo with bigger quality?
      Already I finished to make the skeleton of my application... It is with that I want... Now the only problem that I do not know if exists solution...
    5. How to stream MP3s stored above the root
      My mp3s are kept above the root to protect them from unauthorized download. I am currently using cfcontent to dynamically retrieve the audio files...
  3. #2

    Default Re: FMS server record stream from stored FLV

    Well... for starters, I see a syntax error in you client side code:

    __nc.call(""submitVideo", null, __userID, _startTime, _endTime)

    I see an extra quote in that line before the name of the server side method.
    I'm surpised the compiler didn't catch that, and even more surprised that you
    didn't get a "method not found" error in the FMS debug.

    When you see the trace from this line:

    trace("User ID :" + userID + "\nStart Time :" + start + "\nEnd Time :"+ end)

    do you see the values, or are they undefined?

    JayCharles Guest

  4. #3

    Default Re: FMS server record stream from stored FLV

    Jay,
    It's a typo here. Code compiles just fine. I recieve all the variables that
    I pass to the servide side (that's why it's sooo strange). I even defined the
    start and end as new numbers, but still no go. ???

    Thanks,
    Shack

    B_Shack Guest

Posting Permissions

  • You may not post new threads
  • You may 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