Release Notes ? ?mj2_to_metadata?

within the Open JPEG Project v. 0.97         March 25, 2005 

Glenn Pearson (at the US National Library of Medicine)

In collaboration with Fran?ois-Olivier Devaux (TELE/UCL)

 

Synopsis

"Mj2_to_metadata", under development, is a Windows command-line function that reads metadata from a Motion JPEG 2000 video file and generates an XML file with a representation of that content.  So far, it is limited to reporting structural metadata, but descriptive metadata is planned.  It is run from the command-line by:

 

  mj2_to_metadata -i input.mj2 -o output.xml

 

Additional options are discussed further below.

 

Acceptable Input

So far, video input is limited to a file created by Open JPEG's "frames_to_mj2" function (because mj2_to_metadata uses the same data structures and parsing functions that the reverse function, "mj2_to_frames", does).  Restrictions this imposes are:

 

?        MJ2 ?Simple Profile? only (self-contained file with 1 visual track, at most 1 sound track)

?        No sound

?        1 field per frame (non-interleaved)

?        32-bit offsets (filesize under 2GB)

 

Expected Output

The output XML will contain essentially all the MJ2 header information that is saved in the existing openjpeg data structures, including the voluminous chunking tables if requested.  Also, within the visual track, for a representative frame (the first unless otherwise specified), some portion of the JP2 header information is written.  This is again limited to what is saved in existing openjpeg data structures.  (Actually, towards overcoming these restrictions, v 0.97 has expanded certain data structures; the next step is to populate them during parsing.)  Reporting of many of the optional "marker sequences" in the JP2 codestream are not yet implemented.

 

The generated form of XML is unlikely be entirely definitive.  Nevertheless, a preliminary DTD has been prepared for it.

 

Build

This is early alpha code, and only the Windows version has been built, embedded within an openjpeg project in a VC6 environment (at cul) or VC7 environment (at NLM).  So you may find portability issues to resolve.  The release contains these files, added to existing files within openjpeg\mj2:

mj2_to_metadata.h, .c

meta_out.h, .c

mj2_to_metadata.dsw, .vcproj

mj2_to_metadata.dtd

 

After the build, it is recommended for convenience that you move or copy mj2_to_metadata.dtd to the same subdirectory as mj2_to_metadata.exe .

The project preprocessor definitions includes NO_PACKETS_DECODING, which suppresses unused decoding of a frame?s jpeg-2000-encoded packet data.  This suppression greatly speeds up execution.

 

Runtime Options

To run from the command-line:

 

  mj2_to_metadata -i input.mj2 -o output.xml

 

To see options available:

 

  mj2_to_metadata -h

 

Briefly, options are provided to:

a)      interpretative notes (-n)

b)      raw-as-read values, whenever derived values are available (-r)

c)      derived values (-d)

 

Other options are foreseen, to further prune the voluminous output.

 

This has only been tested on a few video files, so expect problems.

 

Feedback

Glenn_Pearson@nlm.nih.gov

 

p.gif" align=left