MediaConch_SourceCode
MediaConch_SourceCode copied to clipboard
representation of nested tags in MIv2 XML
This is one of my own sample files: http://archive.org/download/MatroskaSampleWithEmbeddedPreservationMetadata/pres_metadata_sample_20110608.mkv.
In MediaInfo here is an excerpt:
<extra>
<Attachments>DSC041531.jpg / pres_metadata_sample_framemd5.txt</Attachments>
<EncodedBy_Url>{URL for the technician or organization listed in ENCODED_BY.}</EncodedBy_Url>
<EncodedBy_capture_device>Decklink Studio SDI</EncodedBy_capture_device>
<EncodedBy_capture_device_manufacturer>Blackmagic-Design</EncodedBy_capture_device_manufacturer>
<EncodedBy_capture_device_serial_no>xyz6789</EncodedBy_capture_device_serial_no>
<EncodedBy_capture_device_settings>{notes on adjustments or settings}</EncodedBy_capture_device_settings>
<EncodedBy_capture_operating_system>Ubuntu</EncodedBy_capture_operating_system>
<EncodedBy_capture_operating_system_version>10.10</EncodedBy_capture_operating_system_version>
<EncodedBy_capture_software>Blackmagic Media Express</EncodedBy_capture_software>
<EncodedBy_capture_software_version>2.0.3</EncodedBy_capture_software_version>
<EncodedBy_playback_device>SVO-5800</EncodedBy_playback_device>
<EncodedBy_playback_device_manufacturer>Sony</EncodedBy_playback_device_manufacturer>
<EncodedBy_playback_device_playback_signal_path>{Protocols used to transfer audiovisual data between the playback deck and the capture device. example: Component}</EncodedBy_playback_device_playback_signal_path>
<EncodedBy_playback_device_serial_no>abc1234</EncodedBy_playback_device_serial_no>
<EncodedBy_playback_device_settings>{notes on adjustments or settings}</EncodedBy_playback_device_settings>
<EncodedBy_processing_actions>{Description of any actions performed during processing, such as trimming silence.}</EncodedBy_processing_actions>
<OriginalSourceForm_BarCode>{Barcode or other identifier from the tape.}</OriginalSourceForm_BarCode>
<OriginalSourceForm_BarCode_source>{name of barcode authority or creator; example "XYZ Archive Barcode"}</OriginalSourceForm_BarCode_source>
<OriginalSourceForm_DATE_RECORDED>{The time that the recording began. This is akin to the TDRC tag in ID3.}</OriginalSourceForm_DATE_RECORDED>
<OriginalSourceForm_LABEL>{The record label or imprint on the source media object.}</OriginalSourceForm_LABEL>
<OriginalSourceForm_condition>{Comments on the condition of the source, any preparation for playback of the source tape (if relevant).}</OriginalSourceForm_condition>
<OriginalSourceForm_initial_source_timecode>01:02:15;10</OriginalSourceForm_initial_source_timecode>
<OriginalSourceForm_initial_source_timecode_settings>DropFrame=Yes / 24HourMax=No / IsVisual=No</OriginalSourceForm_initial_source_timecode_settings>
</extra>
The issue here is that all nesting is lost since the underscores in the node names indicate both nesting and underscores within names.
Here is how ffmpeg expresses the same metadata with ffmpeg -i:
ORIGINAL_MEDIA_TYPE: {Physical format of the source tape. Vocabulary?}
ORIGINAL_MEDIA_TYPE/BARCODE: {Barcode or other identifier from the tape.}
ORIGINAL_MEDIA_TYPE/BARCODE/source: {name of barcode authority or creator; example "XYZ Archive Barcode"}
ORIGINAL_MEDIA_TYPE/LABEL: {The record label or imprint on the source media object.}
ORIGINAL_MEDIA_TYPE/DATE_RECORDED: {The time that the recording began. This is akin to the TDRC tag in ID3.}
ORIGINAL_MEDIA_TYPE/condition: {Comments on the condition of the source, any preparation for playback of the source tape (if relevant).}
ORIGINAL_MEDIA_TYPE/initial_source_timecode: 01:02:15;10
ORIGINAL_MEDIA_TYPE/initial_source_timecode/settings: DropFrame=Yes / 24HourMax=No / IsVisual=No
DATE_DIGITIZED : {Date and time of the file creation process. Enter in ISO 8601 format.}
ENCODED_BY : {Name of the technician or organization responsible for the encoding and file creation process}
ENCODED_BY/URL : {URL for the technician or organization listed in ENCODED_BY.}
ENCODED_BY/processing_actions: {Description of any actions performed during processing, such as trimming silence.}
ENCODED_BY/capture_software: Blackmagic Media Express
ENCODED_BY/capture_software/version: 2.0.3
ENCODED_BY/capture_operating_system: Ubuntu
ENCODED_BY/capture_operating_system/version: 10.10
ENCODED_BY/capture_device: Decklink Studio SDI
ENCODED_BY/capture_device/manufacturer: Blackmagic-Design
ENCODED_BY/capture_device/serial_no: xyz6789
ENCODED_BY/capture_device/settings: {notes on adjustments or settings}
ENCODED_BY/playback_device: SVO-5800
ENCODED_BY/playback_device/manufacturer: Sony
ENCODED_BY/playback_device/serial_no: abc1234
ENCODED_BY/playback_device/settings: {notes on adjustments or settings}
ENCODED_BY/playback_device/playback_signal_path: {Protocols used to transfer audiovisual data between the playback deck and the capture device. example: Component}