Friday, January 15, 2016

Formula Functions for Cumulus 10

var ( variable-name [, value ] )

This pseudo-function either sets a variable to a given value or returns the current variable value. A variable can be get and set multiple times.

The last formula expression (following the var() setter functions) then returns the value of the whole expression. There is no specific separator necessary after each var() setter function.

Returns: The variable value



subtableitems ( result-table-spec, query-string, sort-fields, sort-directions, limit-offset, limit-count )

Returns a "collection" type value that can be used as parameter to other functions (but not as a field value). The collection is created for the given result-table-spec containing items that match the given query.

The collection is then sorted by the given sort fields (comma-separated list of field-specs) and the sort-directions (comma-separated list of "ascending"/"descending". The collection is then limited to only contain up to limit-count items starting at offset limit-offset.

The result-table-spec needs to be a sub-table of the current item's table because the query is always extended with a condition to match the item ID as the "Host Item ID".

Returns: The collection object



itembyindex ( collection-object, index )

Returns an "item" type value that can be used as parameter to other functions (but not as a field value). The index parameter specifies the index of the item inside the collection object specified. An index of 0 returns the first item, 1 the second item, etc. A negative index returns an item counting from the end of the collection: -1 returns the last item, -2 the item before the last one etc.

Returns: The item object (or null if there is no such item)



fieldvalue ( field-spec [, item-object] [, as-string] )

Variant of the existing function that returns the value of the field specified for the given item object. The item object is the result of the itembyindex() function.

Returns: The field value (any type)



fieldhasvalue ( field-spec [, item-object])

Variant of the existing function that returns whether the field specified for the given item object has a value or not. The item object is the result of the itembyindex() function.

Returns: A boolean telling whether the field has a value or not



sum (collection-object, field-spec)

Calculates the sum of all values in the field specified by "field-spec" in all items of the "collection-object". Empty field values are skipped.

Returns: The sum of all values (integer or real)



average (collection-object, field-spec)

Calculates the average of all values in the field specified by "field-spec" in all items of the "collection-object". Empty field values are skipped. For Rating type fields the average needs to build the average of the number of stars whereas the field value itself is just the ID.

Returns: The average value (integer or real)



median (collection-object, field-spec)

Picks the median of all values in the field specified by "field-spec" in all items of the "collection-object". Empty field values are skipped.

Returns: The median value (integer or real)



min (collection-object, field-spec)

Variant of the existing function that calculates the minimum of all values in the field specified by "field-spec" in all items of the "collection-object". Empty field values are skipped.

Returns: The minimum value (integer or real)



max (collection-object, field-spec)

Variant of the existing function that calculates the maximum of all values in the field specified by "field-spec" in all items of the "collection-object". Empty field values are skipped.

Returns: The maximum value (integer or real)



count (collection-object)

Count the number of items of the "collection-object".

Returns: The number of items (integer)

Wednesday, January 13, 2016

Trimming MP4 with MPEG Streamclip

An excellent feature of MPEG Streamclip is trimming MP4 video without re-encoding. This is great for preserving high quality compression when you simply need to cut down the video duration.

STEP 1: Scrub to your in point "Go To Keyframe" edit option to lock to next I-Frame and set in point. Do the same for your out point. This prevents the pixel smear you would see from cutting on P or B-Frames.


STEP 2: Click File -> Save As... to write new file with a clean MP4 wrapper.


Thursday, January 7, 2016

Restricting Category Access in Cumulus

If you need to restrict a user to one category, you can use the Live Filtering feature in Cumulus user permissions.

STEP 1: In this example, I create a new category called "Texans", and then do a custom search for "Categories" -> "Contains" -> "Texans". This will restrict results to show only assets in the new category. Use the pulldown menu on the upper left to save your query.


STEP 2: When saving, click the checkbox for "Share Query", this will make it available for other users.


STEP 3: Go to Server Console -> User Manager -> (Select User) -> Properties -> Catalog Permissions. Enable general access to the catalog, then scroll down to Live Filtering. Click checkboxes for "Use Category Live Filtering" and "Use Record Live Filtering"


STEP 4: Click the "Use Query" button, and select the search query you created earlier. Set for both "Use Category Live Filtering" and "Use Record Live Filtering" then click "OK" twice to save your new user settings. Return to Cumulus, login as the restricted user, and you will see only the restricted category.