Designing Cloud-Based Multimedia Solutions
In this article, we will see how an Open-Source codec like AV1 is selected as a custom IP for encoding to integrate over the cloud as a service.
Join the DZone community and get the full member experience.Join For Free
Private, public, or hybrid, cloud solutions for any business domain are designed to provide the freedom to grow and security for the organization and customer data. For cloud-based multimedia solutions, there is cloud-based custom transcoder IP that supports automated Video-On-Demand (VOD) pipelines. Cloud services offer solutions that ingest source videos, processes video for playback on a wide range of devices using cloud media converter, and store transcoded media files for on-demand delivery to end-users.
Custom IP integration along with other cloud services showcases better feasibility of using Open-Source codec, to use one’s transcoder instead of cloud media-converter for multimedia solutions. In this blog, we will see how an Open-Source codec like AV1 is selected as a custom IP for encoding to integrate over the cloud as a service.
Thus, the video files uploaded on the cloud can be encoded with AV1 codec, without using a cloud media-converter service. The solution is automated in such a way that the content provider just needs to upload video on cloud input file storage service and the further encoding happens automatically. It stores the content on cloud storage services after completion and the end-user gets notified about content availability.
Local PC can be used to upload input video on target AWS S3 bucket and EC2 instance is used to transcode input video into AV1 codec output. Encoding can be done through FFmpeg as well GStreamer, here FFmpeg is used considering the strong support community and extra features available. EC2 cloud instance can be used on any Linux-based system server. Further, the S3 cloud output file link is integrated into AWS Sumerian, to view it using VR set in 3D scene mode.
To overcome the limitations of cloud media converter, one can have own custom IP i.e. Transcoder solution, which can be used along with other cloud services. It will make faster the encoding or provide the same speed as of cloud media converter with reduced cost per encoding job, as compared to a cloud media converter. It is also easy to integrate any codec and provides a choice of multiple encoders per codec.
Benefits of Using AOMedia Video 1 (AV1) Codec
- It is an Open-Source, royalty-free video coding format for video transmissions over the Internet
- AV1 Quality and Efficiency: Based on measurements with PSNR and VMAF at 720p, AV1 was about 25% more efficient than VP9 (libvpx). Similar conclusions with respect to quality were drawn from a test conducted by Moscow State University researchers, where it was found that VP9 requires 31% and HEVC 22% more bitrate, than AV1 for the same level of quality
- Comparing AV1 against H.264 (x264) and VP9 (libvpx), Facebook showed about 45-50% bitrate savings using AV1 over H.264 and about 40% over VP9, when using a constant quality encoding mode
Incorporated multimedia Solutions as per market trending features like image overlay, timecode burn-in, bitrate control mode, advertise, rotation, motion image overlay, sub-title, cropping, and more. Such features are required to build solutions like end-to-end pipeline orchestration, live and recorded streaming (VOD), transcoding, cloud services, Content Delivery Network (CDN) integration.
In the flow diagram of a Virtual Reality solution, the user uploads the video to the Watch Folder of the bucket in AWS S3. The multipart upload complete event will trigger the lambda function, which starts the EC2 instance. Encoding will then be performed through FFmpeg to encode output with the AV1 codec. If encoding is successful, then only the encoded file will be uploaded to the "output" directory in the AWS S3 bucket. If encoding is failed, then the input media file will be deleted from the "input" directory of AWS S3.
The content provider will receive an email notification for failure or success of encoding job, using AWS SNS service. AWS SNS will trigger further AWS Lambda function and Lambda will stop the AWS EC2 instance. Lambda will also check whether the trigger is for output file upload or not; if yes, then it will send an email notification to the end-user, using AWS SES service, to notify new content’s availability. Further AWS S3 output file link can be integrated into AWS Sumerian, to view it using VR set, in 3D scene mode. Python3 can be used for entire automation scripts.
Thus, using cloud media custom solution services, one can stream videos to end-users at scale, deliver low-latency content, secure videos from unexpected downloads, remove the complexity of building development steps manually, and construct solutions in user’s preferred environments.
Published at DZone with permission of prathamesh ghodke. See the original article here.
Opinions expressed by DZone contributors are their own.