Skip to main content
Participant
March 19, 2010
Question

How to copy recorded live stream to new drive

  • March 19, 2010
  • 1 reply
  • 502 views

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

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    March 22, 2010

    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.name);
        if (fl.isFile)
        {
         trace("File : " + fl.name);
         trace(fl.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