AnalyzeMedia

Runs media analysis on rich media files, without the need for an IDOL Media Server. All analysis takes place within NiFi. The processor outputs information with the same schema as an IDOL Media Server.

Properties

Name Description
IDOL License Service An IdolLicenseServiceImpl that provides a way to communicate with an IDOL License Server.
Media Service A MediaServiceImpl that manages media analysis resources.
Config

The session configuration to use for analyzing the media files. This is similar to an IDOL Media Server session configuration, with some exceptions.

  • The NiFi processor does not support live streams. To process live streams you must set up an IDOL Media Server.
  • The ingest task must use the NiFiInput engine. This engine can automatically determine whether a file is an image or video, and process it appropriately. For example:

    [In]
    Type=NiFiInput
  • There must be exactly one output task, and it must use the NiFiOutput engine. Other types of output are not supported. To insert data into a database, index documents into IDOL, send information to an HTTP server, and so on, you can use other NiFi processors placed downstream of the AnalyzeMedia processor. The output engine should be configured as in the following example. The Input parameter specifies which records to output (the same as in an IDOL Media Server session configuration).

    [Out]
    Type=NiFiOutput
    Input=...
  • You have the option to embed encoded images and video in your FlowFiles. You can do this with the %flowfile% macro. For example:

    [ImageEncoder]
    Type = ImageEncoder
    OutputPath = %flowfile%/face_%uuid%.png
    ImageInput0 = FaceDetection.ResultWithSource

    The AnalyzeMedia processor supports the ImageEncoder, MPEG, and PDF encoding engines. The other encoding engines are not supported.

  • You can use NiFi expression language in the configuration. Expression language is not supported for setting section names, parameter keys, or the values of the parameters Type, Input, ImageInput, AudioInput, OverlayInput, EventTrack, RegionInput, OCRInput, NumParallel, and MaxFaces.

    For example, to use a FlowFile attribute named LANGUAGE to set the language pack to use for speech-to-text:

    [SpeechToText]
    Type = SpeechToText
    SpeedBias = 6
    LanguagePack = ${LANGUAGE}
    ModelVersion = micro

To edit your session configuration, and to see example configurations, open the guided setup UI by clicking ADVANCED. For more information about Media Server session configurations, refer to the IDOL Media Server documentation.

Model File

Some analysis operations (such as face recognition, object classification, and vehicle analysis) require training. You can provide training by setting this property or by configuring an external PostgreSQL or MySQL database in your IDOL Media Service.

To use a model file that you exported from IDOL Media Server, use this property to specify the file path. The database / classifier / recognizer in the file will be available using the name it was exported with. For example, if you export a face database with the name "sports", you can set Database=sports in a face recognition task in your session configuration.

For information about how to train rich media analysis and export a database file, refer to the IDOL Media Server documentation.

Relationships

Name Description
success Processing was successful.
failure Processing failed.