Help Center/ Media Processing Center/ Best Practices/ H.264 and H.265 Low-bitrate HD Creates an Amazing Experience for Video Websites
Updated on 2023-12-19 GMT+08:00

H.264 and H.265 Low-bitrate HD Creates an Amazing Experience for Video Websites

Scenarios

Online video websites need to provide a good watching experience regardless of terminal types and bandwidth conditions. This is where MPC can come into play. Our codec algorithm optimizes the original video quality and reduces the video bitrate usage to ensure the video definition at a smaller video size. MPC lowers your storage and bandwidth costs, and improves metric performance such as video frame freezing, latency, and failure rate to enhance user experience.

When creating a transcoding task, you can enable the low-bitrate HD feature of MPC as needed. See the following for more details.

How It Works

Figure 1 Working principle

Configuration Method 1

  1. Log in to the MPC console.
  2. In the navigation pane, choose Media Processing > Transcode.
  3. Click Create task. The task creation page is displayed.
  4. Configure the Low Bitrate HD parameter of a transcoding template. Select Enabled from the drop-down list box, and then select the low-bitrate HD template, as shown in the following figure.

    Notes:

Configuration Method 2

For the SDK that accesses the MPC, set PVC in the request parameter Common to true in the request body for creating a transcoding task, that is, withPvc(true).

Sample core code:

    // Set the paths of the input and output videos.
    ObsObjInfo input = new ObsObjInfo().withBucket("mpc-east-2").withLocation("cn-east-2").withObject("ok.mp4");
    ObsObjInfo output = new ObsObjInfo().withBucket("mpc-east-2").withLocation("cn-east-2").withObject("output");

    AvParameters avParameters = new AvParameters();
    avParameters.setCommon(new Common().withPvc(true));
    ArrayList<AvParameters> avParametersArrayList = new ArrayList<>();
    avParametersArrayList.add(avParameters);

    CreateTranscodingTaskRequest request
        = new CreateTranscodingTaskRequest().withBody(new CreateTranscodingReq()
        .withInput(input)
        .withOutput(output)
        .withAvParameters(avParametersArrayList)
    );
    CreateTranscodingTaskResponse response = getMpcClient().createTranscodingTask(request);
    System.out.println("CreateTranscodingTaskResponse=" + response);