Q100622: Understanding assets within the Flix database structure

SUMMARY

This article will give an outline of the Flix database structure, explain what a media object and an asset are, show how files in the assets directory are pointed to specific panels, and how panels are linked to their sequence revisions in the database.

The aim of this article is to clarify what information the most common database tables hold, to better understand the Flix Server logs and some of Flix’s back-end logic.

If you are instead looking for how to retrieve specific metadata either from within MySQL or from the Flix Client Dev Tools, please refer to:


MORE INFORMATION

All data and metadata for Flix is stored in the MySQL schema the config.yml file points to and is organized in tables, which are linked together based on information they have in common.

The tables used most often for troubleshooting and understanding the connection between what is stored in the database and what is shown in the Flix Client are media_objectasset, vPanel_asset_ref, and sequence_panel.

For more details about these common tables, please click on the disclosure

arrows below:

 

media_object

This table lists and specifies the purpose of all files that have been imported successfully via the Client, and all files that have been created by the Server. All of these files are expected to be in the assets directory.

Media object IDs are unique across the whole schema.

Files in the assets directory are saved with the naming convention of <id>_<filename>, where <id> is the media object ID given to that file at the time the database entry for it was created (first column from the left in the screenshot above), and <filename> is the actual name of the file imported to/created by Flix (second column from the left in the screenshot above).

You may have seen mentions of media objects in the Flix Server logs. Essentially, they’re a way for Flix to catalog files and know what each one is for: each media object entry is pointing to a specific file in the assets directory, which Flix uses for different things depending on its ref (second column from the right in the screenshot above). To avoid confusing this with ref panels from Editorial, this field will be referred to as media_object.ref

 

A media object can be one of the following media_object.ref:
  • aaf: Can be either an Avid-generated AAF which was imported to Flix, or an AAF Flix generated when publishing to Avid. Generally, if the filename contains _all or _new at the end, you can assume that it was a Flix-generated AAF file.

  • annotation: Refers both to annotations added directly on panels via the Flix UI, as well as annotations sent from Photoshop. An annotation will always be a PNG file.

  • artwork: Represents the original file imported to Flix to create a panel. Generally, this will be a PSD file or another still image such as a PNG file, but it can also be a MOV in the case of an animated panel from Editorial or a manually imported MOV file.

    When importing from Photoshop or SBP using the available integrations, this file will be a cleaned-up version of the original PSD the artist worked on, which doesn’t include unused invisible layers.

    When importing manually, the artwork will be the exact file that was imported.

  • audio: Audio that has been imported into a sequence revision, recorded during a pitch, or that was created while reconforming from Editorial. Can be any audio file type supported by Flix, for example, WAV or MP3.

  • dialogue: This media object is not the dialogue seen on panels in the UI, but rather the TXT file Flix generated during a publish to Avid, or an export. Dialogue on panels isn’t saved against a file, as it’s strictly metadata, therefore there isn’t a separate media object for it.

  • dnxhd: This media object represents the DNxHD for a panel that was added in an AAF during a publish to Avid.

  • fullres: This is the media object for the PNG file Flix uses for most panels when publishing to Editorial: a flattened version of the artwork, which also fits the show’s aspect ratio. If a fullres for a panel isn’t present, the thumbnail media object will be used for the publish instead.

    Flix does not generally crop images to make them fit the aspect ratio, but rather fills any space that needs to be added with black, to get to the correct measurements; this logic is also present for the creation of the thumbnail. The one case where Flix crops the artwork to create the fullres and the thumbnail is to remove the letterboxing when present. 
    The images below show a demonstration of the “black filling” applied to an image which is needed for a camera pan, and for example, doesn’t fit a 2.35 aspect ratio; the width is unchanged, and black is added to the height to fit the aspect ratio.

  • master: This is the media object for what we call a Master Image, which is the non-cleaned-up PSD file that contains all layers, frames, and layer comps the artist created.
  • publish: Used to publish to Avid, it’s a PNG created from the fullres, constrained to be 1920x1080 due to DNxHD codec restrictions, with black bars on the top and bottom to fill the art to the show aspect ratio. These files will have a burn-in on the top left with the panel ID, date, and time of the publish.
  • publish_fullsized: Used to publish to Premiere, it’s a PNG file created from the artwork, with a burn-in on the top left with the date and time of the publish.  Essentially it’s a fullres that’s not constrained to the show aspect ratio. 
    The reason for this is that the DNxHD restrictions aren’t present for publishes to Premiere. 
  • scaled: This is the PNG file used in the Dialogue Workspace. It’s a scaled-down version of the artwork, constrained to be 1000 pixels in length with no regard to the show’s aspect ratio for the height; this is so that any dialogue that was potentially written in Photoshop on the panel’s letterboxing can be visible in the Flix Dialogue Workspace
  • show-thumbnail: The PNG file used to display a show’s cover image in the Flix home screen.
  • thumbnail: This is what Flix uses to display panels in the Panel Browser and the Player. It’s a much smaller version of the artwork: a PNG constrained to be 1000 pixels in length, with a height dependent on the show’s aspect ratio. 
    Whenever a sequence revision is opened via the Client, at least one of these files per panel is downloaded locally from the Flix Server. Animated panels have as many thumbnails as there are frames available for that panel.
  • xml: This media object represents the XML file Flix creates when publishing to Premiere. Flix doesn’t save XMLs used to publish back from Premiere or to import from/reconform to Storyboard Pro.

 

asset

This table lists all assets and defines which show they belong to. Each panel in Flix uses an asset.

In the context of Flix, an asset is a collection of media objects. The IDs for assets are unique across the whole schema.

Some assets are standalone and only have one media object in them, for example, the assets that hold the xml, aaf, dialogue, annotation, audio media objects. However, most assets will contain multiple media objects since each panel revision in Flix points to an asset that includes at least the artwork and thumbnail.

Below is an example of what media objects can be found in the asset for a panel in a show using 2.35 aspect ratio, which was created in Photoshop using the Flix template provided by the plugin, and sent to Flix via the Each Layer Comp button.

Panel 860 in the screenshot below uses asset_id 15539 (more information on how to find out what asset a panel uses can be found in the vPanel_asset_ref section).

Searching for asset_id 15539 in the media_object table will show all of the files grouped under that asset.

And this is what each one of these media objects look like:

  • artwork media object - 2000x1091 including letterboxing
  • thumbnail media object - 1000x424 no letterboxing present
  • scaled media object - 1000x545 including letterboxing
  • fullres media object - 2000x849 no letterboxing
  • publish and consequently also dnxhd media objects - 1920x1080 including black bars to fit to aspect ratio

 

vPanel_asset_ref

This is the table that links each Flix panel revision to its corresponding set of files.

Because assets are collections of media objects, which in turn are basically all just files, this table can be seen as storing all of the file-panel associations Flix needs to display the correct thumbnails in the Panel Browser, open the correct artwork in Photoshop, publish the right full resolution image and so on, for each panel.

The panel_id (second column from the right) and vPanel_id (first column from the left) represent respectively the exact same panel ID and revision numbers users see on panels in the Flix Client.

Worth noting that unlike other IDs mentioned until now, panel_id and vPanel_id are not unique. Because of this, searches for a specific panel revision must always also include at least the sequence_id of the sequence the panel is in as well.

A step-by-step on how to find a sequence’s ID via the Flix Client is provided in the Knowledge Base article Q100619: How to retrieve show_id or sequence_id from the Flix Client.

To instead find a sequence’s ID knowing its title via a SQL search, you can refer to Q100617: Example MySQL Queries for Flix.

 

Multiple panels from the same show can point to the same asset and therefore make use of the same files. This is what we refer to as asset sharing.

An asset will be shared when:

  • A panel has been duplicated (either in Flix or in Editorial) within the same sequence revision
  • The same panel is used in multiple sequences

This allows for the database and the assets directory not to increase in size unnecessarily, and for the Flix Client not to have to download the same file twice when opening sequence revisions containing multiple panels using the same art.

However, not all media objects contained in the asset are shared: a new publish, publish_fullsized, and dnxhd media object will be created when publishing to Editorial regardless of whether the asset has one already or not.

For example, in the screenshot below, panel 8 is a duplicate of panel 5. Opening this sequence revision with an empty Local Asset Cache will fill it with only 2 files since panel 5 and panel 8 use the same asset, and consequently the same thumbnail media object.

This can be clearly seen in the vPanel_asset_ref table, where both panel 5 and panel 8 are seen as using asset 19289.

 

sequence_panel

This table lists which panel revisions are present in which sequence revisions in Flix, as well as the order they appear and their durations.
 

Users will be familiar with information such as panel_id and panel_revision, since this is the same information displayed in the Flix Client. For example, for the panel on the left in the below screenshot, 52 is the panel_id and 4 is the panel_revision.

The sort_order column is deceiving, as indeed it refers to the panel position in the sequence, but the count in the database starts at 0 whereas in the Flix Client, it starts at 1. Panel 52-4 in the above screenshot is in position 50, but this will be shown as position 49 in MySQL.

The duration of a panel is displayed in the Properties tab, and this column is only applicable to still panels.

trim_in and trim_out on the other hand are used to define the duration of animated panels, as the artwork for these will be a video file.  

The values in the sequence_revision column in the database are also mirrored in the Flix Client.

However, while users refer to Flix Sequences and Shows via their title or tracking code, in the database these are referred to by their sequence_id and show_id. These IDs are unique across the whole schema and immutable, unlike tracking codes or titles.

Assets for each show are saved in a folder in the assets directory that’s named after the show_id number.

 


FURTHER READING

To find out more about how this information is shared between the Flix Server and the Flix Client, and better understand the Flix back-end in general, you can read through our Flix Server Technical Overview.

For a list of useful SQL queries to help you find Flix metadata from within the database, take a look at Q100617: Example MySQL Queries for Flix in our Knowledge Base.

If you would like to find the show_id or sequence_id for one of your Flix projects, but are not comfortable using MySQL, you can refer to Q100619: How to retrieve show_id or sequence_id from the Flix Client.

    We're sorry to hear that

    Please tell us why