search

Automating PBCore technical metadata

Approximately half of the fields in the PBCore 1.2.1 data dictionary express technical metadata regarding renditions (instantiations) of media. This technical metadata allows for audiovisual media collections to be more effectively controlled and utilized. When this information on aspect ratios, data rates, codecs, and standards is gathered, it enables content to be analyzed for preservation and access status, feasibility of use, compatibility with software and hardware, and potential obsolescence issues.
Just a quick scan of the more granular metadata schemas out there gives a sense of the large amount of technical metadata fields available to document — far more than are feasible for a cataloger to accurately record. However, there are resources available to assist in the automated extraction of metadata from a digital media file. AudioVisual Preservation Solutions is releasing a draft set of tools that conform extracted technical metadata to PBCore standards, the PBCore Instantionizer Toolset. The toolkit includes an XML style sheet and a Mac application that automates the XSL process for transforming metadata.

Strategies for Technical Metadata Expression

Technical metadata should be formatted with consistency and control rather than creativity. For instance three different catalogers might express the formatSamplingRate of an Audio CD as “44.1”, “44.1 kHz” or “44100 Hz”. Similarly, file size could be expressed as “2 gigabytes”, “2.008 GB”, “2056M”, or “2156544000”. These alternate methods of expressing technical values of digital objects are all valid to PBCore’s schema, though the PBCore data dictionary does express a recommendation for including both the value and measurement unit of the value.
Whereas the strategies of the cataloger may vary, the sample rate and file size of the object are fixed, quantifiable values. A PBCore workflow that consistently returns the same results for technical data across systems encourages interoperability and exchange while increasing the ability to search, sort, or react to this data. This is where automated strategies can come into play to extract metadata and transform it using the PBCore Instantionizer Toolset, a strategy that helps maintain that necessary consistency while decreasing the burden on catalogers.

Technical Metadata Extraction: MediaInfo

MediaInfo is Free Software that analyzes a given file and reports on its various technical characteristics and embedded metadata. MediaInfo presents metadata, by default, according to a custom data dictionary that divides the information into structural sections. A ‘General’ section presents metadata that pertains to the file as a whole, particularly the wrapper or container of the audiovisual content. MediaInfo then presents one section per track of the file, where tracks fall into the categories of ‘Video’, ‘Audio’, ‘Text’, ‘Image’ and ‘Menu’. The General section and Track sections of MediaInfo generally correspond to the instantiation element and essenceTrack element of PBCore 1.2, respectively.
Overall the last few years MediaInfo has consistently expanded to encompass more and more of the technical metadata that PBCore looks to document. Recent updates to MediaInfo include reporting on MIME types (pbcore:formatDigital), Final Cut UUIDs (pbcore:formatIdentifier), and video bit depth (pbcore:essenceTrackBitDepth).
MediaInfo provides a variety of methods to output technical metadata. These examples use an mp3 of “Betcha Don’t Know Where My Mommy Shops”. (Click each header to expand.)

  • Default Output
  • General
    Complete name : Betcha Don’t Know Where My Mommy Shops.mp3
    Format : MPEG Audio
    File size : 4.67 MiB
    Duration : 2mn 0s
    Overall bit rate : 320 Kbps
    Album : Shreds
    Track name : Betcha Don’t Know Where My Mommy Shops
    Performer : The Bran Flakes
    Recorded date : 2008
    Writing library : LAME3.97 (beta)
    Cover : Yes
    Cover type : Cover (front)
    Cover MIME : image/jpeg
    Comment : www.thebranflakes.com

    Audio
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Format_Settings_Mode : Joint stereo
    Format_Settings_ModeExtension : MS Stereo
    Duration : 2mn 0s
    Bit rate mode : Constant
    Bit rate : 320 Kbps
    Channel(s) : 2 channels
    Sampling rate : 44.1 KHz
    Stream size : 4.60 MiB (99%)
    Writing library : LAME3.97 (beta)

  • ‘Full’ Output
  • General
    Count : 265
    Count of stream of this kind : 1
    Kind of stream : General
    Kind of stream : General
    Stream identifier : 0
    Count of audio streams : 1
    Audio_Format_List : MPEG Audio
    Audio_Format_WithHint_List : MPEG Audio
    Audio codecs : MPEG-1 Audio layer 3
    Complete name : Betcha Don’t Know Where My Mommy Shops.mp3
    File name : Betcha Don’t Know Where My Mommy Shops.mp3
    File extension : mp3
    Format : MPEG Audio
    Format : MPEG Audio
    Format/Extensions usually used : m1a mpa1 mp1 m2a mpa2 mp2 mp3
    InternetMediaType : audio/mpeg
    Codec : MPEG Audio
    Codec : MPEG Audio
    Codec/Extensions usually used : m1a mpa1 mp1 m2a mpa2 mp2 mp3
    File size : 4891705
    File size : 4.67 MiB
    File size : 5 MiB
    File size : 4.7 MiB
    File size : 4.67 MiB
    File size : 4.665 MiB
    Duration : 120685
    Duration : 2mn 0s
    Duration : 2mn 0s 685ms
    Duration : 2mn 0s
    Duration : 00:02:00.685
    Overall bit rate : 320000
    Overall bit rate : 320 Kbps
    Stream size : 64277
    Stream size : 62.8 KiB (1%)
    Stream size : 63 KiB
    Stream size : 63 KiB
    Stream size : 62.8 KiB
    Stream size : 62.77 KiB
    Stream size : 62.8 KiB (1%)
    Proportion of this stream : 0.01314
    Title : Betcha Don’t Know Where My Mommy Shops
    Album : Shreds
    Track name : Betcha Don’t Know Where My Mommy Shops
    Performer : The Bran Flakes
    Recorded date : 2008
    File last modification date : UTC 2009-06-20 11:58:37
    File last modification date (loc : 2009-06-20 07:58:37
    Writing library : LAME3.97 (beta)
    Writing library : LAME3.97 (beta)
    Cover : Yes
    Cover type : Cover (front)
    Cover MIME : image/jpeg
    Cover_Data : [suppressed]
    Comment : www.thebranflakes.com

    Audio
    Count : 132
    Count of stream of this kind : 1
    Kind of stream : Audio
    Kind of stream : Audio
    Stream identifier : 0
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Format settings : Joint stereo / MS Stereo
    Format_Settings_Mode : Joint stereo
    Format_Settings_ModeExtension : MS Stereo
    InternetMediaType : audio/mpeg
    Codec : MPA1L3
    Codec : MPEG-1 Audio layer 3
    Codec profile : Joint stereo
    Duration : 120684
    Duration : 2mn 0s
    Duration : 2mn 0s 684ms
    Duration : 2mn 0s
    Duration : 00:02:00.684
    Bit rate mode : CBR
    Bit rate mode : Constant
    Bit rate : 320000
    Bit rate : 320 Kbps
    Channel(s) : 2
    Channel(s) : 2 channels
    Sampling rate : 44100
    Sampling rate : 44.1 KHz
    SamplingCount : 5322208
    Delay : 1629
    Delay : 1s 629ms
    Delay : 1s 629ms
    Delay : 1s 629ms
    Delay : 00:00:01.629
    Stream size : 4827428
    Stream size : 4.60 MiB (99%)
    Stream size : 5 MiB
    Stream size : 4.6 MiB
    Stream size : 4.60 MiB
    Stream size : 4.604 MiB
    Stream size : 4.60 MiB (99%)
    Proportion of this stream : 0.98686
    Writing library : LAME3.97 (beta)
    Writing library : LAME3.97 (beta)

  • ‘Full’ Output with Unique Metadata Identifiers
  • General
    Count : 265
    StreamCount : 1
    StreamKind : General
    StreamKind/String : General
    StreamKindID : 0
    AudioCount : 1
    Audio_Format_List : MPEG Audio
    Audio_Format_WithHint_List : MPEG Audio
    Audio_Codec_List : MPEG-1 Audio layer 3
    CompleteName : Betcha Don’t Know Where My Mommy Shops.mp3
    FileName : Betcha Don’t Know Where My Mommy Shops.mp3
    FileExtension : mp3
    Format : MPEG Audio
    Format/String : MPEG Audio
    Format/Extensions : m1a mpa1 mp1 m2a mpa2 mp2 mp3
    InternetMediaType : audio/mpeg
    Codec : MPEG Audio
    Codec/String : MPEG Audio
    Codec/Extensions : m1a mpa1 mp1 m2a mpa2 mp2 mp3
    FileSize : 4891705
    FileSize/String : 4.67 MiB
    FileSize/String1 : 5 MiB
    FileSize/String2 : 4.7 MiB
    FileSize/String3 : 4.67 MiB
    FileSize/String4 : 4.665 MiB
    Duration : 120685
    Duration/String : 2mn 0s
    Duration/String1 : 2mn 0s 685ms
    Duration/String2 : 2mn 0s
    Duration/String3 : 00:02:00.685
    OverallBitRate : 320000
    OverallBitRate/String : 320 Kbps
    StreamSize : 64277
    StreamSize/String : 62.8 KiB (1%)
    StreamSize/String1 : 63 KiB
    StreamSize/String2 : 63 KiB
    StreamSize/String3 : 62.8 KiB
    StreamSize/String4 : 62.77 KiB
    StreamSize/String5 : 62.8 KiB (1%)
    StreamSize_Proportion : 0.01314
    Title : Betcha Don’t Know Where My Mommy Shops
    Album : Shreds
    Track : Betcha Don’t Know Where My Mommy Shops
    Performer : The Bran Flakes
    Recorded_Date : 2008
    File_Modified_Date : UTC 2009-06-20 11:58:37
    File_Modified_Date_Local : 2009-06-20 07:58:37
    Encoded_Library : LAME3.97 (beta)
    Encoded_Library/String : LAME3.97 (beta)
    Cover : Yes
    Cover_Type : Cover (front)
    Cover_Mime : image/jpeg
    Cover_Data : [suppressed]
    Comment : www.thebranflakes.com

    Audio
    Count : 132
    StreamCount : 1
    StreamKind : Audio
    StreamKind/String : Audio
    StreamKindID : 0
    Format : MPEG Audio
    Format_Version : Version 1
    Format_Profile : Layer 3
    Format_Settings : Joint stereo / MS Stereo
    Format_Settings_Mode : Joint stereo
    Format_Settings_ModeExtension : MS Stereo
    InternetMediaType : audio/mpeg
    Codec : MPA1L3
    Codec/String : MPEG-1 Audio layer 3
    Codec_Profile : Joint stereo
    Duration : 120684
    Duration/String : 2mn 0s
    Duration/String1 : 2mn 0s 684ms
    Duration/String2 : 2mn 0s
    Duration/String3 : 00:02:00.684
    BitRate_Mode : CBR
    BitRate_Mode/String : CBR
    BitRate : 320000
    BitRate/String : 320 Kbps
    Channel(s) : 2
    Channel(s)/String : 2 channel2
    SamplingRate : 44100
    SamplingRate/String : 44.1 KHz
    SamplingCount : 5322208
    Delay : 1629
    Delay/String : 1s 629ms
    Delay/String1 : 1s 629ms
    Delay/String2 : 1s 629ms
    Delay/String3 : 00:00:01.629
    StreamSize : 4827428
    StreamSize/String : 4.60 MiB (99%)
    StreamSize/String1 : 5 MiB
    StreamSize/String2 : 4.6 MiB
    StreamSize/String3 : 4.60 MiB
    StreamSize/String4 : 4.604 MiB
    StreamSize/String5 : 4.60 MiB (99%)
    StreamSize_Proportion : 0.98686
    Encoded_Library : LAME3.97 (beta)
    Encoded_Library/String : LAME3.97 (beta)

  • XML Output
  • <?xml version=”1.0″ encoding=”UTF-8″?>
    <Mediainfo>
    <File>
    <track type=”General”>

    <Complete_name>Betcha Don’t Know Where My Mommy Shops.mp3</Complete_name>
    <Format>MPEG Audio</Format>
    <File_size>4.67 MiB</File_size>
    <Duration>2mn 0s</Duration>
    <Overall_bit_rate>320 Kbps</Overall_bit_rate>
    <Album>Shreds</Album>
    <Track_name>Betcha Don’t Know Where My Mommy Shops</Track_name>
    <Performer>The Bran Flakes</Performer>
    <Recorded_date>2008</Recorded_date>
    <Writing_library>LAME3.97 (beta)</Writing_library>
    <Cover>Yes</Cover>
    <Cover_type>Cover (front)</Cover_type>
    <Cover_MIME>image/jpeg</Cover_MIME>
    <Comment>www.thebranflakes.com</Comment>
    </track>

    <track type=”Audio”>

    <Format>MPEG Audio</Format>
    <Format_version>Version 1</Format_version>
    <Format_profile>Layer 3</Format_profile>
    <Format_Settings_Mode>Joint stereo</Format_Settings_Mode>
    <Format_Settings_ModeExtension>MS Stereo</Format_Settings_ModeExtension>
    <Duration>2mn 0s</Duration>
    <Bit_rate_mode>Constant</Bit_rate_mode>
    <Bit_rate>320 Kbps</Bit_rate>
    <Channel_s_>2 channels</Channel_s_>
    <Sampling_rate>44.1 KHz</Sampling_rate>
    <Stream_size>4.60 MiB (99%)</Stream_size>
    <Writing_library>LAME3.97 (beta)</Writing_library>
    </track>

    </File>
    </Mediainfo>

  • XML Output with ‘Full’ Output with Unique Metadata Identifiers

  • <?xml version=”1.0″ encoding=”UTF-8″?>
    <Mediainfo>
    <File>
    <track type=”General”>

    <Count>265</Count>
    <StreamCount>1</StreamCount>
    <StreamKind>General</StreamKind>
    <StreamKind_String>General</StreamKind_String>
    <StreamKindID>0</StreamKindID>
    <AudioCount>1</AudioCount>
    <Audio_Format_List>MPEG Audio</Audio_Format_List>
    <Audio_Format_WithHint_List>MPEG Audio</Audio_Format_WithHint_List>
    <Audio_Codec_List>MPEG-1 Audio layer 3</Audio_Codec_List>
    <CompleteName>Betcha Don’t Know Where My Mommy Shops.mp3</CompleteName>
    <FileName>Betcha Don’t Know Where My Mommy Shops.mp3</FileName>
    <FileExtension>mp3</FileExtension>
    <Format>MPEG Audio</Format>
    <Format_String>MPEG Audio</Format_String>
    <Format_Extensions>m1a mpa1 mp1 m2a mpa2 mp2 mp3</Format_Extensions>
    <InternetMediaType>audio/mpeg</InternetMediaType>
    <Codec>MPEG Audio</Codec>
    <Codec_String>MPEG Audio</Codec_String>
    <Codec_Extensions>m1a mpa1 mp1 m2a mpa2 mp2 mp3</Codec_Extensions>
    <FileSize>4891705</FileSize>
    <FileSize_String>4.67 MiB</FileSize_String>
    <FileSize_String1>5 MiB</FileSize_String1>
    <FileSize_String2>4.7 MiB</FileSize_String2>
    <FileSize_String3>4.67 MiB</FileSize_String3>
    <FileSize_String4>4.665 MiB</FileSize_String4>
    <Duration>120685</Duration>
    <Duration_String>2mn 0s</Duration_String>
    <Duration_String1>2mn 0s 685ms</Duration_String1>
    <Duration_String2>2mn 0s</Duration_String2>
    <Duration_String3>00:02:00.685</Duration_String3>
    <OverallBitRate>320000</OverallBitRate>
    <OverallBitRate_String>320 Kbps</OverallBitRate_String>
    <StreamSize>64277</StreamSize>
    <StreamSize_String>62.8 KiB (1%)</StreamSize_String>
    <StreamSize_String1>63 KiB</StreamSize_String1>
    <StreamSize_String2>63 KiB</StreamSize_String2>
    <StreamSize_String3>62.8 KiB</StreamSize_String3>
    <StreamSize_String4>62.77 KiB</StreamSize_String4>
    <StreamSize_String5>62.8 KiB (1%)</StreamSize_String5>
    <StreamSize_Proportion>0.01314</StreamSize_Proportion>
    <Title>Betcha Don’t Know Where My Mommy Shops</Title>
    <Album>Shreds</Album>
    <Track>Betcha Don’t Know Where My Mommy Shops</Track>
    <Performer>The Bran Flakes</Performer>
    <Recorded_Date>2008</Recorded_Date>
    <File_Modified_Date>UTC 2009-06-20 11:58:37</File_Modified_Date>
    <File_Modified_Date_Local>2009-06-20 07:58:37</File_Modified_Date_Local>
    <Encoded_Library>LAME3.97 (beta)</Encoded_Library>
    <Encoded_Library_String>LAME3.97 (beta)</Encoded_Library_String>
    <Cover>Yes</Cover>
    <Cover_Type>Cover (front)</Cover_Type>
    <Cover_Mime>image/jpeg</Cover_Mime>
    <Cover_Data>[suppressed]</Cover_Data>
    <Comment>www.thebranflakes.com</Comment>
    </track>

    <track type=”Audio”>

    <Count>132</Count>
    <StreamCount>1</StreamCount>
    <StreamKind>Audio</StreamKind>
    <StreamKind_String>Audio</StreamKind_String>
    <StreamKindID>0</StreamKindID>
    <Format>MPEG Audio</Format>
    <Format_Version>Version 1</Format_Version>
    <Format_Profile>Layer 3</Format_Profile>
    <Format_Settings>Joint stereo / MS Stereo</Format_Settings>
    <Format_Settings_Mode>Joint stereo</Format_Settings_Mode>
    <Format_Settings_ModeExtension>MS Stereo</Format_Settings_ModeExtension>
    <InternetMediaType>audio/mpeg</InternetMediaType>
    <Codec>MPA1L3</Codec>
    <Codec_String>MPEG-1 Audio layer 3</Codec_String>
    <Codec_Profile>Joint stereo</Codec_Profile>
    <Duration>120684</Duration>
    <Duration_String>2mn 0s</Duration_String>
    <Duration_String1>2mn 0s 684ms</Duration_String1>
    <Duration_String2>2mn 0s</Duration_String2>
    <Duration_String3>00:02:00.684</Duration_String3>
    <BitRate_Mode>CBR</BitRate_Mode>
    <BitRate_Mode_String>CBR</BitRate_Mode_String>
    <BitRate>320000</BitRate>
    <BitRate_String>320 Kbps</BitRate_String>
    <Channel_s_>2</Channel_s_>
    <Channel_s__String>2 channel2</Channel_s__String>
    <SamplingRate>44100</SamplingRate>
    <SamplingRate_String>44.1 KHz</SamplingRate_String>
    <SamplingCount>5322208</SamplingCount>
    <Delay>1629</Delay>
    <Delay_String>1s 629ms</Delay_String>
    <Delay_String1>1s 629ms</Delay_String1>
    <Delay_String2>1s 629ms</Delay_String2>
    <Delay_String3>00:00:01.629</Delay_String3>
    <StreamSize>4827428</StreamSize>
    <StreamSize_String>4.60 MiB (99%)</StreamSize_String>
    <StreamSize_String1>5 MiB</StreamSize_String1>
    <StreamSize_String2>4.6 MiB</StreamSize_String2>
    <StreamSize_String3>4.60 MiB</StreamSize_String3>
    <StreamSize_String4>4.604 MiB</StreamSize_String4>
    <StreamSize_String5>4.60 MiB (99%)</StreamSize_String5>
    <StreamSize_Proportion>0.98686</StreamSize_Proportion>
    <Encoded_Library>LAME3.97 (beta)</Encoded_Library>
    <Encoded_Library_String>LAME3.97 (beta)</Encoded_Library_String>
    </track>

    </File>
    </Mediainfo>

Metadata Transformation: PBCore Instantionizer

mediainfo2pbcoreinstantiation.xsl

mediainfo2pbcoreinstantiation.xsl is an Extensible Stylesheet Language document written to transform the output of MediaInfo (the “XML Output with ‘Full’ Output with Unique Metadata Identifiers” version) to a PBCore 1.2.1 instantiation element. The output is not a valid PBCore record in itself but only the technical instantiation element. Though mediainfo2pbcoreinstantiation does not generate a valid PBCore record, the technical instantiation element it produces can be merged with the other elements of a PBCore record to create a fuller, more consistent record.

How It Works

Machine Readability vs Human Readability

As you can see from the ‘Full’ Mediainfo outputs above, MediaInfo provides alternative expressions for certain values, such as:

OverallBitRate : 320000
OverallBitRate/String : 320 Kbps

or

SamplingRate : 44100
SamplingRate/String : 44.1 KHz

Within these examples the first value is designed for computer readability whereas the second is more suited for human readability. When analyzing large sets of technical data it is more efficient to search, sort, limit and evaluate the integer values rather than the ‘string’ values.

The current version of mediainfo2pbcoreinstantiation.xsl tries to balance the use computer-readable values over human-readable ones against the recommendations of the current PBCore data dictionary. Thus the output of mediainfo2pbcoreinstantiation will always present each numerical technical value in the same unit of measurement. Thus essenceTrackBitDepth will always be represented in units of ‘bit’, essenceTrackSamplingRate in units of ‘kHz’, formatFileSize in bytes, essenceTrackBitRate in ‘bits/second’, etc. On the other hand essenceTrackTimeStart and formatTimeStart will always present in the format of HH:MM:SS.mmm rather than including textual statements on timecode standards and settings within the same field (in this draft timecode setting data is stored in an annotation).

PBCore instantiation elements

The following is a list of the the relevant instantiation elements and how the PBCore Instantiationizer interprets them.

formatIdentifiers

Read from Mediainfo/File/track[@type=”General”]/FileName and OriginalSourceMedium and Media_UUID and Media_History_UUID

mediainfo2pbcoreinstantiation reports on these values as formatIdentifiers:

File Name    The name of the file itself is handed here as an identifier.
     
Original Source Medium    This value represents a label that can occur in Quicktime timecode track. This corresponds to the ‘Reel’ value in Final Cut Pro or the ‘Tape Name’ value in a file ingested through Live Capture Plus. Typically this value is used to store the identifier or name of the source tape during digitization work. The value can then be used to relate the source content to the resulting digital content.
     
Final Cut Studio UUID    Quicktime files captured or exported from Final Cut Pro (when using the File>Export menu option, not File>Export using Quicktime Conversion) contain a unique identifier value. This value can relate the media to a Final Cut Pro XML document or to other Quicktime files.
     
Final Cut Studio UUID Item History    This value can trace references to prior renditions of the media in a Final Cut environment. For instance if file A.mov is created in Final Cut and then transcoded to file B.mov in Compressor, B.mov will contain a “Final Cut Studio UUID Item History” value that matches the “Final Cut Studio UUID” value in file A.mov.

MediaInfo presents other identifiers such as ISRC, ISBN, EAN-13, UPC-A, LCCN, and ASIN (where these values are embedded into files according to their corresponding standards); however, these values are identifiers and not formatIdentifiers (in PBCore language). If these values occur they are currently presented in annotations.
_______________________________

dateCreated

Read from Mediainfo/File/track[@type=”General”]/Encoded_Date

dateCreated is taken from the detected date of encoding of the file. MediaInfo determines the value for ‘Encoded_Date’ by detecting these values in audiovisual containers. In this version of mediainfo2pbcoreinstantiation the file’s ‘creation date’ and ‘modification date’ attributes are not used.
_______________________________

dateIssued

PBCore’s dateIssued refers to the date of publication, broadcast, or availability of the specific instantiation. mediainfo2pbcoreinstantiation will likely report on this field very rarely. Many audiovisual containers contain ‘year’ or ‘date’ fields in their tagging structure, but most of the definitions of these fields refer to the time represented in the content (PBCore’s coverage) or aren’t clear semantically enough to associate to dateIssued. MediaInfo reports on a few tags, such as ID3’s TDRL tag, to MediaInfo:Released_Date, so these values are used for dateIssued when available.
_______________________________

formatPhysical

Unused in mediainfo2pbcoreinstantiation
_______________________________

formatDigital

Read from Mediainfo/File/track[@type=”General”]/InternetMediaType

MediaInfo primarily relies on IANA to determine the mime type.
_______________________________

formatLocation

Read from Mediainfo/File/track[@type=”General”]/CompleteName

This field is filled with the path to the file. For example: C:/media.mov or /Users/dave/Desktop/media.mov
_______________________________

formatMediaType

This value is evaluated from the track data that MediaInfo provides. If there is at least one video track then this value will be ‘Moving Image’. If there is no video track and at least one audio track then it will be ‘Sound’. If there is no video or audio track and at least one image track then it will be ‘Static Image’. If there are no other track types and at least one text track then it will be ‘Text’.

PBCore provides other recommended values including “Animation”, “Interactive Resources”, and “Software”. mediainfo2pbcoreinstantiation currently doesn’t implement any means to automate the identification of these media types.
_______________________________

formatGenerations

formatGenerations is a key PBCore field that documents the use or intention of a particular rendition of an asset, such as specifying that this copy is the master, another is a backup and a third is a viewing copy. Potentially within a given digital collection, one could infer this value based on the context of the collection. For instance by determining that within Collection X all .ogv files are formatGenerations=”Moving image/Viewing copy” and all .mxf files are “Moving image/Master”. But these assumptions wouldn’t work safely in a broad application of mediainfo2pbcoreinstantiation, thus mediainfo2pbcoreinstantiation does not assume any formatGenerations, although the PBCore cataloger is certainly encouraged to determine what the value is by other means.
_______________________________

formatTimeStart

Read from Mediainfo/File/track[@type=”General”]/Delay_Original_String3 or Delay_String3

The time start of the media in HH:MM:SS.mmmm format. Timecode settings such as whether the timecode is drop-frame or non-drop-frame, is able to extend beyond twenty-four hours, or is a visual timecode track is documented in an annotation (if this data exists).
_______________________________

formatDuration

Read from Mediainfo/File/track[@type=”General”]/Duration_String3

The duration of the media in HH:MM:SS.mmmm format.
_______________________________

formatDataRate

Read from Mediainfo/File/track[@type=”General”]/OverallBitRate

mediainfo2pbcoreinstantiation currently uses the MediaInfo value “OverallBitRate” to express formatDataRate. It should be noted that this is different than dividing the filesize in bits by the duration in seconds. MediaInfo determines the “OverallBitRate” by adding the bitrates of all tracks that have a duration. Thus for an MP3 file that contains audio and an embedded cover image, the value for formatDataRate will express the bitrate of the audio data and not include the embedded image and header info.
_______________________________

formatColors

In PBCore, formatColors refers to the color of the displayed video rather than how the color is stored. While MediaInfo can determine whether a video is 4:2:0 or 4:1:1 it can’t actually infer if this looks like color or black and white to the viewer. mediainfo2pbcoreinstantiation does not report on formatColors.
_______________________________

formatTracks

Here mediainfo2pbcoreinstantiation generates a list of ‘video’, ‘audio’ and ‘text’ tracks (other tracks are not currently reported here, but can be reviewed in the essenceTrack elements). For example, a Quicktime wrapped DV file that has embedded captioning would present as “1 video track, 2 audio tracks, 1 text track”. Note that with audio the concept of track and channel are not analogous. For instance a file could contain 2 stereo audio tracks or 4 mono audio tracks. In these two cases mediainfo2pbcoreinstantiation would report ‘2 audio tracks’ on both of them even though the first example has more audio channels. This is clarified by formatChannelConfiguration and the cumulative data of the essenceTrack nodes.
_______________________________

formatChannelConfiguration

This field provides a summary of the tracks and how they related to one another during presentation. mediainfo2pbcoreinstantiation compiles information from the track elements that pertain to the codecs and arrangements to attempt to build an educated guess on this value. For example of DVD-style VOB file that contains multiple audio tracks may present as “MPEG Video with AC-3 (Front: L C R, Surround: L R, LFE), AC-3 (L R), AC-3 (L R), AC-3 (L R), AC-3 (L R), AC-3 (L R), DTS (Front: L C R, Rear: L C R, LFE)” to document the different configurations of the tracks. A Matroska files with multiple subtitle tracks in various languages would report on the type of subtitle and its language, such as “AVC with DTS (Front: L C R, Surround: L R, LFE) with ASS (eng), ASS (fre), ASS (spa), ASS (swe), ASS (dan), ASS (fin), ASS (hun), ASS (rum), ASS (ger), ASS (cze), ASS (slv)”.
_______________________________

language

MediaInfo provides information on language tags in ISO639-1 format which is incompatible with PBCore 1.2.1. mediainfo2pbcoreinstantiation translates ISO639-1 values to ISO639-2 expressions for use in PBCore.
_______________________________

essenceTrackType

The recommended track types of PBCore don’t completely align with MediaInfo’s reported track types so there is a little conversion here, for instance what MediaInfo refers to each as a ‘text’ track is further evaulated in order to differentiate between ‘subtitle’, ‘caption’ and ‘text’ tracks for PBCore. Currently MediaInfo does not report on sprite tracks. The only ‘metadata’ track currently identified is CMML.
_______________________________

essenceTrackIdentifier

In PBCore 1.2.1 essenceTrackIdenfier may only occur once or not at all. Although it is not required it is a good practice to have one, though with some file types this concept doesn’t really exist. This method prefers to take the reported track ID (many audiovisual container formats utilize internal track identifiers). If such an id does not exist, mediainfo2pbcoreinstantiation uses a counter for that trackType (which means it could repeat within the same instantiation).
_______________________________

essenceTrackIdentifierSource

Read from Mediainfo/File/track[@type!=”General”]/ID or StreamKindID

essenceTrackIdentifierSource either presents “ID (MediaInfo)” or “StreamKindID (MediaInfo)” based on whether an ID is available or not (see comments under essenceTrackIdentifier).
_______________________________

essenceTrackStandard

Read from Mediainfo/File/track[@type!=”General”]/Standard

Example values include ‘NTSC’, ‘PAL’ and ‘Component’.
_______________________________

essenceTrackEncoding

mediainfo2pbcoreinstantiation currently provides a fairly verbose expression of encoding, including the codec, the version and profile of the codec, some potential settings such as endianness, whether signed or unsigned and the codec fourcc identifier.
_______________________________

essenceTrackDataRate

Read from Mediainfo/File/track[@type!=”General”]/BitRate

essenceTrackDataRate is expressed in ‘bits/second’
_______________________________

essenceTrackTimeStart

Read from Mediainfo/File/track[@type=”General”]/Delay_Original_String3 or Delay_String3

The starting timecode of the track in HH:MM:SS.mmmm format.
_______________________________

essenceTrackDuration

Read from Mediainfo/File/track[@type!=”General”]/Duration_String3

The duration of the track in HH:MM:SS.mmmm format.
_______________________________

essenceTrackBitDepth

Read from Mediainfo/File/track[@type!=”General”]/Resolution
_______________________________

essenceTrackSamplingRate

Read from Mediainfo/File/track[@type!=”General”]/SamplingRate
_______________________________

essenceTrackFrameSize

Read from Mediainfo/File/track[@type!=”General”]/Width and Height
_______________________________

essenceTrackAspectRatio

Read from Mediainfo/File/track[@type!=”General”]/DisplayAspectRatio_String

This presents the aspect ratio of the displayed video.
_______________________________

essenceTrackFrameRate

Read from Mediainfo/File/track[@type!=”General”]/FrameRate
_______________________________

essenceTrackLanguage

MediaInfo provides information on language tags in ISO639-1 format which is incompatible with PBCore 1.2.1. mediainfo2pbcoreinstantiation translates ISO639-1 values to ISO639-2 expressions for use in PBCore.
_______________________________

essenceTrackAnnotation

Unlike annotations of the instantiation element, the essenceTrackAnnotation may only occur once per essenceTrack. Rather than prioritize potential essenceTrackAnnotation values and pick only one, this approach includes selected annotations with a new line separating each value. Here mediainfo2pbcoreinstantiation excludes MediaInfo values that are mapped elsewhere, depreciated, or redundant and then states the remaining essenceTrack values in a single essenceTrack element. This produces a very verbose reporting on essenceTrack data, which allows for information such as chroma-subsampling, timecode settings, pixel aspect ratios, and various embedded metadata values.
_______________________________

annotation

Similarly to essenceTrackAnnotation, mediainfo2pbcoreinstantiation includes all remaining metadata values from MediaInfo (excluding those mapped elsewhere, depreciated, or redundant) to annotation elements; however here each value is stored within a single annotation element. This may include information coming from embedded metadata standards, such as bext, LIST-INFO, ID3, Quicktime tags, etc. As a result the annotations may contain information such as ‘Title’, ‘Artist’, and ‘Copyright’. While this information generally would be used within PBCore’s descriptive elements, they are currently stored as annotation. The reasoning is that these values are definitely annotations that reflect on the particular digital asset, but they do not necessarily depict accurate descriptive metadata.

How To Use

The easiest way to try out mediainfo2pbcoreinstantion is to download the PBCore Instantionizer 1.2 Toolset. Currently this is application is only available for Mac. It is a droplet application so when files are dropped onto the application’s icon, it will generate XML documents of the PBCore instantiation element next to each of the files.

**New Version 1.2 Available**
The update of the PBCore Instantiationizer tool to version 1.2 presents refinements that improve usability and user control. The core of the tool has been updated to support the most recent version of MediaInfo, 0.7.33. See the MediaInfo change log at http://mediainfo.sourceforge.net/Log for further details. Version 1.2 also offers better options for user-defined levels of verbosity returned by annotations, now allows for return of annotations in the Use field, and has improved design in user interface and dialog boxes.

AudioVisual Preservations Solutions is releasing the XSL file for mediainfo2pbcoreinstantiation directly at http://www.avpreserve.com/metadata/mediainfo2pbcoreinstantiation.xsl. The functionality of the style sheet is also being released in a simple application for the Mac OS X environment which automates the generation of PBCore instantiation elements as a droplet application. If you open the application directly it will prompt you for what files to evaluate. In either case the application will prompt for the formatGenerations values.

How to Use the XSL directly

Prerequisites

These instructions assume use of a Mac computer with the following tools installed:
xsltproc – should be included on any Mac
mediainfo (the command line version 0.7.28) – available for Mac here.

Step 1: Generate a MediaInfo XML

MediaInfo can generate an XML output using the ‘–Output=XML’ option. The XSL is designed to work with the Full option, ‘-f’, and the raw lanugage options, ‘–Language=raw’, also enabled.

In the following example, “file.mov” is the generic name used to refer to the file to be analyzed and “file_mediainfo.xml” is used to refer to the XML output by MediaInfo.

To generate a MediaInfo XML document with these options enabled use the following command:

mediainfo -f –Output=XML –Language=raw ‘file.mov’ > ‘file_mediainfo.xml’

‘file.mov’ should be replaced with the path to the file to evaluate.

Step 2: Use the XSL to translate to a PBCore instantiaion

xsltproc http://www.avpreserve.com/metadata/mediainfo2pbcoreinstantiation.xsl ‘file_mediainfo.xml’ > ‘file_pbcoreinstantiation.xml’

where ‘file_mediainfo.xml’ is the output from Step 1 and ‘file_pbcoreinstantiation.xml’ is the new PBCore instantiation.

USE SCENARIOS

PBCore Instantiation Records and the PBCore Repository Tool

As mentioned above, the PBCore Instantiationizer Toolset does not create a valid PBCore record, but does create the PBCore instantiation element set that can be attached to an existing record. This can be especially useful in situations where one is cataloging a series of digitized files that relate to existing PBCore asset records. Such automation saves a significant amount of cataloging time — and thus reduces cost — in any large scale digitization project or in submission of materials in a digital repository model.

AudioVisual Preservation Solutions has been working with the Dance Heritage Coalition and BAVC to develop workflows and structure for a digital repository. In this model DHC partners submit videotapes for digitization and deposit with catalog records based on the PBCore standard. Catalog records are entered through a secure online tool where members can then access the various collections.

The PBCore Repository Tool in its public version (installed at http://pbcore.vermicel.li) is a similar model to what the DHC is using. The Repository Tool can accept PBCore instantiation records through its API and attach them to PBCore records that already exist (i.e., from the record of the physical asset that was digitized).

In the PBCore Repository Tool each record automatically receives an asset UUID. For example the asset UUID of http://pbcore.vermicel.li/assets/def5775e-0b70-4d9d-9574-7b7e09f58fb4 is def5775e-0b70-4d9d-9574-7b7e09f58fb4. The API can be engaged by running:

curl -H ‘Accept: application/xml’ -H ‘Content-Type: application/xml’ -u ‘admin:secret’ -d ‘file_pbcoreinstantiation.xml’ http://wnet-pbcore/assets/def5775e-0b70-4d9d-9574-7b7e09f58fb4/instantiations.xml

This command uses the default admin password to the PBCore Repository Tool (admin:secret). If you were using this for your own materials, you would substitute your own ‘file_pbcoreinstantiation.xml’ to any local PBCore instantiation file and substitute the asset UUID in the URL to the asset id that you are appending to.

—————–
The uses of technical metadata for collection management within an archival setting are just starting to be realized. By developing open tools that analyze or automate preservation workflows, AVPS hopes to help audiovisual collections achieve more efficient and more cost-effective processes to do the work that needs to be done. The PBCore Instantiationizer Toolset is one approach for establishing improved cataloging methods we think will be useful for this. Please contact us with any questions about this or any of our other resources.

Resources

PBCore 1.2.1
MediaInfo
PBCore Instantionizer Toolset

— Dave Rice