Asset Variations

 

General Principle

A variation is a derivative binary of an asset that typically serves to facilitate viewing across various platforms, simplify downloads, extract additional information, or protect the original file from copying or fraudulent use. For example, starting from an HD video asset, the following variations can be generated:

  • Web-friendly previews: JPG, PNG, or WEBP formats.

  • Low-definition (LD) and medium-definition (MD) videos: Optimized for web playback.

  • Watermarked videos or previews: To prevent unauthorized use.

  • AI extraction streams: For advanced content analysis.


History and Relationship with Other Wedia Variation Concepts

Variations represent both a generalization and an extension of historical Wedia concepts.

Historically, Wedia has provided native variations and project-specific variations, known as presets. The key difference between these legacy variations and the current variation model lies in their source:

  • Legacy presets and native ImagingServer variations are based on a single binary source.

  • Current variations are derived from a complete asset (object + associated binary), making them more suitable for DAM (Digital Asset Management) workflows.

The new variation system also integrates external variations from other tools, such as EVP or InDesign composition robots.

Additionally, the current variations encapsulate historical APIs to unify all types of variations (legacy and new) under a single, consistent logic.


Using Variations in the Wedia DAM

Accessing Variations via the API

Variations are accessible via HTTP using the /api/wedia/dam/variation API, served by the WXM_VARIATIONS_API plugin.

General syntax:
/api/wedia/dam/variation/<asset>/<variations>

  • <asset> can be specified in two ways:

    • <type>/<id>

    • Starting from version 11.26+, via its UUID: <uuid>.

  • <variations> is a comma-separated list of variation names sorted by descending preference, e.g., thumbnail,watermark,poster,default. The API evaluates the list from left to right and returns the first available and authorized variation.

To list the variations available and authorized for an asset, use:
/api/wedia/dam/variations/<asset>

To list all variations available for an asset, ignoring security settings, use:
/api/wedia/dam/admin/variations/<asset>
(Admin rights required.)


Configuring Variation Chains

From version 2021.3, variation chaining can be configured for different DAM components:

  1. Backoffice Preview in Lists
    Configured in the WXM_BO_OPTIONS plugin using these parameters:

    • com.wedia.dam.LIST_VARIATIONS: Specifies the chain for browsers without WEBP support.

    • For modern browsers supporting WEBP, the parameter com.wedia.dam.LIST_VARIATIONS(Accept: image/webp) is used.

    The choice is made in /bov3/common/init/init.jsp.

  2. Backoffice Baskets
    Basket previews inherit these parameters but can be overridden in the WXM_CART2 plugin :

     

    Tip: When upgrading to 2021.3, ensure these parameters do not override global configuration. To harmonize behavior in the Backoffice, clear any conflicting parameter values.

  3. Previews in DataView/DataEdit
    Managed by MediaCloud, which has its own configuration, controlled via the EVP setup in Wedia Admin: /admin/ebnAdministration.ebn.


Securing Access to Variations

Variations are secured through the objectfile/sendfile domain/action. This action applies to all variation types, including:

  • Binary variations.

  • Project presets.

  • Media variations.

  • Players.

The specific variation type is determined by the typeOp parameter, while subTypeOp identifies the variation, preset, or player name.


Filtering Available Variations

The /api/wedia/dam/variations/<asset> API lists all variations available and authorized for a requester. This API is particularly useful for generating download buttons or links and is used in the Backoffice to list available variations in the file view.

If certain variations (e.g., technical ones) should not be downloadable, filtering is possible using a variation/view security rule. This rule shares parameters with objectfile/sendfile, allowing shared handling via macros.

Example: A security rule can hide specific variations from download options while maintaining other permissions.


Integration

Listing Available Variations for an Asset

Variations differ between assets and may be created dynamically. While global lists are not available, the variations for a specific asset can be queried:

  • Java API: VariationsProviders.getInstance().getVariations(wsnoheto.engine.IObjectReadOnly o)

  • REST API: /api/wedia/dam/variations/{assetType}/{assetId}


Returning an Asset Variation

APIs can identify and return the first available variation from a prioritized list. This supports fine-grained rendering by requesting variations from the most specific to the most generic.

  • Java API:
    VariationsProviders.getInstance().getFirstNamedVariation(asset, "video_hd", "video_ld", "thumbnail", "poster");

  • REST API:
    /api/wedia/dam/variation/{assetType}/{assetId}/video_hd,video_ld,thumbnail,poster


Adding New Variations

New variations can be implemented in different ways, depending on the media type and required generation details:

  1. Video Formats: Configure the client's EVP settings to add new formats.

  2. Binary-Only Variations: Use presets with caching to avoid repeated processing or configure automatic presets via the REST DAM API. (See Wedia DAM REST API documentation)

  3. Asset-Dependent Variations: Implement custom interfaces directly in a plugin when variations require specific asset properties.