Media Info Action Plugin



This action plugin retrieves media information about a video or audio file using the popular mediainfo application.

Saved Parameters Description

  • Name: The name used to identify a saved MediaInfo configured instance.
  • Comments: Some comments about this saved MediaInfo configured instance.
  • Media file path: The source file for the analysis operation.
  • Detailed Mode: Equivalent to the -f(full) verbose option for the mediainfo command line. When this option is used most parameter values are returned as array instead of string (see below in the outputs section).
  • Additional Sections: Allows the extraction of other sections beside Audio, Video, General and Image if they are present. For example, in some cases instead of Audio, several sections would be found like Audio #1 and Audio #2
  • Execution Node: The node where the analysis operation must be executed (i.e. the node where the MediaInfo application is installed).
  • Execution Login: The user account used to execute the MediaInfo analysis operation. If not specified the default user accound for the node will be used.
  • Execution Password: The password used to log in into the remote node. If not specified the default password for the node will be used.
  • Addtional Outputs: Provides the ability to extract specific data filed from the data returned by Mediainfo. For each additional output field request, a name and value type must be provided. Also the value needs to be identified. The syntax used is hash_name -> hash_value or if the value is extracted from an array hash_name -> hash_value -> index. For example in detailed mode: Audio->Resolution->1 would return an integer optionally
  • Path to the mediainfo binary: The path to locate the MediaInfo binary in the remote node. Not needed if the binary folder for MediaInfo is in the sytem path for the account use to remote connect on the specified server.
  • Any optional parameters to pass to the MediaInfo process: Any optional parameters supported by the mediainfo binary. Those options will be passed on the command line as they are.

Inputs Description

The list of inputs depends on the configuration of the MediaInfo action template.

  • Source file path: All the variables listed in Source file path field are mandatory and must be of type string.
  • Command line options: All the variables listed in the optional parameters to pass to the MediaInfo process are mandatory and must be of type string.
  • Message:

Outputs Description

  • General: A hash containing all the meta-data information that MediaInfo classifies as General. For example: {'Writing library' => 'VirtualDub build 11636/release', 'Format' => 'AVI', 'File size' => '5.21 MiB', 'Format/Info' => 'Audio Video Interleave', 'Overall bit rate' => '798 Kbps', 'Complete name' => '/Users/mlusinchi/Movies/annie_iodenthour.avi', 'Duration' => '54s 720ms'}
  • Video: Same as above for the Video meta-data. For example: {'Compression mode' => 'Lossy', 'Stream size' => '855 KiB (16%)', 'Format' => 'MPEG Audio', 'Mode' => 'Joint stereo', 'Mode extension' => 'MS Stereo', 'ID' => '1', 'Codec ID' => '55', 'Channel(s)' => '2 channels', 'Alignment' => 'Split accross interleaves', 'Interleave, duration' => '40 ms (1.01 video frame)', 'Format version' => 'Version 1', 'Format profile' => 'Layer 3', 'Interleave, preload duration' => '451 ms', 'Sampling rate' => '48.0 KHz', 'Duration' => '54s 720ms', 'Bit rate mode' => 'Constant', 'Codec ID/Hint' => 'MP3', 'Bit rate' => '128 Kbps'}
  • Audio: Same as above for the Audio meta-data. For example: {'Stream size' => '4.30 MiB (83%)', 'Codec ID/Info' => 'Intel Indeo Video 5.0 Wavelet', 'Format' => 'Indeo 4', 'ID' => '0', 'Codec ID' => 'IV50', 'Display aspect ratio' => '2.35:1', 'Width' => '320 pixels', 'Duration' => '54s 720ms', 'Height' => '136 pixels', 'Bits/(Pixel*Frame)' => '0.606', 'Bit rate' => '659 Kbps', 'Frame rate' => '25.000 fps'}
Note: For each of those hash fields, if several values are provided by mediainfo for the same field, an array is returned instead. This is the case if the -f option is used.

For example, in default mode in the Video hash, a pair 'Bit rate'=>'638 Kbps' whereas in full mode (-f), the pair is 'Bit rate'=>['637520','638 Kbps']

Supported Actions

None

Dependencies

None

Operating Instructions

This action executes the specified file analysis operation on a remote node where MediaInfo is available.

The connection to the remote server is done over SSH, so please make sure that the target server has SSH enabled to it. If the server is a Windows machine, OpenSSH can be installed. Aspera PointToPoint or Enterprise Server will provided SSH with it.

It is typically a good idea to provide the explicit path to the mediainfo binary to avoid configuration issues. On a Unix machine, running which mediainfo should provide the path information.

Important:

1. This action plugins does not do any file movement. Hence, for it to run a file analysis, the specified file has to be accessible. Either the file is transferred to that server or it must be accessible from that server either on some type of network share.

2. MediaInfo does not explicitly fail when the file is not found. The plugin provides empty information for General, Video, Image. So during development or testing, when you encounter this scenario please check the file path (relative to the remote node) and also the permissions to the file.

Use on a Windows Node:

When the execution node is Windows, a couple of considerations need to be taken into account during the configuration:

1/ the mediainfo CLI needs to be installed. It can be downloaded separately from either of the following:
http://mediaarea.net/download/binary/mediainfo/0.7.64/MediaInfo_CLI_0.7.64_Windows_i386.zip (32 bit)
http://mediaarea.net/download/binary/mediainfo/0.7.64/MediaInfo_CLI_0.7.64_Windows_x64.zip (64 bit)


2/ the etc/passwd file needs to be set for the SSH user used by Orchestrator with a valid user root and to use the 'bin/sh' shell (the switch shell has bizarre escape rules that are best be avoided). In the case below '/' is used as the doc root for the user Orchestrator

The passwd file if Aspera Point to Point or Enterprise server is used to provide the remote access, will be found in C:\Program files\aspera\Enterprise Server\etc\passwd.