☁️Transcoding Files Using Huawei Cloud’s MPC

Ertugrul Basar
Huawei Developers
Published in
6 min readDec 6, 2023
Media Processing Center

🔦Introduction

Hi everyone🙌, in today’s article, we are going to examine Huawei Cloud’s Media Processing Center (MPC) service. According to Huawei Cloud, MPC efficiently transcodes your media files online, at any scale, and at a low cost. MPC utilizes object storage and cloud computing to convert your media into the formats you need for playback on devices such as smartphones, PCs, and TVs. It also provides functions such as frame capture and watermarking to meet your diverse requirements. MPC is built based on Huawei Cloud computing services. There is no need to purchase expensive media processing software and manage it, allowing you to focus on fast delivery and service rollout. MPC can scale up and down with your business needs, reducing costs and avoiding resource waste.

Product Advantages:

1️⃣ Cost-effectiveness

2️⃣ Access from Anywhere

3️⃣ Fast Transcoding

4️⃣ Scalability

Functions:

1️⃣ Media Transcoding

2️⃣ Low Bitrate HD

3️⃣ Video Watermark

4️⃣ Snapshot Capturing

Use Cases:

1️⃣ Video on Demand services

2️⃣ Live Streaming

3️⃣ Social Media

The last thing I want to mention is that Huawei Cloud MPC utilizes advanced algorithms and technologies, such as low-bitrate HD, to minimize the impact on video quality while reducing bitrate. These techniques focus on preserving the most critical visual information in the video while discarding less important details. As a result, MPC can achieve significant reductions in bitrate without compromising the overall viewing experience.

⚡️What is a Video Codec?

A video codec, short for video compression-decompression, is a technology used to compress and decompress digital video files. Video codecs are essential for efficiently storing and transmitting video data while minimizing file size. Compression is necessary because raw, uncompressed video files can be extremely large and impractical for storage and transmission. Video codecs use various algorithms to achieve this compression while aiming to maintain acceptable video quality. H.264 and H.265 are two popular video codecs, each with its own set of components.

🗽H.264 vs H.265

H.264 (AVC) and H.265 (HEVC) are video codecs with key differences. H.265 offers significantly improved compression efficiency over H.264, allowing for similar video quality at lower bit rates, making it particularly advantageous for high-resolution content like 4K and 8K. While H.264 is widely used and supported in various applications, it may struggle with extremely high resolutions without increased bit rates and file sizes. H.265, despite its superior compression, demands more computational power for encoding and decoding, potentially limiting its compatibility with older devices. The choice between them depends on factors such as the specific application, device compatibility, and the balance between video quality, bit rates, and computational resources.

💻Demo

In this demo, we are going to upload an MP4 file that has been processed with H.264 (AVC) to Object Storage Service (OBS). We will then transcode the video to H.265 (HEVC) two times to observe the low-bitrate HD transcoding efficiency, using the Huawei Cloud Media Processing Center (MPC).

Prerequisites for this demo

1️⃣ OBS Bucket

MPC doesn’t store media files, so you need to upload the video file you want to process to an Object Storage Service (OBS) bucket before using MPC. Additionally, MPC requires an output bucket to send the processed file. You can create two buckets, one for input and one for output, or you can create two folders within a single bucket. For this exercise, we will create two separate buckets for input and output. Afterward, we’ll upload the file we want to use in this exercise. Make sure to create the buckets in the same region where you plan to use MPC. If you create a bucket in another region, MPC won’t be able to work with it. You can see the created input bucket and uploaded file in the screenshot below 👇

Input Bucket

2️⃣ MPC-OBS Bucket Authorization

In order to work with OBS without any problems, you need to authorize MPC to access the buckets. You can either select the respective buckets one by one or grant access to all of them. In this exercise, I’ll grant access to all buckets so that in the future, there won’t be a need to change the permissions.

MPC-OBS

Here, we can begin with the MPC Dashboard. If you click on “Getting Started,” a pop-up will provide brief information on the steps we are about to undertake. Following that, we can click on “Media Processing > Transcode.” (Alternatively, you can create custom templates under “Global Settings > Custom Templates,” but for this demonstration, I’ll use system templates that are already created by Huawei Cloud.)

MPC Dashboard

On this page, you can view the tasks you have created previously. The screenshot below displays the tasks I have run before. Now, we can proceed by clicking on “Create Task.”

MPC Transcode Tasks

Next, we need to select the input bucket, source file, output bucket, and output path. I will make the selections as shown in the screenshot below. Following that, we will choose the template we want to use (as mentioned earlier, you can also create your own template under “Global Settings > Custom Templates”). Here, I’ll choose MP4 as the output format, H.265 as the video codec, 1920x1080 as the resolution, and disable low-bitrate HD. After these selections, only one template remains, so I’ll select it. Afterward, we’ll click on OK, and the task will start automatically.

Task Creation — 1

After some time, we can observe the processed output file in our output bucket. As you can see, the processed file size is significantly smaller than the input.

Output Bucket — 1

Next, I will create a similar task, but this time I’ll use a template in which low-bitrate HD is enabled. You can view the configurations in the screenshot below 👇

Task Creation — 2

Now, after the second task is finished as well, we can observe that the output file is even smaller than the one from the previous task. As mentioned earlier, this is one of the features of Huawei Cloud MPC, which reduces file size using advanced algorithms.

Output Bucket — 2

👉Conclusion

In today’s article, we configured two tasks and utilized the capabilities of Huawei Cloud’s MPC. In the first task, we observed a 69% decrease in the processed file size. Subsequently, after enabling low-bitrate HD, the size reduction reached up to 79%! This highlights one of the advantageous features of MPC. You can leverage this service to minimize storage costs and gain various other benefits. This article serves as a basic guideline for your business needs, and you can adapt this practice to your projects as well. Until the next article, goodbye ✋

💁References

--

--