Open topic with navigation

# analyze_video_in_document

DEPRECATED:

This function is deprecated in HPE Connector Framework Server version 11.1.0 and later. It is still available for existing implementations, but it might be incompatible with new functionality. The function might be removed in future.

HPE recommends using the function analyze_media_in_document instead.

The function `analyze_video_in_document` performs video analysis on a file associated with a document. HPE CFS adds the results of analysis to the document’s metadata. If analysis is not successful, the function results in a Lua error.

NOTE:

You do not need to add the field `AUTN_NEEDS_VIDEO_SERVER_ANALYSIS` to the document to use this function.

## Syntax

    analyze_video_in_document(document, params)

## Arguments

Argument | Description
--- | ---
`document` | (LuaDocument) The document to analyze. Video analysis is performed on the file associated with the document.
`params` | (table) A table of named parameters to configure video analysis. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. For information about how to use named parameters refer to the HPE Connector Framework Server Administration Guide.

## Named Parameters

Named Parameter | Description | Configuration Parameter
--- | --- | ---
`request_parameters` | (table) Additional parameters to pass to the Media Server `process` action. |
`section` | (string) The name of a section in the CFS configuration file. If you set this then any parameters not set in the `params` table are read from this section of the configuration file. |
`server` | (table) A table of additional named parameters that configure communication with Media Server. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. |
`transform` | (string) The filename of an XSL transform. This is applied to the response from Media Server before the metadata is added to the document. | VideoAnalysisTransform

## Media Server Settings

Named Parameter | Description | Configuration Parameter
--- | --- | ---
`section` | (string) The name of a section in the HPE CFS configuration file. If you set this then any parameters not set in the `server` table are read from this section of the configuration file. If you do not set this parameter, the value of `section` from the `params` table is used. |
`host` | (string) The host name of the machine running Media Server. | VideoServerHost
`port` | (Number) The Media Server ACI port. | VideoServerHost
`sslSection` | (string) The name of a section in the HPE CFS configuration file that contains settings for communicating with Media Server over SSL. | VideoServerSSLConfig
`readFromOriginalLocation` | (Boolean) A Boolean that specifies whether Media Server can read the video file from its original location. If you set this parameter, `sharedPath` is ignored. | ReadFromOriginalLocation
`sharedPath` | (string) To transfer the video file to Media Server through a shared folder, set this parameter to the path of the folder. Both CFS and Media Server must have access to this folder. If you set `readFromOriginalLocation`, this parameter is ignored. | VideoServerSharedPath

## Examples

The following Lua script performs analysis on all documents using the settings in the `[MediaServerSettings]` section of the HPE CFS configuration file.

    function handler(document)
       analyze_video_in_document(document,
            { section="MediaServerSettings" });
       return true;
    end

The following example is similar, but overrides the XSL transform and Media Server host set in the HPE CFS configuration file:

    function handler(document)
       analyze_video_in_document(document,
            { section = "MediaServerSettings",
              transform = "transform.xsl",
              server = { host="localhost", port=14000 }
            });
    end

© 2017 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