4 DIVA Services

Windows Services

The DIVAdirector installer installs two additional Windows Services with the DIVAdirector Web application. You can configure both of the services in the Windows Services console, or through the following command line parameters:

install

This command installs the service.

uninstall

This command uninstalls the service.

start

This command starts the service.

stop

This command stops the service.

TaskManager

The TaskManager Service is responsible for handling any long running background tasks required by DIVAdirector. The binaries for this service are installed in the TaskManager subdirectory, located under the DIVAdirector installation directory (for example, C:\Program Files (x86)\DIVAdirector 5\TaskManager). This service is visible in the Windows Services console with the name Oracle.DIVAdirector.TaskManager.

The TaskManager performs the following functions:

  • House Keeping tasks to clean up the Postgres database

  • House Keeping tasks to clean up log files older that the configured maintenance values

  • Responsible for object synchronization with DIVArchive Manager

Configuring TaskManager

The Oracle.DIVAdirector.TaskManager service configuration file, Oracle.DIVAdirector.TaskManager.exe.config, is located in the C:\Program Files (x86)\DIVAdirector 5\TaskManager\ folder.

Several settings require configuration in the <appSettings> section as follows:

  1. DIVA Enterprise Connect API Endpoint Configuration

    AppName

    This parameter is the name of the application to be registered in the WS API interface. Specifically, this is the value of the appName parameter passed to the registerClient method. This is required before interfacing with the WS API.

    <add key="AppName" value="DIVAdirector" />
    
    ProcessId

    This parameter identifies the process ID number used for registering the client application. Specifically, the value of the processID parameter passed to the registerClient method. This is required before interfacing with the WS API.

    <add key="ProcessId" value="1234" />
    
    LocationName

    This parameter identifies the physical location where the computer running the client is located. Specifically, the value of the locName parameter passed to the registerClient method. This is required before interfacing with the WS API.

    <add key="LocationName" value="location_name" />
    
    DIVArchiveApiUrl

    This parameter identifies the WS API REST endpoint.

    <add key="DIVArchiveApiUrl" value=" https://DIVA-VM-105:9444/diva/service/rest/2.2/DIVArchiveWS_REST" />
    
    ClientId

    This parameter is the client id (username) generated by the Key Generator script during the DWS installation.

    <add key="ClientId" value="e3af4c10-e7ca-4143-970a-46bc0264a46f" />
    
    ApiKey

    This parameter is the API key (password) generated by the Key Generator script during the DWS installation.

    <add key="ApiKey" value="kAkWTK3ObnEOmHheJAKP" />
    
    DWSVersion

    This parameter is the version of the API service that DIVAdirector is targeting.

    <add key="DWSVersion" value="2.2"/>
    
  2. Task and Task Interval Configuration

    The following tasks are configured in the <ScheduledTasks> section and run by the Windows Service. This feature was identified as HouseKeeper in DIVAdirector 5.2. You cannot disable any of these tasks without losing functionality. However, you can tune an interval timer with the IntervalInSeconds parameter to achieve better performance.

    HouseKeeperTask

    This task automates system maintenance operations required by DIVAdirector, including both file system cleanup (removing old log files, purging system directories such as local archive, local proxy, and so on), and database maintenance tasks.

    DIVArchiveSyncTask

    This task is responsible for synchronizing objects with DIVArchive.

    UpdateRequestsStatusTask

    This task monitors and updates the state and progress of a DIVArchive request.

    OnRequestCompleteTask

    This task is responsible for creating proxies in DIVAdirector by sending requests to the transcoding service when a DIVArchive request completes.

    ProxyGenerationTask

    This task is responsible for handling the automatic queuing of proxy generation tasks.

    ProxiesMigrationTask

    This task is responsible for handling the automatic migration of legacy proxies to newer formats.

    CreateProxyOnJobCompleteTask

    This task is responsible for creating proxies in DIVAdirector for queued transcoding jobs that are not associated with a DIVArchive request.

    LegacyStorageMigrationTask

    This task is responsible for reorganizing proxy storage locations after an upgrade to release 5.4 from earlier versions. Users will be unable to log in to DIVAdirector until the migration is complete.

DIVAdirector API Service

The DIVAdirector API Service is a web service responsible for authentication, authorization, and file upload requests for the Local Archive process. This service currently only handles a subset of the application's responsibilities. The binaries for this service are installed in the Api subdirectory located under the DIVAdirector installation directory (for example, C:\Program Files (x86)\DIVAdirector 5\Api). This service is visible in the Windows Services console with the name Oracle.DIVAdirector.Api.

Configuring the API Service

The Oracle.DIVAdirector.Api Service configuration file, Oracle.DIVAdirector.Api.exe.config, is located in the C:\Program Files (x86)\DIVAdirector 5\Api\ folder.

The configurable settings are located in the <appSettings> section as follows:

Note:

These settings are set by the installer during the installation process, so they should not have to be changed under normal circumstances
BaseUrl

This parameter is the endpoint exposed by the web service. This value is the value entered for the DIVAdirector api url during the installation process. Oracle does not advise altering this value after installation without assistance. If this value is changed, the DIVAdirectorApiBaseUrl key in the DIVAdirector web.config file will also need to be changed to match the BaseUrl value. If the port number changes, you must bind the TLS certificate to the updated port using the netsh command.

AccessTokenExpirationInMinutes

This parameter is the amount of time (in minutes) that an authentication token will be valid. This value determines the maximum amount of time allowed before another token must be issued.

Transcode Service

In the following section, the term Transcode Service refers to the Oracle service DIVAdirector uses to connect to multiple transcoder implementations. The term transcoder implementation refers to the specific transcoder configured for DIVAdirector use (for example, Vantage and other external transcoders).

Starting with Oracle DIVAdirector 5.3, a new Transcode Service was introduced. This service contained two main components. Both are Windows services that can be viewed and configured with the Windows Service management console. The first service called Oracle.Transcode.Api.Owin, is a RESTful API for submitting and viewing requests, and viewing currently configured transcoder information (name, release, and so on). The second service called Oracle.Transcode.TaskManager, is a service that handles any long running background tasks. For example, updating status and progress for active transcoding jobs.

Install the Transcode Service first. After installation, configure DIVAdirector to point to the installed Transcode Service. You can then use the DIVAdirector Admin Interface to configure the Transcode Service settings.

Installing the Transcode Service

  1. Run the installer application. Oracle recommends that you install the Transcode Service on the same server as DIVAdirector.

  2. Set the credentials for the two services: Oracle.Transcode.Api.Owin and Oracle.Transcode.TaskManager.

  3. Open the Windows Service Management console and confirm that the two Windows services (Oracle.Transcode.Api.Owin and Oracle.Transcode.TaskManager) are installed and operational.

Modifying the API Service Configuration File

IMPORTANT:

Skip this section if the Transcode Service is installed on the same server as DIVAdirector.

If the Transcode Service is installed on a different server than DIVAdirector, modify the API Service configuration file:

  1. Locate the configuration file for the API service in the installation directory:
    C:\Program Files (x86)\Oracle Corporation\Oracle Transcoder Service\ Oracle.Transcode.Api.Owin.exe.config

  2. Modify the BaseUrl key to the IP address (or host name) and port number (if required) of the server where you are installing the Transcode Service.

    For example:

    <appSettings>
        <add key="BaseUrl" value="http://192.168.11.1:9876/" />
    </appSettings
    

Configuring the Transcode Service

Configure the Endpoint

After installing the transcode server, you must update DIVAdirector to use the endpoint of the installed service. Use the DIVAdirector Admin Interface:

  1. Navigate to Admin > System > Service Settings > Transcode Service, and then select the Service Configuration node.

  2. Update the Url value with the endpoint of the transcode service.

    For default installations with the Transcode Service installed on the same DIVAdirector server, this value will be:
    <a target="_blank" href="http://127.0.0.1:9876/api/">
    http://127.0.0.1:9876/api/</a>

  3. Click Update.

  4. Check the status and version in the Transcode Service Status panel. The status should be set to "Running" and a version number should be visible.

  5. If the status is "Down", verify the endpoint "Url" value is correct and matches the endpoint of the transcode service.

Configure Staging Locations

After configuring the transcode service endpoint correctly, a "Locations" panel displays. Use this panel to configure the temporary staging used by the transcode service to store transcoded files before they are moved to the DIVAdirector proxy storage location.

To add a new location:

  1. Click the Add button.

  2. Enter a location name.

    An alphanumeric string for identifying this location in other workflows.

  3. Enter a path.

    A UNC path is recommended, but you can use a mapped drive letter if the drive letter is mapped to the same location for the DIVAdirector Task Manger service and the transcoder implementation.

  4. If you are configuring multiple locations, you can select Is Default to designate the location as the default.

  5. Click Insert to add the location.

  6. Give read and write access to the DIVAdirector Task Manager service and any transcoder implementations for the location (see "Folder Permissions" for more information).

Configure Transcoder Implementations

  1. Configure the transcode service endpoint and staging locations before performing the following.

  2. Navigate to Admin > System > Service Settings > Transcode Service, and then click the Transcoders panel.

    For new installations, there are three initial transcoder implementations preconfigured: Vantage 1, FFmpeg (Metadata only), and FFmpeg full workflows. The following sections describe the default implementations to expedite setup for installation.

Vantage 1 Default Implementation

This is a default implementation for integrating with a Vantage server via the web SDK.

  1. The Name and Type will be pre-defined, and the Port will be set to the default Vantage sdk port of 8676. For default Vantage installations, you do not need to change these values.

  2. Set the IP address of the server hosting the Vantage transcoder.

  3. Within the "Presets" panel, check the preset InternalIds on the Vantage server to see if there are matching workflows. Ensure that the ID for the workflow in Vantage Workflow Designer matches the preset InternalId.

  4. If a corresponding workflow for a preset does not exist on the Vantage server, import the sample workflows:

    1. Copy all workflows in the samples directory (C:\Program Files(x86)\Oracle Corporation\TranscodeService\SampleWorkflows\TranscoderSetupFiles\Vantage) to the Vantage server.

    2. Open the Vantage Workflow Designer.

    3. Click File, and then select Import Workflows.

    4. Select the sample workflows copied in step 1.

    5. Switch to the Workflow Design tab for each workflow and ensure there are no errors.

    6. Activate each workflow.

    7. After the workflows have been imported, double check that the imported workflow id matches the corresponding preset InternalId.

    8. Verify Enabled? is checked, and then click Save.

FFmpeg (Metadata Only) Implementation

This default implementation is provided for using a command-line transcoder, like FFmpeg, for metadata extraction tasks in split workflow scenarios. One example would be a Vantage server without an Analysis license. You would use this workflow for extracting the required metadata that would otherwise be obtained using the Analyze and Identify actions.

  1. In the "Presets" panel, there will be one "metadata only" preset. Ensure the executable specified in the "exe path" exists on server.

    Default installations will use the path: C:\Program Files (x86)\Oracle Corporation\TranscodeService\Plugins\ffprobe.exe, but you will need to manually place this executable in the specified directory.

  2. Select the Enabled? checkbox in the top "Transcoder Settings" panel to enabled the implementation.

  3. Click Save.

FFmeg (full) Workflows Implementation

This default implementation is provided for using a command-line transcoder, like FFmpeg, as a standalone transcoder for generating all the required artifacts for any DIVAdirector proxy generation workflows. This implementation uses a Powershell script to call the FFmpeg executable and create the video file, thumbnail images, and metadata values.

  1. Ensure the scripts specified in the "exe args" fields exist on disk. The Default installation installs two scripts:

    C:\Program Files (x86)\Oracle Corporation\TranscodeService\SampleWorkflows\TranscoderSetupFiles\Custom\ffmpeg_proxy.ps1

    C:\Program Files (x86)\Oracle Corporation\TranscodeService\SampleWorkflows\TranscoderSetupFiles\Custom\ffmpeg_shotlist_thumbnails.ps1

  2. Open each script and ensure the executables specified for ffmpegPath and ffprobePath exist on disk. For default installations, this will be:

    C:\Program Files (x86)\Oracle Corporation\TranscodeService\Plugins\ffmpeg.exe

    C:\Program Files (x86)\Oracle Corporation\TranscodeService\Plugins\ffprobe.exe

    If these do not exist, manually place these files on the disk.

  3. Select the Enabled? checkbox to enabled the implementation.

Folder Permissions

The transcode service does not move source files before sending requests to the transcoder implementation. Therefore, the source files must be in a location accessible by the transcoder implementation. The transcoder implementation requires read access to the configured proxy storage locations to extract thumbnail images from proxy files. However, the Transcode Service itself does not need read access to the source location.

Similarly, the Transcode Service does not transfer any files after transcoding is complete. Therefore, the transcoder implementation requires write access to the configured output location. The DIVAdirector TaskManager process must have read and write access to the same configured output location.

Database Settings

Caution:

Oracle highly recommends performing these modifications with the assistance of an Oracle Support Technician.

There are several configuration settings stored in a local database that you can configure through the DIVAdirector Web Interface (see Configuring the Transcode Service for more details). Although it is not recommended, it is also possible to modify these data settings directly with SQL scripts.

Presets

The Presets table stores a named mapping to a transcoder implementation's internal workflow identifier. For Vantage, the InternalId is the workflow identifier.

Locations

The Locations table stores a set of predefined output storage locations. The Transcode Service will only accept jobs with a valid storage location. If no location is specified in the transcode request, the service will attempt to find a location using IsDefault (if set to true) and use that location. Log files will indicate that no location was specified, and the default value used.

The Path column stores the path associated with the location. This value will form the base output path for the transcoded job. The remainder of the path will be formed by the Job ID returned from the Transcode Service. For example if the location path is \\10.0.0.0\output and a Job ID 6449d0db-2377-4e3d-a969-be09a742a63d is returned from the Transcode Service, then the final output path for the transcoded file will be \\10.0.0.0\output\6449d0db-2377-4e3d-a969-be09a742a63d.

API Endpoints

You configure the two REST main endpoints by modifying the database entries:

/api/transcoder

This parameter is used for viewing currently configured transcoder information.

/api/jobs/jobId

This parameter is used for viewing job progress and submitting new jobs.

Example #1

To create a new transcode job the request is as follows:

HTTP POST to /api/jobs {
"inputFilePath": " \\rootPath\InputFileMXF", "output":{
"presetName": "Default Video Proxy", "parameters": [
{
"name": "GenerateKeyFrames", "value": "True" }, {
"name": "KeyframeWidth", "value": "128" }, .... ] } }

The CheckStatusOnStartup parameter is a Boolean flag indicating a required preset that must be checked during service startup. A warning will be logged if CheckStatusOnStartup is set to true and the preset is not found. The service will attempt to activate the preset if CheckStatusOnStartup is true and the preset is found, but not active. The transcode log files will have entries for this check and attempted activation.

The response to the request is as follows:

201 Created Headers: .... Location: http://localhost:9876/api/jobs/794660fe-2c37-491c-b7a9-7fe27f2c6346.... Body: {
"jobId": "794660fe-2c37-491c-b7a9-7fe27f2c6346", "internalId": "57d0a08b-fa5f-4ff7-8177-c1d2d4adf92a", "inputFilePath": "\\rootPath\InputFileMXF", "outputFilePath": null, "status": 8, "createdDate": "2015-08-13T10:26:06.5553211-06:00", "createdBy": null, "updatedDate": "2015-08-13T10:26:06.5553211-06:00", "updatedBy": null, "progress": 0, "metadata": null, "output": { "id": 11, "presetName": "Default Video Proxy", "location": {
"id": 1, "name": "Default Location", "path": "\\10.80.106.91\c$\Users\Administrator\Desktop\output\Dev", "isDefault": true }, "parameters": [
{
"id": 40, "name": "GenerateKeyFrames", "type": null, "value": "True" }, {
"id": 43, "name": "KeyframeWidth", "type": null, "value": "128" }, {
"id": 45, "name": "OutputFileName", "type": null, "value": "AA004001" } ] } }

Example #2

To get all jobs summaries the request is as follows:

HTTP GET TO /api/jobs

The response to the request is as follows:

[
  {
"jobId": "2ebbd1e9-b404-4909-944e-8d48c0a4b370", "internalId": "57d0a08b-fa5f-4ff7-8177-c1d2d4adf92a", "inputFilePath": "C:\Users\Administrator\Desktop\watch\AA004001.MXF", "outputFilePath": "\\10.80.106.91\c$\Users\Administrator\Desktop\output\Dev\2ebbd1e9-b404-4909-944e- 8d48c0a4b370\AA004001.mp4",
"status": 6, "createdDate": "2015-08-13T10:26:06.557", "createdBy": null, "updatedDate": "2015-08-13T10:26:26.067", "updatedBy": "TaskManager", "progress": 100 }, {
"jobId": "25970df1-7f60-4f65-8ee9-49b83b908364", "internalId": "44c54311-da47-443f-b7e2-21c56c247e0e", "inputFilePath": "C:\Users\Administrator\Desktop\watch\AA004001.MXF", "outputFilePath": "\\10.80.106.91\c$\Users\Administrator\Desktop\output\Dev\25970df1-7f60-4f65-8ee9- 49b83b908364\AA004001.mp4",
"status": 6, "createdDate": "2015-08-13T10:19:26.28", "createdBy": null, "updatedDate": "2015-08-13T10:19:50.687", "updatedBy": "TaskManager", "progress": 100 }]

Example #3

To get job details the request is as follows:

HTTP GET to /api/jobs/794660fe-2c37-491c-b7a9-7fe27f2c6346

The response to the request is as follows:

{
"jobId": "794660fe-2c37-491c-b7a9-7fe27f2c6346", "internalId": "57d0a08b-fa5f-4ff7-8177-c1d2d4adf92a", "inputFilePath": "C:\Users\Administrator\Desktop\watch\AA004001.MXF", "outputFilePath": "\\10.80.106.91\c$\Users\Administrator\Desktop\output\Dev\2ebbd1e9-b404-4909-944e- 8d48c0a4b370\AA004001.mp4",
"status": 6, "createdDate": "2015-08-13T10:26:06.557", "createdBy": null, "updatedDate": "2015-08-13T10:26:26.067", "updatedBy": "TaskManager", "progress": 100, "metadata": "[{\"Key\":\"Container Format\",\"Value\":\"Material Exchange Format (OP-1a)\"},{\"Key\":\"Content Duration\",\"Value\":\"00:00:08:04@25\"},{\"Key\":\"Video Framerate\",\"Value\":\"25\"},{\"Key\":\"Header Timecode\",\"Value\":\"01:06:18:15@25\"},{\"Key\":\"OutputFileFullPath\",\"Value\" :\"\\\\10.80.106.91\\c$\\Users\\Administrator\\Desktop\\output\\Dev\\2ebbd1e9-b404 -4909-944e-8d48c0a4b370\\AA004001.mp4\"}]",
"output": { "id": 11, "location": {
"id": 1, "name": "Default Location", "path": "\\10.80.106.91\c$\Users\Administrator\Desktop\output\Dev", "isDefault": true }, "presetName": "Default Video Proxy", "parameters": [
{
"id": 40, "name": "GenerateKeyFrames", "type": null, "value": "True" }, {
"id": 43, "name": "KeyframeWidth", "type": null, "value": "128" }, {
"id": 45, "name": "OutputFileName", "type": null, "value": "AA004001" } ] } }