Recording Live Streams on FMS remotely

Hi,
We're using FMSS 3 to stream live feeds from cameras.
However, we'd also like to have the ability to (via an
administration site) record these live streams and allow the user
to view pre-recorded streams instead of the live ones.
Does anyone know of an example of how I can tell FMS to start
recording a stream (via a web service or AS), and then how to stop
it? Just for clarification - we don't want FMS to record a stream
from the user's own camera. We want to record the live streams that
are already streaming on FMS.
Thanks,
Filip Stanek
bloodforge.com

you can creat an app folder in fms folder which is inside of
ur setup folder,
for details u can mail at [email protected]

Similar Messages

  • Problem playing remote live stream from FMS

    Hello all,
    I'm having problems playing remote live streams from FMS (server-side) that I can play with any other player (client-side)
    Example of server-side application which plays a remote live stream:
    nc = new NetConnection();
    nc.connect("rtmp://remoteserver/live");
    stream = Stream.get("localStream");
    stream.play("remoteStream.flv", -1, -1, true, nc);
    This code works only sometimes.
    Most of the times, FMS is able to connect to remote string and the localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
    In this case, FMS is publishing the local stream but it is not playing the remoteStrem on it.
    The rest of the times, localStream dispatches events:
       NetStream.Publish.Strart
       NetStream.Play.Reset
       NetStream.Play.Start
       NetStream.Data.Start
    In this case FMS plays the remoteStream correctly.
    Any hint to solve this issue?
    Regards.

    Thanks, I tried your code and it works when playing a remote live stream on another FMS.
    But the remote live stream is not on a FMS but on a Wowza Server which re-streams an RTSP stream over RTMP.
    With this code:
    var nc;
    var myStream;
    application.onAppStart = function(){
         nc = new NetConnection();
         myStream = Stream.get("localstream");
         myStream.onStatus= function(info){
               trace(info.code);
         nc.onStatus = function(info){
               trace (info.code);
               if(info.code == "NetConnection.Connect.Success" ){
                    myStream.play("remoteLive.sdp", -1, -1, true, nc);
         nc.connect("rtmp://remoteServer/live");
    Every live stream player I tried was able to play the remote stream "remoteLive.sdp", but FMS play it only sometimes. This is the output log of the FMS application:
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset        <--------------------------------- Stuck there, stream won't play
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset
    NetStream.Play.Start         <--------------------------------- Stream is playing just fine
    NetStream.Data.Start
    Unloaded application instance wowza4/_definst_ <--- Reload app
    NetConnection.Connect.Success
    NetStream.Publish.Start
    NetStream.Play.Reset       <--------------------------------- Stuck there, stream won't play
    Any idea? Why FMS won't play it everytime?
    Regards

  • Archiving live stream at FMS and injecting metadata: VP6 good h264 not

    When I record a live stream at FMS, one in which I've injected  metadata in my main.asc file, the archived file plays back fine.  The  metadata plays back too.  I'm able to retreive it just fine - if I  encode VP6.
    If I encode h.264 the file plays back but  the metadata does not.  The fact that the archived file is created and  plays back tells me things are wired correctly.  The only thing I  changed is the format.
    According to FMS docs (http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc9 5e-7e42.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f35)
    ..."The recording format is determined by the filename you pass to the Stream.get()
    method."
    So my record code looks like the following:
    application.onPublish = function(client, stream) {
         trace("onPublish");
         s = Stream.get("mp4:streamname.f4v");
         if(s){
             s.record();
         this.doRepublish(this.nc, stream);
    My code that injects the data in to the stream looks like this:
    Client.prototype.sendDataEvent = function(data) {
         trace("Call to sendDataEvent...");
         this.newStream = Stream.get("mp4:streamname.f4v");
         this.newStream.send("onTextData",data);
    All must be wired  correctly because the metadata comes through during the live stream.  On  play back of the archive though, the metadata doesn't appear to be  there.
    Any thoughts?
    Thanks

    My apologies on the s.play() confusion.  I had been trying different versions of the code and posted the one without it.
    Whether I include s.play() or not the file gets created.  Here are the various versions of the onPublish() function I've tried (differences in red):
    1.
    application.onPublish = function(client, stream) {
        trace("onPublish");   
        s = Stream.get("mp4:streamname.f4v");
        if(s){
            s.record();
            s.play("mp4:streamname.f4v");
        this.doRepublish(this.nc, stream);
    2.
    application.onPublish = function(client, stream) {
        trace("onPublish");   
        s = Stream.get("mp4:streamname.f4v");
        if(s){
            s.record();
            s.play(stream);
        this.doRepublish(this.nc, stream);
    3.
    application.onPublish = function(client, stream) {
         trace("onPublish");   
         s = Stream.get("mp4:streamname.f4v");
         if(s){
             s.record();
         this.doRepublish(this.nc, stream);
    All produce the same result - an archived file called mp4:streamname.f4v in my streams folder.  This file plays back fine but does not play back the commands.
    On your other question, about things working fine for VP6, it works fine for FLV.  A file called streamname.flv is produced.  This file plays back fine and does indeed play back commands baked into the file as well.  This is what makes me believe the code is not the problem.  If it works perfectly for one format, there would seem to be very little I could do in my code to break things for the other.
    Can you try this using the record() code snippets in the live docs Stream.record() section?
    http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc9 5e-7e42.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f35
    All you'd need is the code snippets there to record your live stream and another server side function to inject commands into that live stream. Here is that function:
    Client.prototype.sendDataEvent = function(data) {
        trace("Call to sendDataEvent...");
        this.newStream = Stream.get("mp4:streamname.f4v");
        this.newStream.send("onTextData",data);
    Do something simple like call onTextData and pass some text in the data parameter.  Then on the client side viewer, handle the onTextData method.  It will receive the text.  Display it in a text area or something.
    If you record while injecting this text into your stream, the text should display on playback of the archived file.  It will if you encode VP6/FLV, but not if you encode H.264/F4V.
    Let me know what you discover.

  • Record Live event on FMS

    I have same issue by FMS and F4V format.
    I want to archive live event at same time and to do that I record live stream in F4V format on the onPublish event.
    This is main.asc codes:
    [code]
    //live stream fragments
    var liveStream = Stream.get("f4f:" + streamName.name);
    liveStream.record();
    liveStream.play(streamName,-1,-1);
    //Create Archive (f4v) for on-demand
    var vodFile = Stream.get("mp4:" + StreamName.name + ".f4v");
    vodFile.record();
    vodFile.play(streamName,-1,-1);
    [code]
    So when I use h264 in my source event when FMS create f4v, F4V file is 320kb (f4v isn't growing) and just record 5 second of my event whoever my live event is more than 1 hour.
    But when I don't use h264 in source event my F4V file is correct and record all 1 hour video from live event.
    I don't know what's a problem
    I use FMS 5 extended edition and FFMPEG for stream webcam on to the FMS
    This is my FFMPEG code:
    [code]
    ffmpeg -f dshow -i video="A4TECH USB2.0 PC Camera" -vcodec libx264 -b:v 32k -acodec libmp3lame -b:a 64k -ar 44100  -f flv rtmp://12.11.1.3/livepkgr/liveevent?adbe-live-event=liveevent
    [code]
    Please advise me to solve this problem.
    Many Thanks.

    Solve above problem with edit FFMPEG syntax.
    [code]
    ffmpeg -y -f dshow -s 640*480 -i video="A4TECH USB2.0 PC Camera":audio="Microphone (Creative SB Audigy 2 ZS (WDM))"  -c:v libx264 -b:v 120k -pix_fmt yuv420p -vb 450 -an -map 0:0 -acodec libmp3lame -b:a 64k -ar 44100 -f flv rtmp://12.11.1.3/livepkgr/Liveevent?adbe-live-event=Liveevent
    [code]

  • Publish Live stream to FMS on RTMPE protocol

    Hi,
    I am trying to publish Live Stream to FMS using FMLE or third party encoders.
    Is it possible to have RTMPE or RTMPTE protocol used between encoder and FMS?
    Very urgent.
    thanks,
    Pooja Jain

    FMLE can only publish via rtmp or rtmpt.

  • Playback of low bitrate flv or f4v from live stream in FMS causes player buffer to empty

    We are experiencing a consistent issue when playing a low bitrate (300kbps or less) flv in a live stream from FMS.  Basically, the player will will start off with the appropriate buffer, say 5 seconds, then begin dropping until it empties out, and will have to rebuffer.  We've tried with a variety of flv and f4v files, all that are 300kbps or less, and we consistently get the issue.  Is this something Adobe can investigate in FMS?  Or are there any suggestions on how we can get around the issue?

    hey, i got the similar problem, logging like this
    2012-11-12
    18:50:12
    23434
    (e)2661034
    Connect failed ( , 5779212 ) : Connect failed: Connection refused (111)
    2012-11-12
    18:50:54
    23434
    (e)2661034
    Connect failed ( , 5779212 ) : Connect failed: Connection refused (111)
    2012-11-12
    18:51:36
    23434
    (e)2661034
    Connect failed ( , 1166880400 ) : Connect failed: Connection refused (111)
    2012-11-12
    18:54:14
    23434
    (e)2661034
    Connect failed ( , 1175301776 ) : Connect failed: Connection refused (111)
    2012-11-12
    18:54:55
    23434
    (e)2661034
    Connect failed ( , 1164775056 ) : Connect failed: Connection refused (111)
    2012-11-12
    18:55:37
    23434
    (e)2661034
    Connect failed ( , 16 ) : Connect failed: Connection refused (111)
    2012-11-12
    19:13:08
    23434
    (e)2661034
    Connect failed ( , 1158459024 ) : Connect failed: Connection refused (111)
    it seems that the port number is invalid, but we never use such ports.

  • Record Live Streaming Video

    Does iMovie allow me to play and simultaneously record live streaming video?

    I did not make myself clear. I want to capture the live streaming video from a local television station web feed. It seems iMovie does not do that or I don't know how to make it record. What application allows me to record the streaming feed? Thanks again.

  • How to copy recorded live stream to new drive

    I was wondering if anyone out there knows how to copy a recorded live stream to a new drive on the server?  I can copy the file within the virtual app directory but not to another drive.
    The only solution i found was to edit the application.xml:
    <StreamManager>
            <StorageDir>e:\Sync\</StorageDir>
        </StreamManager>
    But unfortunately i need to rename the file once its recorded, and i'm having a hard time accessing that drive/directory where the file is located.
    Any help is greatly appreciated.
    thanks

    Hi,
    What I understood from your query I am providing you a solution:
    1. You can use the below to copy recorded live stream to new drive/directory in Application.xml
    <StreamManager>
            <StorageDir>e:\Sync\</StorageDir>
    </StreamManager>
    2. By default, a script can access files and directories only within the application directory of the hosting application. A server administrator can grant access to additional directories by specifying virtual directory mappings for File object paths. This is done in the FileObject tag in the Application.xml file, as shown in the following example:
    <FileObject>
          <VirtualDirectory>/_definst_;e:\Sync\_definst_\</VirtualDirectory>
    </FileObject>
    3. Create one application folder suppose test and then create main.asc file inside that which will have the below code
    application.onConnect = function(client) {
    application.acceptConnection(client);
    var fileObj = new File("_definst_");
    var fl = new Array();
    trace("File name : " + fileObj.toString());
    if (fileObj != null)
      if (fileObj.isDirectory)
       fl = fileObj.list();
       for (i in fl)
        trace("Directory : " + fl[i].name);
        if (fl[i].isFile)
         trace("File : " + fl[i].name);
         trace(fl[i].renameTo("dvrstream"+i));
        }//if closes
       }// for closes
      }//if closes
    }//if closes
    }// application closes
    This server side application rename files but since the folder which we had to access was outside application directory of the hosting application we had to map it using step 2.
    If this solution does not answer your query please be more ellaborative on what exactly are you trying to achieve. That will help me to answer your query correctly.
    Regards,
    Amit

  • Fms force record live streams

    Hi there,
    Just wondering if it is possible to force recording of all streams in a given application ...
    So the scenario s that the client is sending live stream, but as well as this we need to recrd that stream . I know I can do sass and create a stream object. But I ned red if there was a better way which would be a simple config option
    Many thanks
    Matt

    Hi Matt,
    I don't think you can accomplish DVR without writing a server side script.
    You can, however, go through this- the DVR reference guide:
    http://help.adobe.com/en_US/flashmediaserver/devguide/WS236AE81A-5319-4327-9E44-310A93CA09 C6Dev.html
    Thanks.

  • Lag When Recording Live Stream

    I am experiencing a very strange behavior from FMS
    I am conducting a live conversation between 2 people using
    their webcams. One of the participants have a relatively slow
    computer (we think its the anti-virus). When conducting the live
    session everything seems to be fine... Still a bit slower than fast
    computers but still pretty good.
    We are doing the following test:
    We do a combined count from 1 to 20.
    participant-1 counts "1" (this is the slow computer)
    Only after hearing his count participant-2 counts "2"
    Again, only after hearing his "2" participant-1 counts "3"
    and so on...
    so the count goes from participant-1 to the server and from
    there to participant-2 only then the "2" count leaves participant-2
    to the server and so on...
    This session is being recorded. What I am getting in the
    recored video is very strange...
    I am getting participant-2 count before participant-1. So the
    count goes:
    2,1,4,3,6,5 and so on
    How is this possible to have the order correct on the live
    and not on the recorded?

    Hi,
    As it is , in the current form, both the applications cannot make VOD files directly. The live sample application can be modified to have a server side recording of the incoming live stream that can then be played as vod stream.

  • Time shifting and record live stream

    Hellow everyone,
    I would like to stream videos for my viewers and them have a abiliti to timeshifting live stream.
    Can I use live application for timeshifting? Or I should use livepkgr to do that.
    For archive and play on the VOD mode I like to stream live and record at same time. in the livepkgr I see in the stream folder create a stream file with the f4f extention automaticaly whoever in the live application I should call application.record on the FMS to save live stream on the server.
    Please advise me the better solution to archive and time shifting.
    Many Thanks.

    livepkgr application for for HTTP streaming...
    f youjust want to stream over rtmp use live application and code to record the stream...recording is pretty simple in AMS just call Stream.get() s.record(...) s.play() where s is the stream which you are recording...
    application.onPublish = function(clientObj, streamObj) {      trace("recording started...");       var strName = "recorded_" + streamObj.name;      var s = Stream.get(strName);      if (s == undefined )           return;         s.onStatus = function(info)      {           trace(info.code);      }           if (!s.record("record"))      {           s.trace("record failed.");      }            s.play(streamObj.name, -1, -1, true); }

  • Encode archive of live stream on FMS 4

    I thought by what I have initially read that this was possible, but I am not sure.
    What we would like to do is create an archive (f4v or mp4) on the FMS 4 server any live stream that is pushed from our endpoints.  Primarily as a backup and if necessary - an editable file within CS4 or CS5.
    We are at a University and capture lecture powerpoints natively and sometimes need to edit the files.  flv is not enough and we would like to take afvantage of mp4 and the FMS server while we use it for overflow as a recorder.
    Can anyone clarify if this can be done?
    Thanks
    -Brian

    Recording can be triggered via client-side publish call, or via server-side script.  From the publish cmd, you specify "record" option.  For example,
    ns.publish("mp4:foo", "record"); // ns is a NetStream, "mp4:" prefix tells FMS to record using MP4 container
    Otherwise, if you want to trigger the record via server-side as Jay says, you can simply publish the stream as,
    ns.publish("mp4:foo");
    then from server-side AS, do something like,
    // this handler is called when a stream is published
    // clientObj is the client that is publishing the stream
    // streamObj is the stream that is being published
    application.onPublish = function(clientObj, streamObj)
        streamObj.record("record"); // start recording the stream

  • Recording live streams and streaming them through VOD service

    We have a licenced FMS interactive 4.5. Currently we have a one time per day Live stream event which is streamed by FMLE to livepkgr application. As far as I understand the event is recorded on the server. We want to share that record on FMS vod service. Sadly I cannot find any real information how to do this? Do we have to code our custom Flash application for FMS for that, like livepkgr2 ? How to get the record and copy the file exactly the moment the record finished? Maybe somebody already did this?

    you can creat an app folder in fms folder which is inside of
    ur setup folder,
    for details u can mail at [email protected]

  • Custom metada and record live stream

    I tried to inject my own metadata into a live stream (webcam) recorded on FMS 4.5.1
    with no success. I was able to change only the standard metadata but not all my custom ones were recorded
    despite of all example on adobe livedocs, no luck.(as2 and as3)
    this example
    http://help.adobe.com/en_US/flashmediaserver/devguide/WS5b3ccc516d4fbf351e63e3d11a0773d56e -7ff6Dev.html
    doesn't work at all for custom metadat and EVEN recroded special metadata like createdby and creationdata
    example:
    metaData.createdby = String(streamTitle + " of "+fullName);
    metaData.creationdate = String(now.toString());
    metaData.tags = {createdby:metaData.createdby, creationdate:metaData.creationdate};
    metaData.width = Number(devicesQuality.width);
    metaData.height = Number(devicesQuality.height);
    nodeSendStream.send("@setDataFrame", "onMetaData", metaData);
    once the stream is recorded I can see only metData.width and height. createdby, creationdate and tags don't exist.
    notice: I encode and stream from FP11.1 in H2564 with speex or pcmu
    Thanks

    well,
    I exactly respected the example of the link you gave by modifying the Application.xml, but if it was a segment problem
    how can you explain that the NON custom metadas are successfully modified ?
    please check this link
    http://help.adobe.com/en_US/flashmediaserver/devguide/WS5b3ccc516d4fbf351e63e3d11a0773d56e -7ff6Dev.html
    I even tried the official property called createdby and creationdate without success. I was able to change only  width and height
    the code I use from the client is exactly the example of adobe manual, in AS2 and AS3
    Thanks

  • Live streaming with multiple remote cameras?

    look up lts security, i found it as a easy, high quality, low cost,  and great solution 

    I didn't see any discussions on SpiceWorks that covered this question. I'm involved in live streaming of my church's services, and we got hit by lightening 2 weeks ago. We had 3 cameras which were able to be remotely controlled by 1 Telemetrics box, and which sent video feed into a digital video mixer. Well, one of the cameras and the remote control box have died, so we are looking to replace the setup with better equipment. I'm able to run the equipment, and even troubleshoot it to an extent, but have no idea what's even out there. Does anyone have any recommendations on a setup for at least 3 remotely controllable (pan/tilt/zoom) HD cameras? The remote control could be either hardware or software based. I have no idea how much the church could budget for a new system, so a range of low-high cost options would be ideal for me to...
    This topic first appeared in the Spiceworks Community

Maybe you are looking for