Skip to main content
Version: Next

MediaPoolItem

New in 21.2

ExportThumbnails(frames, [{exportThumbnailsOptions}])​

Return Type: {exportThumbnailsResult}

Renders the given frames (0-based offsets from the item start) into a single grid image, filled in the order given. Each element of frames may be an integer offset or a {frameOffset, label} dict.

Refer to Export Thumbnails Options for supported settings and returned keys.


New in 21.1.2

SetTranscription({transcription})​

Return Type: Bool

Replaces the transcription of the MediaPoolItem with the given transcription dict, as returned by GetTranscription. For a timeline clip the transcription is set as a nested clip.

Use ClearTranscription to remove a transcription instead.

Refer to Transcription for the requirements on the transcription dict.

Refer to Studio and AI Scripting APIs for prerequisites.

ExportFrame(frameOffset, [{exportFrameOptions}])​

Return Type: {exportFrameResult}

Exports the frame at frameOffset (int, 0-based offset from the item start) as a still image, to a file or as an encoded string, per exportFrameOptions.

Refer to Export Frame Options for information on supported settings and the returned keys.

GetParentFolder()​

Return Type: Folder

Returns the Folder object containing this MediaPoolItem.

GetPhotoAlbum()​

Return Type: PhotoAlbum

Returns the PhotoAlbum object if the MediaPoolItem is a photo album clip, None otherwise.


New in 21.1.0

GetTranscription(useNestedClipTranscription=False)​

Return Type: {transcription}

Returns transcription data for the MediaPoolItem, if available. The optional argument useNestedClipTranscription (Bool) returns the transcription of nested clips instead.

Refer to Transcription for the returned keys.

Refer to Studio and AI Scripting APIs for prerequisites.

SetAudioMapping(audioMapping)​

Return Type: Bool

Sets the audio mapping of the MediaPoolItem from the JSON string audioMapping.

Refer to Audio Mapping for the mapping format.


New in 21.0.4

GetTimeline()​

Return Type: Timeline

Returns the Timeline object if the MediaPoolItem is a timeline clip.


New in 21.0.2

PerformAudioClassification()​

Return Type: Bool

Analyzes and classifies the audio of a MediaPoolItem into categories and subcategories.

Refer to Studio and AI Scripting APIs for prerequisites.

ClearAudioClassification()​

Return Type: Bool

Clears audio classification of the MediaPoolItem.

Refer to Studio and AI Scripting APIs for prerequisites.

RemoveMotionBlur({deblurOption})​

Return Type: MediaPoolItem

Applies motion deblur on the MediaPoolItem. Returns the newly created MediaPoolItem.

Refer to Motion Deblur Settings for information on supported settings.

Refer to Studio and AI Scripting APIs for prerequisites.

AnalyzeForIntellisearch(identifyFaces, isBetterMode)​

Return Type: Bool

Performs Intellisearch analysis on the MediaPoolItem. identifyFaces specifies whether to identify faces; isBetterMode specifies whether to use Better mode. Returns True if required packages are installed and analysis is successful.

Refer to Studio and AI Scripting APIs for prerequisites.

AnalyzeForSlate(markerColor)​

Return Type: Bool

Performs Slate analysis on the MediaPoolItem using the current settings and specified markerColor. Returns True if required packages are installed and analysis is successful.

Adds a "Detected Slate" duration marker in markerColor over the frames of each slate found. The text written on the slate is not read: use GetMarkers() to locate the slate, the marker carries no transcription of its contents.

Refer to Analyze Slate Settings for information on markerColor.

The progress of an active slate analysis can be read with Project.GetAnalyzeForSlateStatus.

Refer to Studio and AI Scripting APIs for prerequisites.


New in 20.2.0

SetName(name)​

Return Type: Bool

Sets the clip's name to name(string). Returns True if successful.


New in 20.0.0

LinkFullResolutionMedia(fullResMediaPath)​

Return Type: Bool

Links proxy media to full resolution media files specified via its path.

ReplaceClipPreserveSubClip(filePath)​

Return Type: Bool

Replaces the underlying asset and metadata of a video or audio clip with the specified absolute clip path, preserving original sub clip extents.

MonitorGrowingFile()​

Return Type: Bool

Monitor a file as long as it keeps growing (stops if the file does not grow for some time).


New in 19.1.0

GetMarkInOut()​

Return Type: {mark}

Returns dict of in/out marks set (keys omitted if not set), example:

{'video': {'in': 0, 'out': 134}, 'audio': {'in': 0, 'out': 134}}

SetMarkInOut(in, out, type="all")​

Return Type: Bool

Sets mark in/out of type video, audio or all (default).

ClearMarkInOut(type="all")​

Return Type: Bool

Clears mark in/out of type video, audio or all (default).


New in 19.0.2

GetThirdPartyMetadata(metadataType=None)​

Return Type: string|dict

Returns the third party metadata value for the key 'metadataType'.

If no argument is specified, a dict of all set third party metadata properties is returned.

SetThirdPartyMetadata(metadataType, metadataValue)​

warning

Deprecated calling convention since 21.1.0. Refer to Deprecated Calling Conventions.

Return Type: Bool

Sets/Add the given third party metadata to metadataValue (string).Returns True if successful.

SetThirdPartyMetadata({metadata})​

Return Type: Bool

Sets/Add the item third party metadata with specified 'metadata' dict. Returns True if successful. pt


New in 19.0.0

GetAudioMapping()​

Return Type: json formatted string

Returns a string with MediaPoolItem's audio mapping information.

Check Audio Mapping section for more information.


AddFlag(color)​

Return Type: Bool

Adds a flag with given color (string).

AddMarker(frameId, color, name, note, duration,customData)​

Return Type: Bool

Creates a new marker at given frameId position and with given marker information. 'customData' is optional and helps to attach user specific data to the marker.

ClearClipColor()​

Return Type: Bool

Clears the item color.

ClearFlags(color)​

Return Type: Bool

Clears the flag of the given color if one exists. An "All" argument is supported and clears all flags.

ClearTranscription(clearNestedClipTranscription=False)​

warning

Change at 21.1.0

Return Type: Bool

Clears audio transcription of the MediaPoolItem. Returns True if successful; False otherwise.

The optional argument clearNestedClipTranscription (Bool) clears the transcription of nested clips instead.

Refer to Studio and AI Scripting APIs for prerequisites.

DeleteMarkerAtFrame(frameNum)​

Return Type: Bool

Delete marker at frame number from the media pool item.

DeleteMarkerByCustomData(customData)​

Return Type: Bool

Delete first matching marker with specified customData.

DeleteMarkersByColor(color)​

Return Type: Bool

Delete all markers of the specified color from the media pool item. "All" as argument deletes all color markers.

GetClipColor()​

Return Type: string

Returns the item color as a string.

GetClipProperty(propertyName=None)​

Return Type: string|dict

Returns the property value for the key 'propertyName'. If no argument is specified, a dict of all clip properties is returned. Check the Project and Clip Properties below for more information.

warning

Passing propertyName is a deprecated calling convention since 21.1.0 — call the method with no argument and read the key from the returned dict.

GetFlagList()​

Return Type: [colors...]

Returns a list of flag colors assigned to the item.

GetMarkerByCustomData(customData)​

Return Type: {markers...}

Returns marker {information} for the first matching marker with specified customData.

GetMarkerCustomData(frameId)​

Return Type: string

Returns customData string for the marker at given frameId position.

GetMarkers()​

Return Type: {markers...}

Returns a dict (frameId -> {information}) of all markers and dicts with their information.

Example of output format:

{96.0: {'color': 'Green', 'duration': 1.0, 'note': '', 'name': 'Marker 1', 'customData': ''}, ...}

In the above example - there is one 'Green' marker at offset 96 (position of the marker)

GetMediaId()​

Return Type: string

Returns the unique ID for the MediaPoolItem.

GetMetadata(metadataType=None)​

Return Type: string|dict

Returns the metadata value for the key 'metadataType'. If no argument is specified, a dict of all set metadata properties is returned.

warning

Passing metadataType is a deprecated calling convention since 21.1.0 — call the method with no argument and read the key from the returned dict.

GetName()​

Return Type: string

Returns the clip name.

GetUniqueId()​

Return Type: string

Returns a unique ID for the media pool item

LinkProxyMedia(proxyMediaFilePath)​

Return Type: Bool

Links proxy media located at path specified by arg 'proxyMediaFilePath' with the current clip. 'proxyMediaFilePath' should be absolute clip path.

ReplaceClip(filePath)​

Return Type: Bool

Replaces the underlying asset and metadata of MediaPoolItem with the specified absolute clip path.

SetClipColor(colorName)​

Return Type: Bool

Sets the item color based on the colorName (string).

SetClipProperty(propertyName, propertyValue)​

Return Type: Bool

Sets the given property to propertyValue (string). Check the Project and Clip Properties below for more information.

SetMetadata({metadata})​

Return Type: Bool

Sets the item metadata with specified 'metadata' dict. Returns True if successful.

SetMetadata(metadataType, metadataValue)​

warning

Deprecated calling convention since 21.1.0. Refer to Deprecated Calling Conventions.

Return Type: Bool

Sets the given metadata to metadataValue (string). Returns True if successful.

TranscribeAudio(useSpeakerDetection=None, transcribeAsNestedClip=False)​

warning

Change at 21.1.0

Return Type: Bool

Transcribes audio of the MediaPoolItem. Returns True if successful; False otherwise

Accepts an optional boolean argument to use speaker detection when transcribing. If no argument is specified, use the project's setting.

The optional argument transcribeAsNestedClip (Bool) transcribes the audio as a nested clip transcription, which GetTranscription returns when useNestedClipTranscription is True.

The progress of an active transcription can be read with Project.GetTranscribeAudioStatus.

Refer to Studio and AI Scripting APIs for prerequisites.

UnlinkProxyMedia()​

Return Type: Bool

Unlinks any proxy media associated with clip.

UpdateMarkerCustomData(frameId, customData)​

Return Type: Bool

Updates customData (string) for the marker at given frameId position. CustomData is not exposed via UI and is useful for scripting developer to attach any user specific data to markers.