Modify Folder: sorting the media

In CINELERRA-GG all the virtual mediafiles loaded in the Resources window are collected in the Media folder without any kind of organization and sorting other than alphabetical. The Media folder is considered a master folder because it is the basis for every other new folder we create. Another master folder is Clips, and in fact we can create new clips folders as well. If we do editing of large projects containing numerous mediafiles, a rational and selective organization of the source material becomes necessary. In fact, having the sources organized in folders, where they can be found and used easily, makes subsequent editing much faster, as well as minimizing confusion and the possibility of errors. This step, which is fundamental in the pro environment, is called Logging and also includes screening individual mediafiles in the Viewer window; renaming them rationally; and adding labels and descriptions in the metadata.

We start by creating one or more new folders (MediaUserBin). These will be empty and we should populate them with the mediafiles contained in the master Media folder. There are two options: manual Drag and Drop or automatic populating by setting filters (Smart Bins).

Drag and Drop:

you drag mediafiles into the new folder one by one or in selected groups. The starting master folder can only be Media (or Clips, if we have created a new clip folder). Dragging is done by preserving the absolute path of the sources. If you open Modify Folder window you will notice that each imported mediafile occupies a different row characterized by its own path and name. See figure 2.29. The Value field containing paths can contain only 63 characters, and it may happen to find the names cut off. The full path and name can be found by right-clicking on the row, but this is inconvenient and time-consuming. The best solution is to drag the mediafiles while holding down the Shift key; this will return the relative path instead of the absolute path, with space gain.

Figure 2.29: Modify Folder

\begin{tikzpicture}[scale=1, transform shape]
\node (img1) [yshift=0cm, xshift=... width=1mm] (Arrow1) edge ([yshift=-20mm] img1.north west);


you do automatic populating using filters (Smart Bins mode). You set the values of the Enabled; Target; Op and Value fields to make up the required filtering. The folder will populate automatically by pulling from the Media master folder. The filter is the result of one row, but we can do more sophisticated filtering by adding more rows. The process will start from the first row propagating to subsequent rows always following the pattern from top to bottom. See figure 2.30.

Figure 2.30: The available choices for each field. Value field missing.

\begin{tikzpicture}[scale=1, transform shape]
\node (img1) [yshift=0cm, xshift=...

Let's look in detail at all the options of Modify Folder.

When you bring up the Modify folder window, if you already have files in that folder, you will see filters that were generated automatically when you did a Drag and Drop. See figure 2.29.

When you click on the Value portion of that filter, the entire set of files that are covered by the filter rules pops up. Now you can highlight a target filename that you would like to remove, and just erase that line and check the green checkmark for OK.

To delete the entire set of files listed on the filter rule, highlight the rule line and hit the Del button.

To add a new filter rule, click on the Add button which will automatically add a default line after any current lines. The default line will be a line that matches everything in the master Media folder which is Or Patterns Matches *. Click the right mouse button on the current field underneath the column header to see the choices available for each column.

Modifications will not be in effect until you click on the green arrow OK button or click on the Apply button. But once you hit Apply, clicking on the red X button will not undo your changes. The filter/search rules are applied in the order listed in the Modify folder window. You can change the order of the filter rules by highlighting the rule you want to move and then drag and drop to a new location.

Information about the columns and rules for the search filters in the Modify folder window follows .

Column headers:

– this column is used to designate the state of that filter rule
disable the filter
narrow your search; all of your search terms must be present
broaden your search to include more values
And Not
exclude terms that do not contain the given value from your search results
Or Not
include terms that do not contain the given value from your search results
– this column designates which media asset attribute to look at
each line contains a filename filter, matches the file path
number of bytes in a file
date file was created
Track Type
track type of video, audio, or audio video (for both)
Format width
Format height
Video framerate
Audio samplerate
Number of audio channels
Playback time in seconds – it uses the largest of audio or video if contains both
– boolean operators used to narrow or broaden the relationship between your search terms
about this value; use +radius for a search range: [target–radius... target+radius]
equal to
greater than or equal to
greater than
not equal
less than or equal
less than
exactly matches for strings

Value — the characteristic you are looking for with expressions that can be written with the following:

(decimal points are allowed and will be converted to a standard form):
representing infinity
— where # represents a number and the characters mean:

inf = infinity
T = 1099511627776
t = 1000000000000
G = 1073741824
g = 1000000000
M = 1048576
m = 1000000
K = 1024
k = 1000



Date time:
date = year/month
date = year/month/day
time = hour:minute
time = hour:minute:second
date_time = date time

day = #day | #days
week = #week | #weeks
month = #month | #months
year = #year | #years
delta = secs
delta = mins:secs
delta = hours:mins:secs

Around time:
date time+duration

Around length:

Table showing the allowed usage:

target:    |  eq  ge  gt  ne  le  lt   matches  around
patterns   | <---- strcmp ---------> + filter + nearest
file_size  | <---- arithmetic -------+------> + radius
mod_time   | <---- arithmetic -------+------> + radius
track_type | <---- member test ------+--------+------>
width      | <---- arithmetic -------+------> + radius
height     | <---- arithmetic -------+------> + radius
framerate  | <---- arithmetic -------+------> + radius
samplerate | <---- arithmetic -------+------> + radius
channels   | <---- arithmetic -------+------> + radius
duration   | <---- arithmetic -------+------> + radius

where in the above, the filter can be:

filter = list
filter = token
list = [token]
list = [token]list
string = <chars>|<empty>
token = string
token = string*token

Examples with some caveats first:

  1. Or generally includes or adds whereas And generally excludes or subtracts.
  2. The filters only work on media in the folder; if there is no media, then there is nothing to search.
  3. The examples below are not meant to be executed as a list of filters in Modify folder, they are just single line examples to indicate what can work.
  4. Sort is by filename base name (directory path not included automatically) except when the Around operation is used and then it is sorted by that Target distance first and then filename.

Table 2.2: Examples
Enable Target OP Value meaning
Or Patterns Matches * all files from the Media Folder are included
And Not Filesize Lt 160000000 no files that are less than 160MB in size
Or Not Time Ge 2018/07/30 06:13:00 files not greater than or equal date
And Duration Eq 01:00 files included must have 60 secs. Duration
Off Samplerate Ne 44000 off for now, but may want to include later
And Framerate Around 24+1 files included all have 24 to 25 framerate
Or Patterns Matches [*.mp4] all files with the extension of mp4
Or Time Around 2018/08/02 06:00:00 + 02:00:00 files at 4 AM to 8 AM

The CINELERRA-GG Community, 2021