Fragments
Fragments are a long-standing concept in MediaHaven but have undergone a major overhaul in version 25.1
by adding the ability to create fragments on https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4064772158.
Introduction
A video fragment ranging from frame 50 to 250 in a video with 5125 frames in total is an example of a fragment. Another example is a document fragment ranging from pages 5 to 25 in a document with 100 pages. More formally, fragments are specialised sub-objects with particular start and end coordinates, typically smaller than the entire object. Fragments are uniquely identified by the 96-character metadata field Internal.FragmentId
that is a combination of the metadata field Internal.MediaObjectId
being a 64-character hex string extended with a random 32-character hex string. The metadata field Internal.MediaObjectId
has the same value for all fragments of a particular object.
There are two types of fragments
Term | Meaning | Start | End |
---|---|---|---|
Main fragment | The (flat) data object itself; it can have sub-objects, called “pure fragments”. |
|
|
Pure fragment | The sub-object as a part of the main fragment between a particular start and end point. | Value between | Value between |
Model
Technically pure fragments are not part of the https://mediahaven.atlassian.net/wiki/spaces/CS/pages/2291466251 themselves. However, the main fragment can be placed inside the record tree, and as such, its pure fragments are also present in the record tree at the same position as the main fragment. The technical concept of fragments in MediaHaven long predates the concept of the https://mediahaven.atlassian.net/wiki/spaces/CS/pages/2291466251, and to manage the complexity, fragments have not been converted into standalone objects that are children of the main fragment, such has been done for https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4064772158 and their child representation objects.
The combination of the above leads to the fact that https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4064772158 can have 3 kinds of descendants. For simplicity, the front end will visually present the child data objects and fragments as the “content” of the object.
Descendant | Usage | Visualization | |
---|---|---|---|
1 | Child data object | Used to organise extractions from the original file, i.e. attachments in an email. | Content tab |
2 | Representation object | Used to store the original file and one or more preview files. | Representations tab |
3 | Fragment | Used to logically persist parts with particular start and end points in the data object. | Content tab |
Variants
Depending on the media type and the https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4064378938, the following variants on fragments exists
Main Fragment | Main Fragment | Pure | Pure Fragment | Dimension
| Notes | Export | Since |
---|---|---|---|---|---|---|---|
|
|
|
| frames | Ability to create a slice in a video file | A video cut between the start and the end |
|
|
|
|
| frames | Ability to create a slice in an audio file | An audio cut between the start and the end |
|
|
|
|
| layers | Ability to select a subset of layers in a multilayered image such for example a TIFF | The entire image |
|
|
|
|
| pages | Ability to select a subset of pages in a document | The entire document |
|
|
|
|
| frames | Ability to create a slice in a video file | A video cut between the start and the end |
|
|
|
|
| frames | Ability to create a slice in an audio file | An audio cut between the start and the end |
|
|
|
|
| layers | Ability to select a subset of layers in a multilayered image such for example a TIFF | The entire image |
|
|
|
|
| pages | Ability to select a subset of pages in a document | The entire document |
|
Metadata Inheritance
Fragments have their custom inheritance mechanism that predates the record tree. Namely, all non-descriptive and non-dynamic https://mediahaven.atlassian.net/wiki/spaces/CS/pages/42074134 are intrinsically shared between the main fragment and all its pure fragments. The descriptive and dynamic metadata fields of fragments are independent.
From version 25.1
, additionally, because the fragments are descendants of their “parent” object, the https://mediahaven.atlassian.net/wiki/spaces/CS/pages/2656043129 will also apply to them.
Keyframe Support
The keyframe support applies only to the media types “video” and “audio”. For other media types, the keyframe is always the first keyframe.
The keyframe paths (technical: Internal.PathToKeyframe
and Internal.PathToKeyframeThumb
) point to the nearest keyframe specified by the start of the fragment (technical: Structural.FragmentStartFrames
).
Export Support
This partial support applies only to the media types “video” and “audio”. For other media types, the file is exported as a whole.
When exporting a pure fragment, specified by its unique fragment ID, the exported file will be cut between its start and end point. This applies to both the export of the original representation and access representation. Technically this means, preselecting an https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4364697610/Export+Locations#Export-partial-options based on the start and end of the fragment.
Metadata Fields
The following metadata fields are relevant to working with fragments, see also https://mediahaven.atlassian.net/wiki/spaces/CS/pages/4276486217/Metadata+24.3#Fragments. In general the aspect of “duration”, “time codes” and the number of items in the object as a whole (i.e. frames) “start frames” and “end frames” are restricted to the media types of audio and video.
Metadata Field | Media Type | Notes |
---|---|---|
| all | The unique 96-character identification of the pure fragment. Notice that the first 64 characters are same for all fragments and have the value of |
| all | The unique 64-character identification of the object as a whole. All (pure) fragments share the same value. |
| all | The same value as the |
| all | More accurately this field indicates whether the object is a pure fragment. |
| all | List of all pure fragments. Only available on the main fragment. |
| all | The fragment ID of the main fragment. Only set for pure fragments. |
| all | The start offset of the pure fragment, expressed in units such frames, pages, layers, etc. |
| all | The end offset of the pure fragment, expressed in units such frames, pages, layers, etc. The end is not included, hence it forms a half-open interval, mathematically expressed as |
| audio, video | The difference between |
| audio, video | The same as |
| audio, video | The same as |
| audio, video | The same as |
| audio, video | The start of the main fragment, by definition, has a value of |
| audio, video | The end of the main fragment, by definition, has the same value as |
| audio, video | The entire (flat) data object's duration is expressed in units such as frames, pages, layers, etc. |
| audio, video | The same as |
| audio, video | The same as |
| audio, video | The same as |
Delete Support
Operation | Description | Effect on the main fragment | Effect on pure non-permanently fragments
|
---|---|---|---|
Logically delete a pure fragment | The deletion of the pure fragment is instantly permanent and hence irreversible | None | The specific pure fragment becomes permanently deleted
|
Logically delete the main fragment | The delete expands to the object as a whole | Logically deleted | Logically deleted |
Restore a logically deleted main fragment | The restoration expands to the object as a whole | Restore it | Restore them |
Restore a logically deleted pure fragment | The restoration expands to the object as a whole. Note that pure fragments can only become logically deleted, by logically deleting the main fragment. | Restore it | Restore them |
Permantly delete the main fragment | The permanent delete expands to the object as a whole | Permanently deleted | Permanently deleted |
Permantly delete a pure fragment | Operation is forbidden. The permanent delete must be done on the main fragment. |
|
|