Open topic with navigation

# Run Analysis on Specific Documents

To run media analysis on specific documents, use the `MediaServerAnalysis` task. This task only processes documents that have the document field `AUTN_NEEDS_MEDIA_SERVER_ANALYSIS`, so you must add this field to any document that you want to process.

To run media analysis on selected documents

1. Write a Lua script to add the document field `AUTN_NEEDS_MEDIA_SERVER_ANALYSIS` to the documents that you want to analyze. For an example script that adds a field to a document, see Add a Field to a Document.
2. Open the HPE CFS configuration file.
3. Find the `[ImportTasks]` section of the configuration file, or create this section if it does not exist.

4. In the `[ImportTasks]` section, configure a `Pre` or `Post` import task to run your Lua script. For example:

       [ImportTasks]
       Post0=Lua:scripts/TagVideoFiles.lua

5. Add another `Pre` or `Post` task to run the `MediaServerAnalysis` task. Set the `Pre` or `Post` parameter to `MediaServerAnalysis`, followed by a colon (`:`), followed by the name of the section in the CFS configuration file that contains the task settings. For example:

       Post1=MediaServerAnalysis:MediaServerSettings

6. Create a new section in the configuration file, using the name you specified in Step 5.

7. In the new section, set the following parameters:

   `MediaServerHost` | The host name and ACI port of your Media Server. To distribute requests between several servers, specify a comma-separated list of servers.
   `MediaAnalysisTransform` | (Optional) To transform the metadata produced by Media Server, before HPE CFS adds the data to your documents, set this parameter to the path of the XSL transformation to use.

8. Specify the Media Server configuration file that you want to use for running analysis:

   - If you saved your configuration file in the directory specified by the `ConfigDirectory` parameter, in the `[Paths]` section of the Media Server configuration file, set `MediaServerConfigurationName` to the name of the configuration.
   - If you saved your configuration file in a location accessible by HPE CFS, set the parameter `MediaServerConfigurationFileName` to the path of the configuration file. If you set a relative path, specify the path relative to HPE CFS, not relative to Media Server.

9. Specify how to send video to Media Server:

   - If your Media Server can read files directly from the CFS working directory, set `ReadFromOriginalLocation=TRUE`.
   - If your Media Server cannot read files from the CFS working directory, set `MediaServerSharedPath` to the path of a shared folder that is accessible to both HPE CFS and Media Server. HPE CFS copies the files to the shared folder so that Media Server can read them.
10. Save and close the configuration file.

## Examples

The following example shows how to configure the `Me` `diaServerAnalysis` task. This example runs analysis using a configuration named `RecognizeFacesInVideo` that exists on the Media Server machine:

    [ImportTasks]
    Post0=Lua:TagVideoFiles.lua
    Post1=MediaServerAnalysis:MediaServerSettings

    [MediaServerSettings]
    MediaServerHost=localhost:14000
    MediaServerConfigurationName=RecognizeFacesInVideo
    ReadFromOriginalLocation=TRUE

If your HPE CFS and Media Server are running on separate machines, you can configure HPE CFS to copy video files to a shared folder:

    [ImportTasks]
    Post0=Lua:TagVideoFiles.lua
    Post1=MediaServerAnalysis:MediaServerSettings

    [MediaServerSettings]
    MediaServerHost=media1:14000,media2:14000
    MediaServerConfigurationName=RecognizeFacesInVideo
    MediaServerSharedPath=\\server\videofiles

You can also configure HPE CFS to transform the metadata produced by Media Server, before adding it to your documents:

    [ImportTasks]
    Post0=Lua:TagVideoFiles.lua
    Post1=MediaServerAnalysis:MediaServerSettings

    [MediaServerSettings]
    MediaServerHost=media1:14000,media2:14000
    MediaServerConfigurationName=RecognizeFacesInVideo
    MediaServerSharedPath=\\server\videofiles
    MediaAnalysisTransform=xslt/transform.xsl

For more information about the parameters that you can use to configure this task, refer to the HPE Connector Framework Server Reference.

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm