Media commands
There are 18 commands relating to media handling. They are:
-new_scene name
-import /path/to/footage
-import_params /path/to/footage /path/to/params.xml
-cut CLIP_IDENTIFIER
-cut_params CLIP_IDENTIFIER /path/to/params.xml
-list_clips
-list_sequences
-list_scenes
-delete_clip CLIP_IDENTIFIER
-delete_clip_if_exists CLIP_IDENTIFIER
-delete_sequence sequence
-delete_sequence_if_exists sequence
-delete_sequence_if_empty sequence
-delete_sequence_if_empty_if_exists sequence
-delete_scene scene
-delete_scene_if_exists scene
-delete_scene_if_empty scene
-delete_scene_if_empty_if_exists scene
-new_scene
creates a new scene of a given name.
-import
imports the specified image sequence using the following defaults:
name=
taken from filenamescene= Default
in=
first frame of image sequenceout=
last frame of image sequenceframe rate
,drop frame
,pixel aspect ratio
,colour space
,defect map
,deinterlace
are taken from the project settings
To import a clip with anything other than these defaults use the
-import_params
command which, as well taking the location of
the image sequence, takes the location of an XML file which describes
the import parameters. This XML is defined thus:
<import>
<name>myclip</name>
<scene>newscene</scene>
<in>100</in>
<out>200</out>
</import>
The XML tags for frame rate, drop frame, pixel aspect ratio, colour space, defect map are as described for the project. If a parameter is not specified in the XML file then it takes the default value described above. So, for example, if you wished to just override the scene into which the clip is imported you could use an XML file such as:
<import>
<scene>newscene</scene>
</import>
A clip must be imported before any other operations can be performed on it.
The -cut
command runs scene cut detection over the specified clip using the same default parameters as if the GUI was used. -cut_params
allows for a parameters files to be specified to override the minimum length, threshold and detection
method defaults if they do not suffice:
<cut>
<minLength>10</minLength>
<threshold>0.8</threshold>
<method>2</method>
</cut>
The cut detection method is the sum of image content=1
, timecode=2
and edgecode=4
.
The -list_clips
command lists, for clip in the project, the clip name; its filename; the scene it is in; whether it is a video clip (as opposed to an audio clip); its width; its height; its start frame; its end frame and its unique ID. The first 3 items are enclosed in double since they may contain spaces.
The -list_sequences
command lists, for each sequence in the project, the name of the sequence; whether it is a rough edit sequence; whether it is the currently active sequence; whether its the currently active alternate sequence; the number of items that comprise the sequence; the number of clips in the sequence; and the sequence's unique ID. Then, for each item entry in the sequence, the name of the
clip; the clip's filename; the entries start frame in the sequence; the entries end frame in the sequence; the entries playback direction (1=forwards); the in frame of the clip; the clip's playback speed (1.0=normal speed
); the clip's version (-1=latest
) and the entries unique ID. Then, for each clip referenced in the edit, the clip's name; its filename; whether the clip is an audio clip, transition clip or slug clip; and the clips unique ID.
The -list_scenes
command lists, for each scene in the project, the name of the scene.
The -delete_clip
, -delete_sequence
and -delete_scene
commands deletes the relevant item from the project. There are variations on these commands to only delete an item if it exists (otherwise trying to delete a non-existent item would
lead to an error); and only deleting an item if it is empty.