Using PBCore to supply description metadata in derivative creation Note that -ExternalMetadata will work with instantiationGenerations and instantiationLocation. This can be useful when the file path is not wanted for instantiationLocation or when it makes more sense to supply a general value, such as ‘WXXX Archive’ rather than a specific value such as that file’s path in its file system. This will replace the instantiationLocation provided by MediaInfo (which is the filepath of the file), with the user-supplied information. The syntax here is that within the -ExternalMetadata option a value is provided that contains the PBCore metadata name then a semicolon and then the value for that metadata (instantiationLocation set to ‘my house’ in this example). Mediainfo -Output=PBCore2 -ExternalMetadata="instantiationLocation my house" file-at-home.mp4 Metadata can be added in the process of calling MediaInfo by using the -ExternalMetadata command such as: In some cases, one may want to replace some of that data or add information that is covered by PBCore’s Instantiation element but it not reportable by MediaInfo (such as instantiationGenerations). The PBCore output from MediaInfo is constructed from information that is generated gathered by MediaInfoLib. Just replace /look/here with a path to a directory in which you’d like to look for files and possibly change -name '*.mov' to another pattern to match the files you want to make PBCore records for. ![]() To create a batch of sidecar PBCore xml files, a loop can be run such as:įind /look/here -name '*.mov' | while read file do mediainfo -Output=PBCore2 "$_pbcore.xml" done Mediainfo -Output=PBCore2 your-file-here.mkv > now-i-have-a-pbcore.xml This output can be written to a file with redirection, by adding > outputfile.xml to the end of the command, such as: Mediainfo -Output=PBCore2 your-file-here.mkv This can be generated with the -Output=PBCore2 option such as: ![]() Unless legacy versions of PBCore are needed, PBCore2 is recommended. MediaInfo supports many different types of metadata outputs such as HTML, XML, JSON, EBUCore, and … PBCore! … and PBCore2. Mediainfo -f -language=raw your-file-here.mkv ![]() Note that if your instance of MediaInfo was compiled with cURL support then you could also use this with a URL such as:Ī more verbose version of MediaInfo’s output can be generated by adding the -f (for full) option.Īnd for a more parseable output, the -language=raw option ensures that all metadata labels are unique. This post, written by Dave Rice, outlines how various tools like MediaInfo and ffmpeg can be used in audiovisual description, access, and preservation workflows.Ī general mediainfo output can be produced with a command such as:
0 Comments
Leave a Reply. |