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:
In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory and open the Import file meta data mapping (settings) configuration.
Configure the general parameters as desired.
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!
In the IPTC charset field, select the metadata encoding. Unless otherwise stated, we recommend to use UTF-8.
Click OK to save your changes.
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:
In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the Import file meta data mapping (JavaScript) configuration.
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.
Click OK to save your changes.
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:
In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the Export file meta data mapping (client command) configuration.
Configure the general parameters as desired.
Select the Enabled field.
Select the Ignore errors field to test custom mappings. For production environments, we recommend disabling this option.
Click OK to save your changes.
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:
In the censhare Admin Client, go to the Configuration/Modules/Asset Management directory, and open the Export file meta data mapping (Javascript) configuration.
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
Click OK to save your changes.
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, | 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, | Copyright flag | Import / Export |
XMP-xmp:CreatorTool | Creator tool | Import |
XMP-xmp:ModifyDate, | 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, | Headline (IPTC) | Import / Export |
XMP-dc:Description, | Description (IPTC) | Import / Export |
IPTC2:Keywords/rdf:Bag/rdf:li, | Keywords (IPTC) | Import / Export |
XMP-iptcCore:SubjectCode/rdf:Bag/rdf:li, | Subject code (IPTC) | Import / Export |
XMP-photoshop:CaptionWriter, | Writer (IPTC) | Import / Export |
Contact tags | Contact (IPTC) | |
XMP-dc:Creator/rdf:Bag/rdf:li, | Creator (IPTC) | Import / Export |
XMP-iptcCore:CiAdrExtadr, | Address/Street | Import / Export |
XMP-iptcCore:CiAdrCity, | Address/City | Import / Export |
XMP-iptcCore:CiAdrRegion, | Address/Region | Import / Export |
XMP-iptcCore:CiAdrPcode, | Address/ZIP Code | Import / Export |
XMP-iptcCore:CiAdrCtry, | Address/Country | Import / Export |
XMP-iptcCore:CiTelWork, | Address/Phone | Import / Export |
XMP-iptcCore:CiEmailWork, | Address/E-mail | Import / Export |
XMP-photoshop:AuthorsPosition, | Address/Position | Import / Export |
XMP-iptcCore:CiUrlWork, | Address/Other | Import / Export |
Image tags | Image (IPTC) | |
XMP-photoshop:DateCreated, | Date created (IPTC) | Import / Export |
XMP-iptcCore:IntellectualGenre, | Intellectual genre (IPTC) | Import / Export |
XMP-iptcCore:Scene/rdf:Bag/rdf:li, | Scene code (IPTC) | Import / Export |
XMP-iptcCore:Location, | Address/Additional | Import / Export |
XMP-photoshop:City, | Address/City | Import / Export |
XMP-photoshop:State, | Address/Region | Import / Export |
XMP-photoshop:Country, | Address/Country | Import / Export |
XMP-iptcCore:CountryCode, | Address/Country code | Import / Export |
Status tags | Status (IPTC) | |
XMP-photoshop:Source, | Source (IPTC) | Import / Export |
XMP-photoshop:Credit, | Credit line (IPTC) | Import / Export |
XMP-photoshop:Instructions, | Instructions (IPTC) | Import / Export |
XMP-photoshop:TransmissionReference, | Job-ID (IPTC) | Import / Export |
XMP-dc:Title, | Title (IPTC) | Import / Export |
XMP-dc:Rights, | Copyright notice (IPTC) | Import / Export |
XMP-xmpRights:UsageTerms | Usage terms (IPTC) | Import / Export |
Category tags | ||
XMP-photoshop:Category, | Category (IPTC) | Import / Export |
XMP-photoshop:SupplementalCategories/rdf:Bag/rdf:li, | Supplemental category | Import / Export |
XMP-photoshop:Urgency, | Urgency | Import / Export |
IPTC2: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.