Share

Open Clip Examples

Note: In the following examples all the paths given are relative, for the sake of conciseness. But the <path> element supports both relative and absolute file paths.

Debugging an Open Clip

An Open Clip that imports in Flame is an Open Clip that is valid.

Now, not every Open Clip you create will be valid. Since there is no XML-schema available to validate your xml, you need to rely on Flame to test and fix your Open Clip. Whenever Flame encounters an error while parsing an Open Clip file, it displays an error in the shell. Read the shell, or parse the shell log files (/opt/Autodesk/log/*shell.log), to get the error message. From the error message you can debug the Open Clip .xml.

Example 1: One Track

                  0     1     2     3     4     5     6     7
Clip                    [=====+=====+=====+=====+=====[
  Track 0               [=====+=====+=====+=====+=====[
    Feed  v0            [=====+=====+=====+=====+=====[

This first example of an Open Clip contains a single video track. This one track has one <feed> for which there is only a single referenced media file. This example is the simplest Open Clip you can create.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="f0">
                    <spans>
                        <span>
                            <path encoding="file">Media/Video1.mov</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
</clip>

Remarks:

  • Only a subset of the XML schema is used. Nothing more is needed to create an Open Clip.
  • Since the referenced file in the span is a streaming media, the path encoding is set to "file".
  • The clip starts at frame 1: It uses the timing defined by the media in the span. There is no need to specify any timecode or duration: information not explicitly set in an Open Clip is inferred from the media. In this case, the timecode is inferred from the .mov file header. As for the duration of the clip, it is inferred from the media duration.

Example 2: Two Tracks (Video + Audio)

                  0     1     2     3     4     5
Clip              [=====+=====+=====+=====+=====[
  Track 0         [=====+=====+=====+=====+=====[
    Feed  v0      [=====+=====+=====+=====+=====[
  Track 1         [=====+=====+=====+=====+=====[
    Feed  a0      [=====+=====+=====+=====+=====[
  Track 2         [=====+=====+=====+=====+=====[
    Feed  a1      [=====+=====+=====+=====+=====[

This second example illustrates a 2-track Open Clip, with 1 video and 2 audio tracks.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="f0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video1.[0000-0004 ].dpx</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
        <track uid="t1">
            <trackType>audio</trackType>
            <feeds>
                <feed vuid="v0" uid="f0">
                    <spans>
                        <span>
                            <path encoding="file">Media/Audio1_1L.wav</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
        <track uid="t2">
            <trackType>audio</trackType>
            <feeds>
                <feed vuid="v0" uid="f0">
                    <spans>
                        <span>
                            <path encoding="file">Media/Audio1_1R.wav</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
</clip> 

Remarks:

  • Each track has its own feeds.
  • Each track has a unique uid, used to identify the track.
  • The element tracktype contains the audio keyword to identify the two audio tracks.
  • Since the referenced file in the span is a sequence of files, the path encoding is set to "pattern".
  • The clip starts at frame 0: It uses the timing defined by the media in the span. There is no need to specify any timecode or duration: information not explicitly set in an Open Clip is inferred from the media. In this case, the timecode is inferred from the .dpx sequence filename, but could also be derived from the contents of the files header. As for the duration of the clip, it is inferred from the media duration.
  • There is no method to set left and right for the audio stereo tracks. Use naming conventions for the media files.

Example 3: One Track Two Versions

                  0     1     2     3     4     5     6     7
Clip                    [=====+=====+=====+=====+=====[
  Track 0               [=====+=====+=====+=====+=====[
    Feed  v0            [=====+=====+=====+=====[
    Feed  v1                  [=====+=====+=====+=====[

This example displays an Open Clip with 1 track with 2 versions. Use this structure for the multi-versions workflow.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds currentVersion="version0">
                <feed vuid="version0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video1.[0001-0004].dpx</path>
                        </span>
                    </spans>
                </feed>
                <feed vuid="version1" uid="v1">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video3.[0002-0005].dpx</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
    <versions nbVersions="2" currentVersion="version0">
        <version uid="version0"/>
        <version uid="version1"/>
    </versions>
</clip>

Remarks:

  • feed is the element that marks a version. In a track element, each feed is a different version.
  • The vuid attribute of a feed identifies the version to which that feed belongs. It must match one of the uid of a version.
  • In one track, each feed must have a different vuid.
  • currentVersion must be equal to a vuid. Be careful with the currentVersion attribute. It is found in both feeds and versions. It must be kept in sync to have a properly formatted Open Clip. Its function is to flag a preferred version. In Flame, it indicates the version to display in the MediaHub.
  • The duration of the track is the union of the 2 feed. In Flame, gaps due to differences between versions are indicated with the presence of No Media slates.
  • The two versions do not share the same start timecode because of the .dpx-defined timecode. See this example on how to manage start timecodes between versions.

Example 4: One Track Multiple Spans

            0     1     2     3     4     5     6     7     8     9    10    11    12    13    14    15    16
Clip              [=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====[
  Track 0         [=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====+=====[
    Feed v0       [=====+=====+=====+=====+=====|ooooo+ooooo+ooooo+ooooo|=====+=====+=====+=====+=====+=====[

In this Open Clip, one track is an aggregate of multiple media sources. When time comes to present the track in the application, each span is concatenated to the previous one, top to bottom.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video1.[0001-0005].dpx</path>
                        </span>
                        <span>
                            <path encoding="pattern">Media/Video2.[0001-0004].dpx</path>
                        </span>
                        <span>
                            <path encoding="pattern">Media/Video3.[0001-0006].dpx</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
</clip>

Remarks:

  • This example represents a single track (or layer). For multiple tracks, you must use multiple track elements.
  • You cannot offset a span: There are no provisions to create black between span element since a span is not an editorial decision, but rather a storage location: span does not have any timing information other than what can be inferred from the media it refers.
  • The duration of the feed is equal to the sum of the span elements.
  • Media has to be homogenous across span elements. You cannot mix formats, such as having DPX for one span, and then TIFF for another <span>.

Example 5: Stereo Clip

                  0     1     2     3     4     5     6     7
Clip                    [=====+=====+=====+=====+=====[
  Track 0               [=====+=====+=====+=====+=====[
    Feed  v0s0          [=====+=====+=====+=====+=====[
    Feed  v0s1          [=====+=====+=====+=====+=====[

This Open Clip illustrates a stereoscopic case, where there is media for a right eye, and other media for a left eye.

<?xml version="1.0" encoding="UTF-8"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="f0">
                                <storageFormat type="format">
                                                                                            <type>video</type>
                                <isStereo type="bool">true</isStereo>
                                <lSubFeedId type="uid">Left</lSubFeedId>
                                <rSubFeedId type="uid">Right</rSubFeedId>
                                </storageFormat>
                    <spans>
                        <span>
                            <paths>
                                <path subFeedId="Left" encoding="pattern">MEDIA/left-eye.[0001-0005].tif</path>
                                <path subFeedId="Right" encoding="pattern">MEDIA/right-eye. [0001-0005].tif</path>
                            </paths>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
</clip>

Remarks:

  • There is only one track and one feed to account for both eyes.

  • In path elements, subFeedId attribute is what differentiates the left eye from the right one.

  • In a Stereo Open Clip, the storageFormat element is a mandatory child of each feed that is stereo (with a subFeedID for each eye). Must be written as it appears here:

    <storageFormat type="format">
        <type>video</type>
        <isStereo type="bool">true</isStereo>
        <lSubFeedId type="uid">Left</lSubFeedId>
        <rSubFeedId type="uid">Right</rSubFeedId>
    </storageFormat>

Example 6: Multi-track From One OpenEXR

Clip
  Track 0 - BEAUTY:MasterBeauty 
    Feed  v0
  Track 1  Matte1
    Feed  v0
  Track 2  Matte2
    Feed  v0

This example illustrates how you can use an Open Clip to create, from a single multi-channel OpenEXR file, a structure that expresses the different channels of the OpenEXR.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="BEAUTY:MasterBeauty">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/RGB_2Mattes.exr</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
        <track uid="Matte1">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/RGB_2Mattes.exr</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
        <track uid="Matte2">
            <trackType>video</trackType>
            <feeds>
                <feed vuid="v0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/RGB_2Mattes.exr</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
</clip>

Remarks:

  • In this case, the uid of the different tracks are not random at all: they are the actual layer names of the multi-layer OpenEXR file. This is the important bit: if the uid does not match an OpenEXR layer, that track defaults to the first layer of the file, in this case the BEAUTY pass.
  • This structure opens up the possibility to version an OpenEXR.

Example 7: Timing Versions

                  0     1     2     3     4     5     6     7     8     9    10    11    12    13    14
Clip              [=====+=====+=====+=====+=====+=====+**\*****\*****\*****\******+=====+=====+=====+=====[
  Track 0         [=====+=====+=====+=====+=====+=====+**\*****\*****\*****\******+=====+=====+=====+=====[
    Feed  v0      [=====+=====+=====+=====+=====+=====[
    Feed  v1                                                                  [=====+=====+=====+=====[

This example illustrates 1 track, 2 versions, but with each version having a different start timecode: version 1 starts at 0 frames, the other starts at 10 frames.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds currentVersion="version0">
                <feed vuid="version0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video1.[0000-0005].dpx</path>
                        </span>
                    </spans>
                </feed>
                <feed vuid="version1" uid="v1">
                    <startTimecode type="time">
                        <rate type="rate">24</rate>
                        <nbTicks>10</nbTicks>
                    </startTimecode>
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video3.[0001-0004].dpx</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
    <versions type="versions" nbVersions="2" currentVersion="version0">
        <version type="version" uid="version0"/>
        <version type="version" uid="version1"/>
    </versions>
</clip>

Remarks:

  • The duration of the clip covers the whole of the durations of the 2 versions.
  • Frames where there is no media are presented in Flame as No Media slates.
  • Feed v0 starts at 0 because it uses the start timecode of the media defined in its span.
  • The startTimecode does not have to be at the rate of the media: It is just a unit of measure that defines where the media starts on the Timeline. It is still good practice to keep similar timings across the OpenClip to avoid conversion mix ups.

Example 8: Timing a Clip

         00:00:02+00   +01   +02   +03   +04   +05   +06   +07   +08   +09   +10   +11   +12   +13   +14
Clip              [=====+=====+=====+=====+=====+=====+**\*****\*****\*****\******+=====+=====+=====+=====[
  Track 0         [=====+=====+=====+=====+=====+=====+**\*****\*****\*****\******+=====+=====+=====+=====[
    Feed  v0      [=====+=====+=====+=====+=====+=====[
    Feed  v1                                                                  [=====+=====+=====+=====[

This example illustrates how to define the start timecode for an Open Clip.

<?xml version="1.0"?>
<clip type="clip" version="4">
    <startTimecode type="time">
        <rate type="rate">24</rate>
        <nbTicks>48</nbTicks>
    </startTimecode>
    <tracks>
        <track uid="t0">
            <trackType>video</trackType>
            <feeds currentVersion="version0">
                <feed vuid="version0" uid="v0">
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video1.[0000-0005].dpx</path>
                        </span>
                    </spans>
                </feed>
                <feed vuid="version1" uid="v1">
                    <startTimecode type="time">
                        <rate type="rate">24</rate>
                        <nbTicks>10</nbTicks>
                    </startTimecode>
                    <spans>
                        <span>
                            <path encoding="pattern">Media/Video3.[0001-0004].dpx</path>
                        </span>
                    </spans>
                </feed>
            </feeds>
        </track>
    </tracks>
    <versions type="versions" nbVersions="2" currentVersion="version0">
        <version type="version" uid="version0"/>
        <version type="version" uid="version1"/>
    </versions>
</clip>

Remarks:

  • The duration of the clip covers the whole span covered by the 2 versions.
  • Times where there is no media are presented in Flame as No Media slates.
  • Feed v0 starts at 0 because it uses the start timecode of the media defined in its span.
  • startTimecode does not have to be at the rate of the media: It is just a unit of measure that defines where the media starts on the Timeline. The rate you select defines how many ticks are in a second.
  • startTimecode defined in < (the second feed) overrides the timecode inferred from the media within.

Was this information helpful?