Skip to main content
Skip table of contents

Metadata mapping for media file import/export


On import, censhare detects the MIME types of imported files and writes embedded metadata into asset properties. On export, the asset properties can be synchronized back into the file metadata. The synchronization is also used in the CIHUB integration.

Prerequisites

None.

Introduction

When users upload an image or video file into censhare, the system automatically detects file type and MIME type of the uploaded file. This is important to determine the asset type that is created. censhare also checks other metadata in the uploaded file and adds the respective asset property, if it finds a matching entry. This allows users to search for metadata and edit them. For example, retrieve the recording time, author, and resolution from the file metadata.

When users export an image or video file, censhare checks the asset properties of the exported asset, and writes them in the metadata of the exported file, if it finds a matching entry. The original metadata are not deleted from the file when the file is uploaded. Therefore, the export of metadata is only necessary if you want to overwrite or add metadata from the asset properties to the file. For example, add copyright information and a description to the image.

Metadata mapping with CIHUB integration

The CI HUB integration also uses the metadata mapping for file import/export. The import of embedded file metadata into the respective asset properties works in the same way as when a user uploads a file to censhare Web. Make sure that the module is enabled for this purpose.

The export of asset metadata into the embedded file metadata is not configured by default for the CI HUB integration. To configure the export, you must set up a custom action that triggers the Export file metadata mapping command. For example, integrate a custom action into your asset lifecycle with a dedicated workflow step.

Metadata schemas

The metadata mapping extracts different metadata schemas:

  • Exchangeable Image File Format (Exif):  stores metadata in digital images (JPEG or TIFF), for example, information about the equipment and settings.

  • Extensible Metadata Platform (XMP):  stores metadata in digital images and other file formats (PDF), for example, color mode and copyright information.

  • International Press Telecommunications Council standard (IPTC):  stores metadata in digital images (JPEG or TIFF), for example, content, contact, and status information.

  • Quicktime:  stores metadata in video container files, for example, copyright information, and information about the artist and album.

The mapping is configured in the censhare Admin Client or directly in the JavaScript file. Metadata mapping is available for the following MIME types:

  • PSD
  • GIF
  • JPEG
  • PNG
  • TIFF

Metadata mappings

The standard metadata mapping is handled in the Asset Management module. The export and import modules can be enabled and configured independently. censhare uses ExifTool to extract and write metadata from and to the files. The modules are configured in a JavaScript file. The extracted data are written to the censhare data model that is described in a JSON schema as part of the JavaScript file.

The metadata mapping parses the imported file metadata, and applies the censhare feature tree data model (JSON schema). If a source entry matches the schema, censhare writes it to the corresponding asset property. Existing values are overwritten. If the asset property does not exist, censhare adds it to the asset.

Most mappings match multiple sources. The order in which the sources appear in the schema are important. The first match is written into the feature. For example: The metadata sources  XMP-photoshop:CaptionWriter,  IPTC2:Writer-Editor,  IPTC:Writer-Editor,  IFD0:Artist,  PDF:Author  and  RTF:Author  are all mapped to the Description writer property, in this order. If censhare finds an  IPTC2:Writer-Editor  entry in the file, the following tags are ignored, even if an entry exists in the file.

Tags with defined entries are mapped to a static value list that is stored in the censhare feature definition. The respective feature mappings have the value type map. The value mapping is included in the feature tree.

The mappings for the properties  Creator tool (XMP)  and  Keywords (IPTC)  are retrieved in a JavaScript function. Customizations to these must be done in the functions, not in the feature tree JSON schema.

Enable the import metadata mapping

To enable the mapping of metadata for the file import, do the following:

  1. In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory and open the  Import file meta data mapping (settings)  configuration.

  2. Configure the general parameters as desired. 

  3. In the Mode field, select ExifTool and JavaScript.

    The censhare 3.x and attribute mapper is still available and can be used for a simple mapping. If your select this option, click Edit to customize the default mapping in the XML configuration file. However, we strongly recommend that you use the ExifTool and JavaScript mapping!

  4. In the IPTC charset field, select the metadata encoding. Unless otherwise stated, we recommend to use UTF-8.

  5. Click OK to save your changes.

  6. Update the server configuration and, if necessary, synchronize remote servers.

The import file meta data mapping is now active. The default mapping is used.

Customize the import metadata mapping

Note:  To import your custom XMP tags, you must first extend the ExifTool configuration, before you can configure the import mapping as described in this section.

To customize the mapping of metadata for the file export, do the following:

  1. In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the Import file meta data mapping (JavaScript) configuration.

  2. Edit the JavaScript mapping in the dialog. You can also edit the file directly under the path  /censhare-Server/app/modules/asset/metadata-mapping.js. Mappings are found in the featureTree variable. You can do the following:

    • Disable a mapping completely.

    • Remove a source from a mapping.

    • Map a source to another feature. Make sure the feature exists in censhare, or create it first.

  3. Click OK to save your changes.

  4. Update the server configuration and, if necessary, synchronize remote servers.

Enable the export metadata mapping

To enable the mapping of metadata for the file export, do the following:

  1. In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the Export file meta data mapping (client command)  configuration.

  2. Configure the general parameters as desired. 

  3. Select the Enabled field.

  4. Select the Ignore errors field to test custom mappings. For production environments, we recommend disabling this option.

  5. Click OK to save your changes.

  6. Update the server configuration and, if necessary, synchronize remote servers.

Customize the export metadata mapping

To customize the mapping of metadata for the file export, do the following:

  1. In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the  Export file meta data mapping (Javascript)  configuration.

  2. Edit the JavaScript mapping in the dialog. You can also edit the file directly under the path  /censhare-Server/app/modules/asset/metadata-setter.js. Mappings are found in the mapping variable. You can do the following:

    • Add a new target to a mapping

    • Change the target of a mapping

    • Change the source of a mapping

      Add a new source/target mapping

  3. Click OK to save your changes.

  4. Update the server configuration and, if necessary, synchronize remote servers.

Standard mappings

Exif tags

The  Exchangeable image file format (Exif) is a standard for image and audio metadata tags used by digitag cameras and other electronic devices. The specification adds metadata to common file formats, such as JPEG and TIFF. For more information, see  https://en.wikipedia.org/wiki/Exif.

The following tags are stored as child features of the  Exif data  feature:

Embedded tag

Asset feature

Import / Export

IFD0:Model

Camera model

Import

Composite:LensID

Lens

Import

ExifIFD:ISO

ISO

Import

ExifIFD:FocalLength

Focal length

Import

ExifIFD:ExposureCompensation

Exposure compensation

Import

Composite:Aperture

Aperture

Import

Composite:ShutterSpeed

Shutter speed

Import

ExifIFD:Flash,
ExifIFD:LightSource

Flash

Import

ExifIFD:WhiteBalance

White balance

Import

ExifIFD:MeteringMode

Metering mode

Import

ExifIFD:CreateDate

Creation date

Import

XMP tags

The  Extensible Metadata Platform  (XMP) is developed by Adobe as a standardized data model for extensible metadata. The XMP data model includes standard sets (for example: the Dublin Core schema), special-purpose schemas (for example: Adobe Photoshop schema), and allows also to add custom metadata.

The following tags are stored as child features of the  XMP Data  feature:

Embedded tag

Asset feature

Import / Export

XMP-photoshop:ICCProfileName

ICC Profile

Import

XMP-photoshop:ColorMode

Color mode

Import

XMP-xmpRights:Marked,
Photoshop:CopyrightFlag

Copyright flag

Import / Export

XMP-xmp:CreatorTool

Creator tool

Import

XMP-xmp:ModifyDate,
XMP-xmp:MetadataDate

Modification date

Import

XMP-xmp:Rating

Rating

Import / Export

XMP-xmpMM:DocumentID

Document ID

Import

Custom XMP tags

To add your custom XMP tags, you must extend the ExifTool configuration. The configuration file must be stored in the home directory of the censhare Server and censhare Service Clients and named  .Exiftool_config:

$HOME/.Exiftool_config


An example configuration can be found under  https://exiftool.org/config.html. For more information, see the  XMP metadata platform  and the  ExifTool  website.

IPTC tags

The International Press Telecommunications Council (IPTC) is a consortium of news agencies and industry vendors that defined sets and data models of metadata for photos, videos, news items and events. For more information, see the  IPTC homepage  and the  IPTC developer site.

The following tags are stored as child features of the  IPTC Data  feature:

Embedded tag

Asset feature

Import / Export

Content tags

Content (IPTC)


XMP-photoshop:Headline,
IPTC2:Headline,
IPTC:Headline

Headline (IPTC)

Import / Export

XMP-dc:Description,
IPTC2:Caption-Abstract,
IPTC:Caption-Abstract

Description (IPTC)

Import / Export

IPTC2:Keywords/rdf:Bag/rdf:li,
IPTC2:Keywords,
IPTC:Keywords/rdf:Bag/rdf:li,
IPTC:Keywords,
XMP-dc:Subject/rdf:Bag/rdf:li,
XMP-dc:Subject

Keywords (IPTC)

Import / Export

XMP-iptcCore:SubjectCode/rdf:Bag/rdf:li,
XMP-iptcCore:SubjectCode,
IPTC2:SubjectReference,
IPTC:SubjectReference

Subject code (IPTC)

Import / Export

XMP-photoshop:CaptionWriter,
IPTC2:Writer-Editor,
IPTC:Writer-Editor,
IFD0:Artist,
PDF:Author,
RTF:Author

Writer (IPTC)

Import / Export

Contact tags

Contact (IPTC)


XMP-dc:Creator/rdf:Bag/rdf:li,
XMP-dc:Creator, 
IPTC2:By-line,
IPTC:By-line

Creator (IPTC)

Import / Export

XMP-iptcCore:CiAdrExtadr,
XMP-iptcCore:CreatorAddress

Address/Street

Import / Export

XMP-iptcCore:CiAdrCity,
XMP-iptcCore:CreatorCity,
IPTC2:City,
IPTC:City

Address/City

Import / Export

XMP-iptcCore:CiAdrRegion,
XMP-iptcCore:CreatorRegion,
IPTC2:Province-State,
IPTC:Province-State

Address/Region

Import / Export

XMP-iptcCore:CiAdrPcode,
XMP-iptcCore:CreatorPostalCode

Address/ZIP Code

Import / Export

XMP-iptcCore:CiAdrCtry,
XMP-iptcCore:CreatorCountry,
IPTC2:Country-PrimaryLocationName,
IPTC:Country-PrimaryLocationName

Address/Country

Import / Export

XMP-iptcCore:CiTelWork,
XMP-iptcCore:CreatorWorkTelephone

Address/Phone

Import / Export

XMP-iptcCore:CiEmailWork,
XMP-iptcCore:CreatorWorkEmail

Address/E-mail

Import / Export

XMP-photoshop:AuthorsPosition,
IPTC2:By-lineTitle,
IPTC:By-lineTitle

Address/Position

Import / Export

XMP-iptcCore:CiUrlWork,
XMP-iptcCore:CreatorWorkURL

Address/Other

Import / Export

Image tags

Image (IPTC)


XMP-photoshop:DateCreated,
IPTC:DateCreated,
IPTC2:DateCreated

Date created (IPTC)

Import / Export

XMP-iptcCore:IntellectualGenre,
IPTC2:ObjectAttributeReference,
IPTC:ObjectAttributeReference

Intellectual genre (IPTC)

Import / Export

XMP-iptcCore:Scene/rdf:Bag/rdf:li,
XMP-iptcCore:Scene

Scene code (IPTC)

Import / Export

XMP-iptcCore:Location,
IPTC2:Sub-location,
IPTC:Sub-location

Address/Additional

Import / Export

XMP-photoshop:City,
IPTC2:City,
IPTC:City

Address/City

Import / Export

XMP-photoshop:State,
IPTC2:Province-State,
IPTC:Province-State

Address/Region

Import / Export

XMP-photoshop:Country,
IPTC2:Country-PrimaryLocationName,
IPTC:Country-PrimaryLocationName

Address/Country

Import / Export

XMP-iptcCore:CountryCode,
IPTC2:Country-PrimaryLocationCode,
IPTC:Country-PrimaryLocationCode

Address/Country code

Import / Export

Status tags

Status (IPTC)


XMP-photoshop:Source,
IPTC2:Source,
IPTC:Source

Source (IPTC)

Import / Export

XMP-photoshop:Credit,
IPTC2:Credit,
IPTC:Credit

Credit line (IPTC)

Import / Export

XMP-photoshop:Instructions,
IPTC2:SpecialInstructions,
IPTC:SpecialInstructions

Instructions (IPTC)

Import / Export

XMP-photoshop:TransmissionReference,
IPTC2:OriginalTransmissionReference,
IPTC:OriginalTransmissionReference

Job-ID (IPTC)

Import / Export

XMP-dc:Title,
IPTC2:ObjectName,
IPTC:ObjectName

Title (IPTC)

Import / Export

XMP-dc:Rights,
IPTC2:CopyrightNotice,
IPTC:CopyrightNotice

Copyright notice (IPTC)

Import / Export

XMP-xmpRights:UsageTerms

Usage terms (IPTC)

Import / Export

Category tags



XMP-photoshop:Category,
IPTC2:Category,
IPTC:Category

Category (IPTC)

Import / Export

XMP-photoshop:SupplementalCategories/rdf:Bag/rdf:li,
IPTC2:SupplementalCategories/rdf:Bag/rdf:li,
IPTC:SupplementalCategories/rdf:Bag/rdf:li,
XMP-photoshop:SupplementalCategories,
IPTC2:SupplementalCategories,
IPTC:SupplementalCategories

Supplemental category

Import / Export

XMP-photoshop:Urgency,
IPTC2:Urgency,
IPTC:Urgency

Urgency

Import / Export

IPTC2:FixtureIdentifier,
IPTC:FixtureIdentifier

Fixture identifier (IPTC)

Import / Export

Quicktime tags

Quicktime is a multimedia framework developed by Apple that handles various video and audio formats and includes a set of metadata.

The following tags are stored as child features of the QuickTime Data feature:

Embedded tag

Asset feature

Import / Export

QuickTime:Artist

Artist

Import

QuickTime:Copyright

Copyright

Import

QuickTime:Year

Year

Import

QuickTime:Album

Album

Import

QuickTime:Title

Title

Import

QuickTime:Composer

Composer

Import

QuickTime:Genre

Genre

Import

Result

When a media file is imported, censhare creates an asset with the respective metadata properties. When a media file is exported, the respective asset properties are copied into the file metadata.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.