Demystifying VOD: Unraveling the technical aspects of an OTT solution with OCI

March 4, 2024 | 6 minute read
Santosh Kumar
Senior Cloud Engineer
Text Size 100%:

In this blog post, we try to solve the complexities of over-the-top (OTT) content delivery by navigating through the technical details of video-on-demand (VOD) OTT solutions. This solution uses core Oracle Cloud Infrastructure (OCI) features, such as OCI Media Services (Media Flow and Media Streams), and various OCI services. The solution ensures that the integration, setup, and maintenance of the OTT solution are simplified because the comprehensive use of Oracle services, minimizing reliance on third-party solutions.

The solution encompasses an end-to-end setup enabling content creators to seamlessly deliver content to end-users. The setup includes an admin app for content management, a hybrid app for content delivery, and a meta service, a backend setup built using an OCI software developer kit (SDK) and Java.

Project design overview

The following diagram shows the planned design for the solution setup:

Solution diagram for the VOD OTT deployment.

Set up the following tasks for this solution:

Create a media workflow

In the media processing and analysis phase, two core OCI Media services—Media Flow workflow and Media Streams configuration—must be configured with input and output buckets under OCI Object Storage. The Media Flow workflow and Media Streams provide a flexible and intuitive interface for creating and managing complex media workflows. You can easily design custom workflows to automate tasks, such as transcoding, transcribing, packaging and distribution. A workflow ID is generated to use during prebuilt function creation.

Upload and transcode the content

Upload the file to the input bucket. When the upload is done, trigger a job under Media Flow by selecting the file from the input bucket. After OCI Media Flow processes the content, it dumps the resulting files, such as fragmented mp4, audio files, and thumbnails, into an OCI Object Storage bucket.

The OCI AI Vision service is embedded, so you can identify sensitive content or get a transcription automatically.

Packaging and video playback

You can then push the optionally encrypted content to the Content Delivery Network (CDN). Oracle supports Akamai CDN and OCI Edge. With Akamai, you must enter your account details. With OCI Edge, they’re automatically configured.

Finally, the media file can be streamed in HLS format, using a generated URL from media streams playlist assets.

You can automate this entire process for content creators to seamlessly deliver their content to end-users by following the detailed architecture outlined in the next section.

Media management reference architecture

Reference architecture diagram for media management solution.

Attach OCI Functions and Events

Under the Prebuilt Functions section, select Media Workflow Job Spawner and configure the required details, along with the media workflow ID created in the previous section. Under the Events section, configure the rule so that when an object is created in a bucket, it triggers the prebuilt function of Media Flow.

Create a meta service using OCI SDK and Java

The meta service is Java-based, utilizing the Spring Boot framework. It employs OCI Autonomous Database for the storage of relevant media data.

Internally, the backend service connects and collaborates with OCI services, facilitated by the OCI SDK. Using the capabilities of OCI SDK, the service supports creating and managing various resources, such as buckets, compartments, media flows, media services, and content delivery networks (CDNs). Multiple APIs are exposed and deployed to serve the app, web, and an admin UI. The service can process requests for media content upload and management, which subsequently triggers playlist ingestion. The service also supports creation of HTTP live streaming (HLS) playlists and generation of stream URL, which enables playback of the uploaded content on a portable device.

Create an admin app for content management

For the admin app setup, we use Oracle JET to provide the content creator the flexibility to manage his content. You can use any framework of your choice. The admin app supports content upload with a multipart upload, enabled using OCI services followed by meta data management for the content.

During the upload initiation, an open platform communication (OPC) request ID is utilized to monitor all parts of the upload process, and an entry is recorded in the MongoDB instance using Oracle Autonomous Database. Upon the successful completion of uploading all parts, a unique ID (UUID) generated during the upload initiation is linked to the content, enabling the tracking of all content and metadata-related activities throughout the application phase.

The event then triggers the prebuilt media flow function, which triggers the media flow job for transcoding phase. The job's status is also monitored and stored in the database. When the process completes, the details of the uploaded file become visible on the metadata update screen within the admin app.

Content upload options in the admin app.

The metadata screen provides content creator with the required metadata form, and when the user enters metadata, the admin app triggers an API request to meta service using the UUID that was captured during upload and captures all the meta info related to the content. Similarly, using the meta update screen the posters required for the content can be uploaded on the same screen and are mapped using the UUID. The meta service provides a provision for various posters to be captured, which is stored on the bucket.

The metadata update screen where you can upload  metadata.

 

Create an end user app for playback

In the current setup, ionic framework provides cross-platform support for desktop, iOS, and Android. The app features an home screen, displaying various media content images. When an image is selected, it loads a player screen integrated with hls.js for streaming HLS content.

When playback starts, the meta service employs OCI Media Stream to generate either encrypted or non-encrypted content, depending on the specific requirements. The player then utilizes this master stream URL, which supports streams based on resolution and network bandwidth, to load and play the content.

Example end-user app.            Example end-user app.

 

When you select an image on the first screen, the app redirects to the playback screen to stream the content that uses hls.js at the background for playback.

Conclusion

The described configuration is highly suitable for customers planning to establish a new OTT app or migrate their existing one with VOD content. Oracle manages the entire process from content upload to delivery through OCI, offering enhanced security and ease of management. This approach eliminates the need for third-party vendors in content storage and delivery, which is critical for securing VOD content. OCI also offers features such as disaster recovery, load balancing, and CDN, reducing the setup and management efforts required for the project. 

This configuration is applicable to a wide range of industries with a demand for video integration, extending beyond the entertainment sector. It can be effectively employed in the following industries:

  • Education: Ideal for platforms like LinkedIn Learning and Udemy.
  • Corporate: Facilitates the storage and streaming of training materials and critical corporate updates.
  • Sports: Supports the streaming and sharing of exclusive sports content.
  • Government: Useful for government entities to store essential announcements and educational VOD content.

The subsequent stages of setting up the OTT application encompass client-level ad insertion with OCI Media Flow and ad management at the admin app level. Additionally, OCI Vision services can include more metadata for video content analysis. Furthermore, during OTT streaming, subtitle files generated by OCI Speech and Language service are employed.

To learn more on this setup, feel free to consult North America Cloud Infrastructure team, Javid Muhammed, Santosh Kumar, and Sriharsha Donthi.

For more information, see the following resources:

 

Santosh Kumar

Senior Cloud Engineer

Santosh is currently working as a Senior Cloud Engineer for NACI and is core JS/Web Developer, has expertise in developing end-to-end solutions for VOD ott, Broadcast Industry, Healthcare Systems;etc. 
Loves to play around with latest web techs, explore and understand their architecture.


Previous Post

Announcing new features and implementation playbook for OCI Secure Desktops

Next Post


First Principles: Exploring the depths of OCI Generative AI Service

Egor Pushkin | 14 min read