Media tasks are component types that alter a media item in a specific way or that can transition a media item from one status to another.
The following media tasks are supported:
Performs a database check on the media item which contains the fileLocator passed as input.
If a media item is found, the task ends with SUCCESS. For the archived media items, the task also returns the Storage Class
for the archived media items on the output.
fileLocator
: string
- the locator of the media item that we want to check the storage status in S3.The Ensure access class task outputs can be referenced in workflows (for example in a Choice condition) using the $nameOfStep.property
naming convention, where:
nameOfStep
is the name that we give to the Ensure access Task in the Workflow Definitionproperty
is a property of the Ensure access Task outputExample: $.EnsureAccess.fileStorageClass
fileId
- the ID of the media item that it is registered within the Connect DBfileUrl
- the URL of the media item that it is registered within the Connect DBfileStorageClass
- the storage class that the media item is found in. It can be one of the following options:Performs a database check on the media item which contains the fileLocator
passed in the input.
If the media item exists in the database and is not archived, the task execution will end.
If the media item is archived, the task execution will start and proceed to restore the media item. The restore options that are used are configured in the Archive options section on the Storage tab of the organization settings.
This task is built in order to be used when the Check storage status Task fails because the file is archived.
When the Check storage status Task is inputted to a file which is archived, it sends out a failure message. A Choice mechanism can enhance a workflow to run Restore when Check storage status finds an archived file.
fileLocator
: string
- the locator of the media item that we want to restore from S3archiveRestorePeriodDays
: number
- the number of days that we intend to restore the media item is found in the GLACIER statusarchiveDearchiveOption
: DearchivingOption
- the de-archiving option that will be used to restore the media item found in the GLACIER status. It can be one of the following: deepArchiveRestorePeriodDays
: number
- the number of days that we intend to restore the media item, if the media item is found in the DEEP ARCHIVE statusdeepArchiveDearchiveOption
: DearchivingOption
- the de-archiving option that will be used to restore the media item found in the DEEP ARCHIVE statusfileId
- the ID of the restored media itemfileLocatorUrl
- the S3 locator of the restored media itemRestore task outputs can be referenced using the $.nameOfStep.property
naming convention, where:
nameOfStep
- the name that we give to the Restore task in the Workflow Definitionproperty
- a property of the Restore task outputExample: $.Restore.fileId
Analyses the media item received as input, using the fileId
property, in order to collect and store its technical metadata.
The Probe task can run on different media item types, such as media_container
, image,
or metadata
. The media item type is determined based on the fileLocator
and its url
properties, which are stored on the media item that is sent to run in the task.
fileId
: string
- the ID of the media item that we want to probeThe Probe task will run different processes based on the media item type:
MediaInfo
regardless of type AND depending on extension:.mxf
- runs ffprobe
and extractsEssence Properties
.atmos
- runs atmos Probe
ffprobe
(without extracting essences)MediaInfo
(returning width
, height
, and bitDepth
properties) for all image types, except:.tif
, .tiff
, or any other image sequence - runs the same probe as for media_container
.xml
file extensions..xml
content has a DolbyLabsMDF
tag - runs DolbyVision Probe
The Probe task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfProbeStep.property.subproperty1.subpropertyN
Where:
nameOfProbeStep
- the name that we give to the Probe task in the Workflow Definitionproperty
- a property of the Probe task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.Probe.probeProperties.streams.height
probeProperties
- a raw JSON object containing the probe information that is extracted during this stepprobeActivityStatus
- the status of the internal probe process. Not to be confused with the status of the Probe Tasktype
- the media item type that is determined in Connect based on the probing processsize
- the size of the media itemlastModified
- the last update date of the media itemetag
- the eTag of the media itemmediainfoPropertiesRedisKey
- the Redis Key of the MediaInfo
propertiesfileExtension
- the extension of the media itemfileOrigin
- the origin of the media item in Connect, it can either be a:fileImfEssenceType
- the IMF Essence type of the media item, that is determined in Connect, it can either be null
or:fileContainerFormat
- the media container format that the media item is in (ie. mov
)fileHasStreams
- boolean value denoting if the media item has ANY streamsfileHasVideoStreams
- boolean value denoting if the media item has video streamsfileHasAudioStreams
- boolean value denoting if the media item has audio streamsfileHasStreamWithPHDRDescriptor
- boolean value denoting if the media item has streams with PHDRD descriptorsfileHasSubtitleStream
- boolean value denoting if the media item has timed text streamsfileHasMediaInfoTextTrack
- boolean value denoting if the media item has a text track when run through MediaInfo
status
- the status of the probing processfileHasMD5
: boolean
- boolean value denoting if the media item has a md5
hashfileHasSHA1
: boolean
- boolean value denoting if the media item has a sha1
hashimage
type media item"ProbeFile": {"status": "completed","probeProperties": {"width": "1280","height": "720","bitDepth": "8"},"probeActivityStatus": true,"type": "image","size": 23270,"lastModified": "2023-04-10T11:31:07.000Z","etag": "39ea90c9d8aa84c33e619277b19bfda9-1","fileExtension": ".jpg","fileOrigin": "source","fileImfEssenceType": null,"fileHasStreams": false,"fileHasAudioStreams": false,"fileHasStreamWithPHDRDescriptor": false,"fileHasStreamWithPHDRDescriptor": false,"fileHasSubtitleStream": false,"fileHasMediaInfoTextTrack": false,}
media_container
type media item{"status": "completed","probeProperties": {"streams": [{"index": 0,"profile": "Main","width": 320,"height": 240,"level": 13,"refs": 1,"id": "0x1","duration": "13.666667","disposition": {"default": 1,"dub": 0,"original": 0,"comment": 0,"lyrics": 0,"karaoke": 0,"forced": 0,"captions": 0,"descriptions": 0,"metadata": 0,"dependent": 0,"hearingImpaired": 0,"visualImpaired": 0,"cleanEffects": 0,"attachedPic": 0,"timedThumbnails": 0,"stillImage": 0},"tags": {"language": "und","creationTime": "1970-01-01T00:00:00.000000Z","handlerName": "VideoHandler","vendorId": "[0][0][0][0]"},"codecName": "h264","codecLongName": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","codecType": "video","codecTagString": "avc1","codecTag": "0x31637661","codedWidth": 320,"codedHeight": 240,"closedCaptions": 0,"filmGrain": 0,"hasBFrames": 0,"sampleAspectRatio": "1:1","displayAspectRatio": "4:3","pixFmt": "yuv420p","chromaLocation": "left","fieldOrder": "progressive","isAvc": "true","nalLengthSize": "4","rFrameRate": "15/1","avgFrameRate": "15/1","timeBase": "1/15360","startPts": 0,"startTime": "0.000000","durationTs": 209920,"bitRate": "229387","bitsPerRawSample": "8","nbFrames": "205","extradataSize": 37},{"index": 1,"profile": "LC","channels": 6,"id": "0x2","duration": "13.696000","disposition": {"default": 1,"dub": 0,"original": 0,"comment": 0,"lyrics": 0,"karaoke": 0,"forced": 0,"captions": 0,"descriptions": 0,"metadata": 0,"dependent": 0,"hearingImpaired": 0,"visualImpaired": 0,"cleanEffects": 0,"attachedPic": 0,"timedThumbnails": 0,"stillImage": 0},"tags": {"language": "und","creationTime": "1970-01-01T00:00:00.000000Z","handlerName": "SoundHandler","vendorId": "[0][0][0][0]"},"codecName": "aac","codecLongName": "AAC (Advanced Audio Coding)","codecType": "audio","codecTagString": "mp4a","codecTag": "0x6134706d","sampleFmt": "fltp","sampleRate": "48000","channelLayout": "5.1","bitsPerSample": 0,"rFrameRate": "0/0","avgFrameRate": "0/0","timeBase": "1/48000","startPts": 0,"startTime": "0.000000","durationTs": 657408,"bitRate": "382488","nbFrames": "642","extradataSize": 2}],"format": {"filename": "http://localhost:4566/oz-zl-test-files/zypline/test/SampleVideo_360x240_1mb.mp4?AWSAccessKeyId=test&Expires=1680722731&Signature=NQQuVk%2FhcaPlz8aVnJhexCh7PPw%3D","duration": "13.696000","size": "1053651","tags": {"encoder": "Lavf53.24.2","majorBrand": "isom","minorVersion": "512","compatibleBrands": "isomiso2avc1mp41","creationTime": "1970-01-01T00:00:00.000000Z"},"nbStreams": 2,"nbPrograms": 0,"formatName": "mov,mp4,m4a,3gp,3g2,mj2","formatLongName": "QuickTime / MOV","startTime": "0.000000","bitRate": "615450","probeScore": 100}},"probeActivityStatus": true,"type": "media_container","size": 1053651,"lastModified": "2023-04-05T13:25:31.000Z","etag": "59b8487da4236b3d42890fedab86ac64","mediainfoPropertiesRedisKey": "MediaInfo-JSON-d868d6cc-9031-4c74-ac7e-3018f75514ed""fileExtension": ".jpg","fileOrigin": "source","fileImfEssenceType": null,"fileHasStreams": false,"fileHasStreamWithPHDRDescriptor": false,"fileHasSubtitleStream": false,"fileHasMediaInfoTextTrack": false,}
Checks if a video media item is Interlaced or Progressive, regardless of what is specified in the media item’s technical metadata, and overwrites that value with the scan result.
fileId
: string
- the ID of the media item that we want to run the interlace analysis on.While not restricted, it is recommended that the Interlace scan task be run on media items that:
MediaContainer
type and Source
or Deliverable
file origin.file.properties
should have streams (FFProbeStream)..mxf
, it should have a track
on it, that is of the video
typecodec
value for the track must not be jpeg2000
or aces
due to limitations of the ffmpeg
version that is currently used by Connect.fileId
, fetches all the persisted file info from the media item that is identified with the ID.videoTracks
property on the media item is either jpeg2000
or aces
, otherwise, the task will skip.interlaceScan
(file.properties.interlaceScan
) are updated with scanType
and scanOrder
that result from the Interlace scan task.Video
type then the values scanType
and scanOrder
are also updated for the track itself.Interlace scan task outputs can be referenced using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Interlace scan task in the Workflow Definitionproperty
- a property of the Interlace scan task outputExample: $.InterlaceScan.InterlaceScanType
InterlaceScanType
- this value can be:InterlaceScanOrder
- relevant for Interlaced media items, this value can be:Generates md5
and sha
hashes (file signatures) for the media item and stores them in the Connect database.
It will either rehash a media item from scratch or return an existing hash if the hashState
is available in the input.
If fileHasMD5
and fileHasSHA1
are true, the execution will stop since there is no need for a new hash.
fileLocator
: string
- the locator of the file that we want to Hash from S3.hashState?
: any
- optional input, the hashing state of the media item.fileHasMD5
: boolean
- Probe Task output, denoting if the media item has a md5
hash.fileHasSHA1
: boolean
- Probe Task output, denoting if the media item has a sha1
hash.Hash task outputs can be referenced using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Hash task in the Workflow Definitionproperty
- a property of the Hash task outputExample: $.Hash.hashState
md5
: string
- the md5
hash of the media itemsha1
: string
- the sha1
hash of the media itemCalculates the recommended crop area of a video media item (the non-black area) and stores the information at a media item level, without performing a crop action.
mxf
deliverables do not support Crop Detection.
fileId
: string
- the ID of the media item that we want to run the crop detection on.While not restricted, it is recommended that the Crop detection task be run on media items that:
MediaContainer
type and Source
or Deliverable
file origin.file.properties
should have streams (FFProbeStream).cropRectangles
and boundingBox
cropRectangles
and boundingBox
cropRectangles
are calculated every 20 frames (as of today the number of frames can not be set as an input) with the ffmpeg
cropdetect commandcropRectangle
will have a set of values associated with it:timeOffset
- index of the cropRectangle
height
width
xOffset
yOffset
boundingBox
is calculated at the end by taking:cropRectangles
for height
and width
cropRectangles
for xOffset
and yOffset
Crop detection task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Crop detection task in the Workflow Definitionproperty
- a property of the Crop detection task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.CropDetection.boundingBox.height
cropRectangles
- the crop values detected by ffmpeg
every 20 framesboundingBox
- the recommended crop settings, which are also applied on the Workbench
tab of the media item{"cropRectangles": [{"timeOffset": 0,"width": 720,"height": 480,"xOffset": 0,"yOffset": 4},{"timeOffset": 1,"width": 720,"height": 480,"xOffset": 0,"yOffset": 4},{"timeOffset": 2,"width": 720,"height": 480,"xOffset": 0,"yOffset": 4},{"timeOffset": 3,"width": 720,"height": 480,"xOffset": 0,"yOffset": 4},{"timeOffset": 4,"width": 720,"height": 480,"xOffset": 0,"yOffset": 4}],"boundingBox": {"xOffset": 0,"yOffset": 4,"width": 720,"height": 480}}
Detects embedded timed text in the media item and extracts the timed text tracks as separate media items. Uses NodeTT service to perform this action.
fileId
: string
- the ID of the media item that we want to extract timed text from.While not restricted, it is recommended that the Extract timed text task be run on media items that:
subtitle
type ORmediaInfo
property (media.track
) of the Text
typeIf you don't follow the recommendation, the task execution will fail or will behave unexpectedly.
Extract timed text task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfStep.property.subproperty1.subpropertyN
Where:
nameOfProbeStep
- the name that we give to the Probe task in the Workflow Definitionproperty
- a property of the Probe task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.ExtractTT.outputFileLocators[0]
outputFileLocatorUrls
: string[]
- an array of locator URLs of the extracted timed text media itemstimedTextExtractLocationUrl
: string
- the S3 locators where the timed text will be extractedConverts a timed text media item to a specified format. Calculates the frameRate
, editRate
, timeCode
of a video or timed text media item. Uses NodeTT service to perform this action.
fileId
: string
- the ID of the media item that we want to convert timed text from.timedTextExtractLocator
: string
- Extract Timed Text task output, the file locator of the extracted timed text.While not restricted, it is recommended that the Extract timed text task should be run on media items that:
fileHasSubtitleStream
or fileHasMediaInfoTextTrack
as true.The task also depends on the Extract Timed Text Task, because it uses its output file locators to be passed as inputs. In the contrary case, the task execution will fail or will behave unexpectedly.
Probe task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfProbeStep.property.subproperty1.subpropertyN
Where:
nameOfProbeStep
- the name that we give to the Probe task in the Workflow Definitionproperty
- a property of the Probe task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.ConvertTT.outputFileLocatorUrl
nodeTTConvertTimedTextResponse
: ITimedTextConvert
- the timed text convert response of the Node TT
service.outputFileLocator
: string
- the file locator of the resulting converted timed text media item.Inspects a media item and creates/updates the Timed Text Track associated with that media item.
fileId
: string
- the ID of the media item that we want to inspect timed text from.While not restricted, it is recommended that the Extract timed text task be run on media items that:
caption
type ORimf_timed_text_essence
(ImfTimedTextEssence) ORfileHasSubtitleStream
or fileHasMediaInfoTextTrack
as trueIf you don't follow the recommendation, the task execution will fail or will behave unexpectedly.
ChooseFileTypeOrFileImfEssenceType:Type: ChoiceChoices:- Variable: $.EnsureAccess.fileIdOperator: IsPresentValue: falseNext: Failed- Variable: $.ProbeFile.typeOperator: StringEqualsValue: "caption"Next: InspectTimedText- Variable: $.ProbeFile.fileImfEssenceTypeOperator: IsPresentValue: falseNext: Failed- Variable: $.ProbeFile.fileImfEssenceTypeOperator: StringEqualsValue: "imf_timed_text_essence"Next: InspectTimedTextDefault: Failed
When a file does not have tracks on it fileHasTracks = false
, then the Inspect Timed Text task will create a new track entity associated with the media item from the input.
Additionally, it will create a new TimedTextTrack for the newly created track. The link between the two of them is made through the field id. TimedTextTrack.id === the Track.id
Inspect Timed Text task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfProbeStep.property.subproperty1.subpropertyN
Where:
nameOfProbeStep
- the name that we give to the Inspect Timed Text task in the Workflow Definitionproperty
- a property of the Inspect Timed Text Task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.InspectTT.probeProperties.streams.height
fileHasTracks
- indicates if the file from the input has tracks on it. (Video, Audio, Data, TimedText, Dv, Iab)updatedTimedTextTrackId
- the id of the timed text track updated by Inspect Timed Text task with the results of node-tt inspection.Caches media streams (audio, video, image sequence) on certain files that contain such streams, like IMF, MXF, CPL.
fileId
: string
- the ID of the media item that we want to cache.While not restricted, it is recommended that the _Extract timed text _task should be run on media items that:
mediaContainer
type and are marked as source
or deliverable
When using the Generate preview cache
Task as part of your workflows, you can use the boolean fields output by the Probe task like fileHasAudioStreams
, fileHasVideoStreams
to check if the file analyzed by the workflow contains streams that can be cached. This check can speed up the workflow execution for files that don't contain any usable stream.
This task has no output values that can be referenced.
Performs a scan of a media item’s frames, in order to determine if the video was converted from one frame rate to another using 3:2 pulldown
or 4th frame repeat
.
fileId
: string
- the ID of the media item that we want to run the frame scan on.While not restricted, it is recommended that the Frame scan task be run on media items that:
MediaContainer
type and Source
or Deliverable
file originffmpeg
that Connect is using, the media item must not be of the .mxf
typefile.properties
should have streams (FFProbeStream) and at least one stream should have a video-
type codec.Frame scan task outputs can be referenced using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Frame scan task in the Workflow Definitionproperty
- a property of the Frame scan task outputExample: $.FrameScan.scanType
frameScan
- the analysis result of the Frame Scan process, can be one of the following:Extract Dolby Vision Metadata from a media item in a separate .XML
.
fileId
: string
- the ID of the media item that we want to extract Dolby Vision metadata fromExtract Dolby vision metadata Task will run in a Workflow for media items that respect both conditions:
IMF Essence Type = imf_image_essence
PhdrDescriptor
These properties should be used in the Workflow Definition as a condition before running this task.
The user can access these fields by using the Probe Task outputs:
$.ProbeFile.fileHasStreamWithPHDRDescriptor
$.ProbeFile.fileImfEssenceType
The task creates a new media item based on the media item used as input via fileId
. The new media item uses .xml
as an extension and a unique name is generated for it using the uuid v4
algorithm.
The new media item is assigned as a child of the input file.
The task uses the Queue (RRTQ) named dovi-extractor
from the namespace media-warp-dovi-extractor
.
The dovi-extractor
library is used to extract information in the new media item, alongside other information.
Extract Dolby Vision Metadata Task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Extract Dolby Vision Metadata task in the Workflow Definitionproperty
- a property of the Extract Dolby Vision Metadata task outputsubproperty[1-n]
- a subproperty, at the Nth level in the output structureExample: $.ExtractDV.firstFrame
url
: string
- the crop values detected by ffmpeg
every 20 framesmetafierOutput?
: any
- the error output of the metafier --validate
command, if this command throws an errorfirstFrame
: number
- the starting frame numberduration
: number
- the difference between the end frame and the first frame (range.end
- range.start
)Performs quality control checks on files using the Baton
QC provider and generates a PDF report that is registered in Connect.
The analysis is limited to media items that are of the media_container
type and have the source
origin.
Probe output variables should be used in choices in order to validate the media item before running a Baton task.
Video and Audio streams can be used as constraints from the Probe task output.
A YAML definition example for how the Baton Task should be used alongside a Choice component:
CheckFileOrigin:`Type: ChoiceChoices:- Variable: $.Probe.fileOriginOperator: StringEqualsValue: "source"Next: CheckFileTypeDefault: FailedCheckFileType:Type: ChoiceChoices:- Variable: $.Probe.typeOperator: StringEqualsValue: "media_container"Next: CheckVideoStreamDefault: FailedCheckVideoStream:Type: ChoiceChoices:- Variable: $.Probe.fileHasVideoStreamsOperator: BooleanEqualsValue: trueNext: CheckAudioStreamDefault: FailedCheckAudioStream:Type: ChoiceChoices:- Variable: $.Probe.fileHasAudioStreamsOperator: BooleanEqualsValue: trueNext: BatonDefault: Failed
fileId
: string
- the ID of the media item that we want to run Baton QC on.qcProfileId
: string
- the Connect ID of the Baton QC profile, this can be obtained by accessing the Baton QC profile in the user interface.Baton Task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Baton task in the Workflow Definitionproperty
- a property of the Baton task outputExample: $.Baton.errorsNo
reportFileId
: string
- the ID of the Baton report that is generated and registered within the Connect DBreportFileLocatorUrl
: string
- the file locator of the Baton report that is generated and registered within the Connect DBinfo
: string
- a summary of the QC process (for example, File has 1 errors, 0 warnings
)errorsNo
: number
- the number of errors in the reportwarningsNo
: number
- the number of warnings in the reportbatonJobStatus
: BatonJobStatus
- the status of the Baton QC Job, generated by BatonjobId
: sting
- the ID of the Baton QC job, generated by BatonPerforms thumbnail extraction on the media item identified by its fileId
passed as input.
Two thumbnails are generated: a large one and a small one, 256 and 64 px maximum height or width. These values depend on the media item’s aspect ratio.
For video media items, the thumbnail extraction algorithm avoids the extraction of black frames by default, except for videos made entirely of black frames.
The thumbnails are generated in the Artifacts
folder that has been specified in the Storage settings.
For the Ingest Workflow, certain conditions must be considered for the task to run properly:
Probe
on the media item in the workflow beforehand, to access information around duration (where applicable) and aspect ratio. If there is no duration information available at the moment that this Task is running, then a frame will be selected from the first 10 minutes of the video media item.fileId
: string
- the ID of the media item that we want to generate a thumbnail for.Generate Thumbnail task outputs can be referenced in workflows (for example in a Choice condition) using the following naming convention:
$.nameOfStep.property
Where:
nameOfStep
- the name that we give to the Baton task in the Workflow Definitionproperty
- a property of the Baton task outputExample: $.GenerateThumbnail.locators
locators
: FileLocator[]
- an array which contains the file locators of the generated thumbnailsmessage?
: string
- optional, can contain a warning message if the workflow is attempting to generate thumbnails for an invalid media item type (ie. XML
or audio){"locators": [{"type": "S3FileLocator","managedUpload": {},"key": "connect/connect-artifacts/05bf6510-f77a-4cb8-ab7d-4d4eba5dc765/thumbnails/movie_thumb_64.jpg","s3AccessKeyId": "","s3SecretAccessKey": "","s3Endpoint": "","s3ConfigExtraArgs": {},"bucketName": "test-bucket"},{"type": "S3FileLocator","managedUpload": {},"key": "connect/connect-artifacts/05bf6510-f77a-4cb8-ab7d-4d4eba5dc765/thumbnails/movie_thumb_256.jpg","s3AccessKeyId": "","s3SecretAccessKey": "","s3Endpoint": "","s3ConfigExtraArgs": {},"bucketName": "test-bucket"}]}
{"locators": [],"message": "Thumbnails not generated. Invalid media type."}