Versioning Utilities (v1.7)

Introduction

This package is intended as an example of a standard RV integration technique. The idea is to make use of the Session (both as an in-memory data structure and as a Session File on-disk), for data storage, while supplementary modes modify, monitor, and act on the stored data. This enables several different structures or styles of integration, including splitting front/back end APIs (IE splitting processing of Session data from creating Session data), allowing multiple back ends (the Session data can be created and stored in the session by different or alternate modes), and feeding the Session data directly by programmatically creating session files.

The example workflow here is "Versioning", which is the process of associating a single Source in RV with multiple sets of media and associated data, to enable switching "in place" between different versions of a given media object, commonly a Shot. In it’s simplest form, switching versions involves switching from one movie or frame sequence to another, but could eventually involve a host of associated data that may differ "per version", including:

  • Frame range (cut length)

  • Timecode or local frame mapping for movies

  • Audio file

  • Audio offset

  • Stereoscopic 3D media

  • Cropping

  • Etc.

In this sample implementation, we’ve addressed the above "dimensions" but obviously many more are possible.

Session Data

The versioning data is stored in the session file on the RVFileSource node in container called (wait for it …) "versioning". Each version comes with (possibly)

  • Video media (mono or stereoscopic 3D)

  • Audio media

  • Cut length

  • Local frame mapping (Range Offset: this is in general 0 for frame sequences, and provides an offset for frame mapping for movies with no timecode)

  • "Nice" name of the version for the versioning interface.

  • Color of the version for the versioning interface.

  • Crop and "Uncrop" data

  • Audio Offset

Except for the media, all the other information is optional. The interface will make use of it if it is available. If present, the length of each array (for example, the "color" array) must be equal to that of the media array. Except for "media", the format and meaning of each of these properties exactly matches the format of the corresponding command line option.

Table 1. Versioning Properties
Property Name Type Default Value Optional Notes

media

string

none

no

Media path, or paths separated by the pipe/vertical bar character for stereoscopic video, or video plus audio.

name

string

computed from media

yes

 

audioOffset

float

0.0

yes

In seconds.

rangeOffset

int

0

yes

Added to the "native" frame number (so a movie without timecode will appear to start at frame (1 + rangeOffset).

cutIn

int

0

yes

First frame of the trimmed media.

cutOut

int

0

yes

Last frame of the trimmed media.

color

float[3]

[0.75, 0.75, 0.75]

yes

Something less than "full white" is good so that the versioning selector can "brighten" the version under the pointer.

crop

int[4]

[0, 0, 0, 0]

yes

Crop coordinates for incoming media: [xmin, ymin, xmax, ymax]

uncrop

int[4]

[0, 0, 0, 0]

yes

Specification for a (generally) larger space in which to place the (possibly cropped) media: [width, height, xoffset, yoffset]

Here’s an examble of what this might look like in the Session File. (There is also a sample Session File distributed with this package — look for SupportFiles/versioning/versionsSimple.rv, or just unzip the package by hand.)

    versioning
    {
        string media = [
            "/rvshotgundemo/BBB_Short/09_tree_trunk/007/ANIM/001/BBB_09_tree_trunk_007_ANIM_001.mov"
            "/rvshotgundemo/BBB_Short/09_tree_trunk/007/ANIM/002/BBB_09_tree_trunk_007_ANIM_002.mov"
            "/rvshotgundemo/BBB_Short/09_tree_trunk/007/COMP/001/BBB_09_tree_trunk_007_COMP_001.mov|audio_09_007.wav"
            "/rvshotgundemo/BBB_Short/09_tree_trunk/007/COMP/002/BBB_09_tree_trunk_007_COMP_002.mov"
            "/rvshotgundemo/BBB_Short/09_tree_trunk/007/TD/001/BBB_09_tree_trunk_007_TD_001.mov"
            ]

        string name = [
            "tree_trunk_007 Anim v001"
            "tree_trunk_007 Anim v002"
            "tree_trunk_007 Comp v001"
            "tree_trunk_007 Comp v002"
            "tree_trunk_007 TD   v001"
            ]

        float[3] color = [ [.8 .8 .8] [1 .5 .5] [.8 .8 .8] [1 .5 .5] [.8 .8 .8] ]
        int cutIn = []
        int cutOut = []
        int rangeOffset = [ 5 5 2 1 4 ]

        int[4] crop = [
            [0 0 0 0]
            [0 0 319 179]
            [320 180 639 359]
            [0 0 0 0]
            [0 0 0 0]
            ]

        int[4] uncrop = [
            [0 0 0 0]
            [640 360 0 0]
            [640 360 320 180]
            [0 0 0 0]
            [0 0 0 0]
            ]

        int currentIndex = 4
    }

Version Selector

The Version Selector shows a list of version names (or the media file name if no version name was specified) in the color specified for each version:

blobid0.jpg

The current version is shown with a yellow dot to the left, and a dimmer dot indicates the previously selected version, if any. To switch to a new version, just click on the name of the version you want to switch to.

The Selector can be drawn as a "floating widget" over the imagery (the default) or fixed in the margin of the view (not over the imagery). To set this draw mode, right click on the Selector. This setting is remembered as a preference for future sessions. When "floating," the Selector can be positioned by left-clicking and dragging.

The Version Selector is off by default, to turn it on select the Versions/VersionSelector menu item, or hit the hotkey ("shift V").

Operations on Versions

Whenever an operation requires two versions, the two used will be the current version and the last selected version; that is, the versions indicated in the version selector by the two dots. The Versions menu provides the following functionality:

Version Selector

Turns on and off the version selector widget. (Hotkey "shift V")

Cycle Version Stack

Step through the versions one by one. (Hotkey "shift X")

Compare Two Versions

Do an A/over/B compare of two versions, and wipe between the two. Shift-left arrow (or "left" arrow at top of Session Manager) to return to previous view.

Tile Two Versions

Tile two versions for side-by-side comparison. Shift-left arrow (or "left" arrow at top of Session Manager) to return to previous view.

Tile All Versions

Tile all available versions for comparison. Shift-left arrow (or "left" arrow at top of Session Manager) to return to previous view.

Sequence All Versions

Put all available versions in a sequence for comparison. Shift-left arrow (or "left" arrow at top of Session Manager) to return to previous view.

Help …

Show this document.

Follow