mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Metadata: rudimentary support for XMP metadataa in MP4-based videos
XMP is a media-metadata standard based on XML which may be used across a variety of media formats. Some video-processing software writes XMP data without updating the native metadata fields. Therefore, we should aim at reading XMP metadata and give priority of XMP data over native fields. Pros: - Support for *all* common media formats. Cons: - XML (complex, verbose, chaotic). - Does not even come close to fulfilling its promise of being well defined (see below). Implement a simple XMP-parser using libxml2. Connect the XMP-parser to the existing Quicktime/MP4 parser. First problem encountered: According to the spec, XMP data supposed to be put in the 'XMP_' atom. But for example exiftools instead writes an 'uuid' atom with a special 16-byte uid. Implement both, more options will probably follow. Second problem: two versions of recording the creation date were found 1) The content of a <exif:DateTimeOriginal> tag. 2) The xmp::CreateDate attribute of a <rdf:Description> tag. Here too, more versions are expected to surface and will have to be supported in due course (with an obvious priority problem). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0aab39b35d
commit
cc4f48be3f
4 changed files with 185 additions and 4 deletions
11
core/xmp_parser.h
Normal file
11
core/xmp_parser.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Parse XMP blocks using libxml2
|
||||
|
||||
#ifndef XMP_PARSER_H
|
||||
#define XMP_PARSER_H
|
||||
|
||||
#include "units.h" // for timestamp_t
|
||||
#include <stddef.h> // for size_t
|
||||
|
||||
timestamp_t parse_xmp(const char *data, size_t size); // On failure returns 0.
|
||||
|
||||
#endif // XMP_PARSER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue