Creating a Media Workflow
Create a media workflow and configure the required tasks for the workflow in Media Flow.
Setting Up Assets for Input
Before you begin, ensure that:
-
You have created a compartment.
-
You have uploaded the video assets to an OCI bucket in the same OCI region in which you will run the job.
- Open the navigation menu and select Analytics & AI. Under Media Services, select Media Flow.
- On the Media workflows list page, select the compartment to create the workflow in.
- Select Create media workflow.
1. Basic Information
Enter the following information:
- Name: Enter a user-friendly name for the workflow. Avoid entering confidential information.
- Compartment: Verify that the compartment shown is the one that you want to create the workflow in.
- Tags: (Optional) Add one or more tags to the workflow.
If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
2. Input
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.
3. Transcode
After setting up assets for input, you can specify the resolutions for video streaming. Convert a video for ABR streaming or single file output by transcoding the video asset. 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).
If you select Enable transcode, provide the following information:
- Transcode type: Select the setting that you want to transcode the video asset.
- Standard: This default setting provides the standard options.
- Speed optimized: This setting provides you the standard options along with speed optimization options. This setting is a premium feature and has extra costs associated with it.
- Quality optimized: This setting provides you the standard options along with quality optimization options for best output quality. This setting is a premium feature and has other costs associated with it.
- Transcode options: Select the options for the asset based on the type that you selected.
- Package type: Select the package type. The available options are HLS, Dash, MP4, and WebM.
- Segment length: Enter the segment length in seconds for streaming packages.
- Video codec: Select the video codec that you want to use. Based on the package type you have selected, the options change. Currently, the H265 codec is unavailable. For more information, contact Oracle Support. See Getting Help and Contacting Support. Based on the selected media container types, the available codec options are H.264, VP8, and VP9.
- Audio codec: Select the audio codec that you want to use. Based on the package type you have selected, the options change. Based on the selected media container types, the available codec options are AAC, MP3, Opus, and Vorbis.
- Speed optimization: This option is available if you have selected the Speed optimized setting. Select Standard, Fast, or Very Fast from the list.
- Quality optimization: This option is available if you have selected the Quality optimized setting. Select Medium, High, or Very High from the list.
- Two pass encoding: This option is available if you have selected the Quality optimized setting. You can enable or disable this option.
- Ladder: Specify the following settings for the ladder rung:
- Width
- Height
- Resize method
- Bitrate: This option is available when you select Quality Optimized.
You can create many rungs of resolutions for the video. The lower resolutions require less bandwidth to display. To create a new ladder rung, select Add Size. You can remove the rung that you don't need.
- Task output: (Optional) Specify the Task output subfolder. The output from the Transcode task is placed in the specified folder. All the output folders are subfolders from the job output prefix and placed within the Job folder.
4. OCI AI services
The OCI AI Services task includes the Transcribe and Vision sections, which are optional. The OCI AI Services task is a premium feature that 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.
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.
- Transcribe: (Optional) Select Enable transcribe and provide the following information:
- Audio language: Select the audio language used in the video's audio. The available options are English, Portuguese, and Spanish.
- Analyze text: You can turn on this option to analyze the transcription output. This option uses the OCI Language service and includes detection of entities, sentiment, key phrase, and text classification.
- Wait for completion: Turn on this option if you want to wait for completion. Disabling it runs the task in the background.
- Task output subfolder: Specify the task output subfolder. The output from the Transcribe tasks are placed in the specified subfolders within the job output folder.
- Vision: (Optional) Select Enable vision and provide the following information:
- Detection type: Select the detection type. The available options are Object detection and Text detection. If you select Text detection, then select the text detection language. English is the supported language.
- Scene sensitivity: Specify the scene sensitivity from 0 to 100.
- Minimum clip length: Select the minimum clip length in seconds.
- Cleanup images: Turning on this option erases all the images generated for each of the scenes. The output excludes scene images captured during this task.
- Task output subfolder: Specify the task output subfolder. The output from the Vision tasks is placed in the specified subfolders within the job output folder.
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.
5. 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.
If you select Enable thumbnail, provide the following information:
- Image capture options: Specify the options to capture the thumbnail.
- Fixed: This option enables you to capture thumbnail images at fixed timestamps. Specify the timestamp details.
- Interval: This option enables you to select intervals in the video and captures frames at specified intervals. Specify the values in the Starting time, Interval time, and Number of frames fields.
- Percentage: This option enables you to specify thumbnail captures based on the playback percentage of the video. Specify the percentage.
- Image options: Select the format for the image.
- Image sizes: Specify the width, height, and resize method for the image. To specify a different size, select Add item. Image size is generated for each image capture. You can remove thumbnails you don't require.
- Task output: (Optional) Specify the task output subfolder. The output from the Thumbnail task is placed in the specified folders. All the output folders are subfolders from the job output prefix and placed within the Job folder.
6. Output
Select the output location in the bucket list of the Object Storage compartment where you want to store the output rendered from the workflow. You can edit the settings while running a job.
In the Job output prefix field, enter a prefix for the folder or file name.
7. Streaming
Be sure 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.
Select to enable streaming, and then specify the channel for distribution.
8. Review and create
Select Create.
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
createcommand:oci media-services media-workflow create [OPTIONS]Required parameters for the
createcommand:-
--compartment-id, -c [text] -
--display-name [text]
Media workflows are complex JSON objects. You can use the
--from-jsonoption and pass the body of the media workflow in a file.To get all the commands for
media-workflow:oci media-services media-workflow -hTo get help for the
createcommand:oci media-services media-workflow create -hFor a complete list of flags and variable options for CLI commands, see the Command Line Reference.
-
To configure a media workflow, use the
CreateMediaWorkflowoperation.