Skip to main content
Participating Frequently
December 15, 2010
Answered

FMS+FMLE record+life stream problem

  • December 15, 2010
  • 4 replies
  • 3379 views

So i have FMLE and FMS. to record and stream video at the same time.

оn server side i have "main"

application.onPublish =  function(client, potok){

potok.onStatus = function(info){
  for(var i in info){
   trace(i + "=" + info);
  }
}
potok.record("append");
potok.play (potok.name, -1, -1, false);
}

application.onUnpublish =  function(client, potok){
  potok.record(false);
}

on client-side i have FLVplayback with src = "serverName/ appName / instance1 / streamName"

here's server log

Sending error message: Method not found (releaseStream).
Sending error message: Method not found (FCPublish).
code=NetStream.Play.Failed
code=NetStream.Data.Start

PLZ HELP. im really crazy about it

    This topic has been closed for replies.
    Correct answer Shiraz Anwar

    also pasting the code that I was using ... hope that may help...

    var mystream;

    var intervalID;

    application.onConnect = function(clientobj)

    {

      return true;

    }

    application.onPublish = function(clientObj,streamObj){

    trace("In app pub:");

    mystream = Stream.get("hello");

    mystream.onStatus = function(info)

    {

         trace("mystream onstatus:"+ info.code);

    }

    mystream.record();

    trace("Got it via FMLE = " + streamObj.name);

    mystream.play(streamObj.name);

    }

    application.onUnpublish = function(clientObj,streamObj){

    mystream.record(false);

    }

    4 replies

    Participating Frequently
    December 16, 2010

    i just tried

    rtmp://ServerName/AppName/instance1/streamName

    streamName = hello (like in get(""))

    dont work.

    Adobe Employee
    December 16, 2010

    hmm .. it should work man ... not sure why playback is not working for you ... I have just given it a try and the same thing is working for me. I followed these steps and you can match if you are doing something differently:

    1. Copy all the code in a main.asc file.

    2. Put this main.asc file inside an application lets say named "app1"

    3. Using FMLE try to connect to an instance of this app, lets say room1, as follows - "rtmp://localhost/app1/room1"

    4. As soon as you start publishing, you will see a file recorded inside streams/room1 folder.

    5. Use sample videoplayer, and provide this string to playback - "rtmp://localhost/app1/room1/hello"

    For me it was working fine ... btw, are you sure that there are no problems in your client-side swf file which may be hampering the playback.

    In case, if it doesn't work please try using the Method1. That will certainly help you and let me know your experiences.

    Regards,

    Shiraz Anwar

    Participating Frequently
    December 16, 2010
    function(){return A.apply(null,[this].concat($A(arguments)))}function(){return A.apply(null,[this].concat($A(arguments)))}

    Sending error message: Method not found (releaseStream).
    Sending error message: Method not found (FCPublish).
    mystream onstatus:NetStream.Play.PublishNotify
    In app pub:
    Got it via FMLE = ProninStreamD11
    mystream onstatus:NetStream.Data.Start
    mystream onstatus:NetStream.Record.Start
    mystream onstatus:NetStream.Unpublish.Success
    mystream onstatus:NetStream.Publish.Start
    mystream onstatus:NetStream.Play.Reset
    mystream onstatus:NetStream.Play.Start

    USE METHOD 2

    I think it works but i dont get what would be the source for FLVplayback?

    rtmp://ServerName/AppName/instance1/streamName - i tried like this

    streamName = ProninStreamD11

    Adobe Employee
    December 16, 2010

    While playing back, please use the streamname used in "stream.get()" API call.... that should do ... are you able to record the file on server??

    Participating Frequently
    December 16, 2010

    Yes. no ploblems with recording. AppName/Streams/instance1/hello.flv

    Adobe Employee
    December 16, 2010

    Hello Surok,

    There are two methods to achieve what are you trying to do:

    Method1:

    =========

    USING DVRCAST APPLICATION:

    1. Download DVRcast application from http://www.adobe.com/products/flashmediaserver/tool_downloads/

    2. Put DVRcast_Origin application inside your application folder.

    3. Use FMLE3.1 or above.

    4. There is a DVR Auto Record checkbox in the bottom right corner of FMLE UI, check this box.

    5. Connect to the application DVRCast_Origin and put any streamname you like.

    6. Start publishing from FMLE

    7. Go to your FMS server and look inside dvrcast_origin folder, you will see a streams folder should be created , and inside streams\_definst_ folder you will be able to locate your recorded file on the server.

    8. Now you can use sample videoplayer (FMS_installation_folder\samples\videplayer\videoplayer.html), bundled with FMS installation (or your own client) to playback the livestream with the name you have provided to FMLE UI.

    Method2:

    ===========

    USING SERVER-SIDE SCRIPT TO RECORD FILE

    1. Use following code snippet in your server-side script:

    application.onPublish = function(clientObj,streamObj){

    trace("In app pub:");

    mystream = Stream.get("hello");

    mystream.onStatus = function(info){

    trace("mystream onstatus:"+ info.code);

    mystream.record();

    trace("Got it via FMLE = " + streamObj.name);

    mystream.play(streamObj.name);

    }

    application.onUnpublish = function(clientObj,streamObj){

    mystream.record(false);

    }

    2. Put this code on the server-side, stream from FMLE after connecting to this application and it should record your file inside streams/_definst_ folder inside your main application folder.

    Hope this will help you to recover from your problem.

    Feel free to let me know if it works/ doesn't work for you.

    Participant
    August 23, 2012

    Hi Shiraz,

    I want to use the DVRcast application from http://www.adobe.com/products/flashmediaserver/tool_downloads/

    but there is no download link there. My FMS version is 4.5 I want to use that application to archive a live stream to disk and then to move to to Amazon S3. Is this possible with the above application and does it can be configured to work with multi-bitrate Live scenarios using FMLE?

    Do you know any other method for transfering the archived file to Amazon S3 apart from s3fs.

    Thanks in advance.

    Goran

    December 15, 2010

    What are you trying to do? In your play() constructor, you're trying to play a stream on itself, which is why it's failing.

    Participating Frequently
    December 16, 2010

    I need the live stream from FMLE to be recorded on FMS server and play online on web at the same time.

    I rename stream in play() - potok.play ("lifeVid",-1,-1,false)

    here`s new log ("ProninStreamD11"- stream name  in FMLE)

    function(){return A.apply(null,[this].concat($A(arguments)))}function(){return A.apply(null,[this].concat($A(arguments)))}

    level=status
    code=NetStream.Publish.Start
    description=ProninStreamD11 is now published.
    details=
    level=status
    details=lifeVid
    code=NetStream.Data.Start
    level=status
    code=NetStream.Play.Start
    description=Started playing lifeVid.
    details=
    code=NetStream.Record.Start
    code=NetStream.Record.Stop
    description=Stopped recording ProninStreamD11.
    details=
    level=status
    description=Recording ProninStreamD11.


    Result - no recorded video on server and cant find the correct URL FLVplayback source

    8(