On import, censhare detects the MIME types of imported files and writes file metadata into the properties of the created asset. On export, the exported files can be enriched with metadata from the asset properties. The standard mapping for both ways can be customized.

Context

The mapping is configured in the censhare Admin Client or directly in the JavaScript file. Metadata mapping is available for the MIME types PSD, GIF, JPEG, PNG, and TIFF.

Prerequisites

You must be familiar with JavaScript.

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.

The standard metadata mapping is handled in the Asset Management module. The metadata mapping for export and import 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 extracts different metadata formats and standards:

  • 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.

Mappings

The metadata mapping module 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 meta data 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.

    Note: 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 meta data 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 meta data 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 to disable this option.

  5. Click OK to save your changes.

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

Customize the export meta data 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:

Tags

censhare 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:

Tags

censhare 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:

Tags

censhare 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:

Tags

censhare 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.