Skip to main content
Participant
March 14, 2011
Question

DVRCast 1.2

  • March 14, 2011
  • 1 reply
  • 1169 views

Hi,

I am trying to build a DVR Cast app using DVRCast 1.2 provided by Adobe. The problem I am facing right now is that I am finding difficult to record multiple streams at the same time so that I can make dynamic stream to work correctly. Even though Adobe has provided DVRControllerSynch, it does not mention anything how the streams are recorded. Please help.

Thanks,

Ankur

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    March 15, 2011

    Have you refered documentation for DVRCast at "dvrcast1.2\DVRCast1.2\adobe\fms\documentation\flashmediaserver_3.5_dvrcast.pdf" which you get after extracting the zip folder from Adobe site. If you see there you will find a column on how to use DVRControllerSynch application. It basically ensures that recording  of all streams start at the same time not exactly but upto certain extent.

    Regards,

    Amit

    Participant
    March 15, 2011

    I did. However I am not sure about the process. I have a client facing web application using which the user records a video and the video is stored on the server. And to record the video I am using _netStream.publish("VIDEOID", "record"); However I am not sure how to fit in the DVRControllerSynch so that I can record multiple streams of different bit rates.

    Adobe Employee
    March 16, 2011

    See the source code(.mxml) for DVRControllerSynch application and integrate with your existing website application. Main things  to look into the code are the below functions:

    private function startDVR():void{
      status_txt.text += "Starting DVR recording \n";
      var streaminfos:Array = new Array();
      var strInfo:Object;
      var dsSet:Array = new Array();
      for (var i:Number = 1;i<=10;i++) {
        if (this["stream" + i].text != "") {
         dsSet.push(this["stream" + i].text);
        }
      }
      for (var j:Number = 1;j<=10;j++) {
       if (this["stream" + j].text != "") {
        strInfo = getDVRStreamObject(this["stream" + j].text, dsSet);
        streaminfos.push(strInfo);
       }
       //else streaminfos.push("");
      }
      nc.call("DVRSetStreamInfos", new Responder(onDVRSetStreamInfo),streaminfos);
    }

      
    private function stopDVR():void{
      status_txt.text += "Stopping DVR recording \n";
      // Create the NetConnection and listen for NetStatusEvent and SecurityErrorEvent events
     
      for (var i:Number = 1;i<=10;i++) {
       if (this["stream" + i].text != "") {
        stopStream(this["stream" + i].text);
       }
      }
     
    }

    private function getDVRStreamObject(stream:String, dsSet:Array):Object {
      status_txt.text += "starting stream recording: " + stream + "\n";;
      var streamInfo:Object = new Object();
      streamInfo.callTime = new Date();
      streamInfo.streamName = stream;
      streamInfo.offline = false;
         streamInfo.startRec = new Date();
         streamInfo.stopRec = new Date(Date.UTC(1970,00,1,00,-1,59));
         streamInfo.dynamicStreamSet = dsSet;
      streamInfo.rollingWindowSize = rollingWin;
         return streamInfo;
    }

    private function onDVRSetStreamInfo(info):void {
      status_txt.text += "success\n";
    }

    private function stopStream(stream:String):void {
      status_txt.text += "stopping stream recording: " + stream + "\n";
     
         var streamInfo:Object = new Object();
      streamInfo.callTime = new Date();
      streamInfo.streamName = stream;
         streamInfo.startRec = new Date(Date.UTC(1970,00,1,00,-1,59));
         streamInfo.stopRec = new Date();
         nc.call("DVRSetStreamInfo", new Responder(onDVRSetStreamInfo),streamInfo);
    }

    So you can use the swf with relevant functions in it which can be called from outside ie using javascript in your website.

    Regards,

    Amit