Creating a Media Workflow
Create a media workflow and configure the required tasks for the workflow in Media Flow.
You can configure the OCI AI Service task only after you create a workflow. For more information on OCI AI Services, see Using the OCI AI Services.
Setting up Assets for Input
Before you begin, ensure that:
-
You have created a compartment.
-
You have uploaded the video assets to a OCI bucket in the same OCI region in which you will run the job.
- Open the navigation menu and click Analytics & AI. Under Media Services, click Media Flow.
- Select the compartment to create the workflow in.
- On the Media Workflows list page, click Create Media Workflow.
- On the Create Media Workflow page, in the Input pane of the Configure Tasks for Media Workflow section, select the bucket from where you want to load the assets. If you opt to select the bucket later, you must specify the bucket at run time.
Transcoding the Video Assets
After setting up assets for input, you can specify the resolutions for video streaming. Convert a video for ABR streaming or single file output using the Transcoding a video asset feature. You can select the preferable resolutions of a video, with a bandwidth suitable for you. Transcoding is an optional step.
The time for transcoding a video depends on the number of rungs in the transcode workflow, resolution of the outputs, and length of the input video. Videos transcoded at outputs lesser than 4K resolutions complete in 1.5x real time (if the video is 30 seconds long, the job might take 90 seconds). Jobs that include 4K resolutions typically complete in 4x real-time (if the video is 30 seconds long, the job might take around two minutes).
The transcode configuration is complete.
Using the OCI AI Services
The OCI AI Services task includes the Transcribe and Vision tasks. These tasks are optional. The OCI AI Services task is a premium feature which uses the OCI Artificial Intelligence (AI) services and has other costs associated with it.
Transcribing a video asset enables you to create a JSON and SRT file of the text from the audio of a video. Transcribe is a premium feature, which uses the OCI Speech service and has other costs associated with it. You must have the OCI Speech and Language Policies applied in your user account to use this task.
Important
To enable this feature, you must already have a workflow.Vision enables you to detect objects and text in the video. Vision is a premium feature, which uses the OCI Vision service, and has other costs associated with it. You must have the OCI policies applied in your user account to use this task.
The AI task outputs are generated in the selected output bucket. The AI Services configuration is complete and now you can add thumbnails for the video.
Creating Thumbnails
Thumbnails are the images representing the frames of the videos.
They help you to have a quick snapshot of the content in the video files. Adding thumbnails is an optional step.
Specifying the Output Bucket
Select the output location in the bucket list of your compartment where you want to store the output rendered from the workflow. You can edit the settings while running a job.
- In the Create Media Workflow page, under Configure Tasks for Media Workflow section, click the Output pane.
- Select the output bucket in the Object Storage compartment where you want to store the transcoded video.
- In the Job output prefix field, enter a prefix for the folder or file name.
Specifying a Distribution Channel for Streaming
Ensure to set up a distribution channel before defining the workflow.
Streaming is a built-in integration with Media Streams. The metadata is picked up from the content and moved to the final location for streaming of the video files.
- In the Create Media Workflow page, under Configure Tasks for Media Workflow section, click the Streaming pane.
- Specify the channel for distribution.
The media workflow is ready. Click Save. In the Media Workflow name dialog box, enter a name for the Media Flow and click Save.
The workflow is created. If you want to run a job for this media workflow, select Run Job. The JSON output is generated with the job and is stored in the Object Storage bucket. On the Job Output page, you can find a link to the file.
-
To create a media workflow, run the
create
command:oci media-services media-workflow create [OPTIONS]
Required parameters for the
create
command:--compartment-id, -c [text]
--display-name [text]
Media workflows are complex JSON objects. You can use the
--from-json
option and pass the body of the media workflow in a file.To get all the commands for
media-workflow
:oci media-services media-workflow -h
To get help for the
create
command:oci media-services media-workflow create -h
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
To configure a media workflow, use the
CreateMediaWorkflow
operation.