Open topic with navigation

# Run Analysis on All Supported Files

CFS includes Lua scripts that you can use to run analysis on all file formats supported by Media Server.

- `scripts/MediaAnalysis.Lua` runs analysis on all video files that Media Server can process. The script reads settings for the task from the `[MediaServerSettings]` section of the CFS configuration file.
- `scripts/ImageAnalysis.Lua` runs analysis on image files (and PDF files, which may contain embedded images). The script reads settings for the task from the [`ImageAnalysisSettings`] section of the CFS configuration file.

To run video analysis on all supported video files

1. Open the CFS configuration file.
2. Find the `[ImportTasks]` section of the configuration file, or create this section if it does not exist.

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

       [ImportTasks]
       Pre0=Lua:scripts/MediaAnalysis.lua

4. Create a new section in the configuration file to contain the task settings. For the script `MediaAnalysis.Lua` this section must be named `[MediaServerSettings]`. For the script `ImageAnalysis.Lua` this section must be named `[ImageAnalysisSettings]`.

5. 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 CFS adds the data to your documents, set this parameter to the path of the XSL transformation to use.

6. Specify the Media Server configuration file 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 CFS, set the parameter `MediaServerConfigurationFileName` to the path of the configuration file. If you set a relative path, specify the path relative to CFS, not relative to Media Server.

7. 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 CFS and Media Server. CFS copies the files to the shared folder so that Media Server can read them.
8. Save and close the configuration file.

## Examples

The following example configuration runs analysis for all supported video files ingested by CFS, using a configuration named `RecognizeFacesInVideo` that exists on the Media Server machine:

    [ImportTasks]
    Pre0=Lua:scripts/MediaAnalysis.lua

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

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

    [ImportTasks]
    Pre0=Lua:scripts/MediaAnalysis.lua

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

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close We welcome your comments! 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. Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm