/
Fragments

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

Term

Meaning

Start

End

Main fragment

The (flat) data object itself; it can have sub-objects, called “pure fragments”.

0 (per definition)

D (equal to the number of frames in the video, pages in a document, etc)

Pure fragment

The sub-object as a part of the main fragment between a particular start and end point.

Value between [0,D[

Value between ]start, D]

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
on the detail page of an object in MediaHaven

Descendant

Usage

Visualization
on the detail page of an object in MediaHaven

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
Record Type

Main Fragment
Media Type

Pure
Fragment
Record Type

Pure Fragment
Media Type

Dimension

Start and End are counted in these units

Notes

Export
When exporting a pure fragment return the following file

Since

Main Fragment
Record Type

Main Fragment
Media Type

Pure
Fragment
Record Type

Pure Fragment
Media Type

Dimension

Start and End are counted in these units

Notes

Export
When exporting a pure fragment return the following file

Since

Record

video

Record

videofragment

frames

Ability to create a slice in a video file

A video cut between the start and the end

 

Record

audio

Record

audiofragment

frames

Ability to create a slice in an audio file

An audio cut between the start and the end

 

Record

image

Record

layer

layers

Ability to select a subset of layers in a multilayered image such for example a TIFF

The entire image

 

Record

document

Record

page

pages

Ability to select a subset of pages in a document

The entire document

 

Media

video

Media.Fragment

videofragment

frames

Ability to create a slice in a video file

A video cut between the start and the end

25.1

Media

audio

Media.Fragment

audiofragment

frames

Ability to create a slice in an audio file

An audio cut between the start and the end

25.1

Media

image

Media.Fragment

layer

layers

Ability to select a subset of layers in a multilayered image such for example a TIFF

The entire image

25.1

Media

document

Media.Fragment

page

pages

Ability to select a subset of pages in a document

The entire document

25.1

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

Metadata Field

Media Type

Notes

Internal.FragmentId

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 Internal.MediaObjectId.

Internal.MediaObjectId

all

The unique 64-character identification of the object as a whole. All (pure) fragments share the same value.

Internal.RecordId

all

The same value as the Internal.MediaObjectId per definition

Administrative.IsFragment

all

More accurately this field indicates whether the object is a pure fragment.

Structural.Fragments.Fragment

all

List of all pure fragments. Only available on the main fragment.

Structural.MainFragment

all

The fragment ID of the main fragment. Only set for pure fragments.

Structural.FragmentStartFrames

all

The start offset of the pure fragment, expressed in units such frames, pages, layers, etc.

Structural.FragmentEndFrames

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 [start, end[.

Structural.FragmentDurationFrames

audio, video

The difference between end and start. As a consequence, it is between 0 and the duration (in frames, pages, etc) of the main fragment.

Structural.FragmentStartTimeCode

audio, video

The same as FragmentStartFramesbut expressed in timecode units

Structural.FragmentEndTimeCode

audio, video

The same as FragmentEndFramesbut expressed in timecode units

Structural.FragmentDurationTimeCode

audio, video

The same as FragmentDurationFramesbut expressed in timecode units

Technical.StartFrames

audio, video

The start of the main fragment, by definition, has a value of 0

Technical.EndFrames

audio, video

The end of the main fragment, by definition, has the same value as DurationFrames

Technical.DurationFrames

audio, video

The entire (flat) data object's duration is expressed in units such as frames, pages, layers, etc.

Technical.StartTimeCode

audio, video

The same as StartFrames but expressed in timecode units

Technical.EndTimeCode

audio, video

The same as EndFrames but expressed in timecode units

Technical.DurationTimeCode

audio, video

The same as DurationFrames but expressed in timecode units

Delete Support

Operation

Description

Effect on the main fragment

Effect on pure non-permanently fragments

 

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

DeleteStatus -> PermanentlyDeleted

Logically delete the main fragment

The delete expands to the object as a whole

Logically deleted
DeleteStatus -> LogicallyDeleted

Logically deleted
DeleteStatus -> LogicallyDeleted

Restore a logically deleted main fragment

The restoration expands to the object as a whole

Restore it
DeleteStatus -> NotDeleted

Restore them
DeleteStatus -> NotDeleted

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
DeleteStatus -> NotDeleted

Restore them
DeleteStatus -> NotDeleted

Permantly delete the main fragment

The permanent delete expands to the object as a whole

Permanently deleted
DeleteStatus -> PermanentlyDeleted

Permanently deleted
DeleteStatus -> PermanentlyDeleted

Permantly delete a pure fragment

Operation is forbidden. The permanent delete must be done on the main fragment.