Got it

Which URL to pass in .withUrl ? for video encryption while video transcoding. | Video Watermark | Video Encryption Fails while transcoding MPC

92 0 0 0 0

 Video Encryption Fails while transcoding MPC | Transcoding Video Encryption Error.

(1) What to place in .withUrl ? for video encryption while video transcoding.

// Set the URL to obtain the key.

Core Code

  1. Create an encryption request.

    The request includes the input file, output file, and encryption parameter settings.
    // Set the paths of the input and output files.ObsObjInfo input = new ObsObjInfo().withBucket("mpc-east-2").withLocation("cn-east-2").withObject("input/hls/index.m3u8");ObsObjInfo output = new ObsObjInfo().withBucket("mpc-east-2").withLocation("cn-east-2").withObject("output");// Create a request.CreateEncryptTaskRequest req = new CreateEncryptTaskRequest()
            .withBody(new CreateEncryptReq().withInput(input).withOutput(output)
                    .withEncryption(new Encryption().withHlsEncrypt(new HlsEncrypt()
                            // Set the encryption algorithm.
                            // Set the URL to obtain the key.
                            // Set the initialization vector.
                            // Set the key.
                            .withKey("xxxxxxxxxxxxxxxxxxxxxx"))));// Send the request to MPC.CreateEncryptTaskResponse rsp = initMpcClient().createEncryptTask(req);// Print the response message.System.out.println("CreateEncryptTaskResponse=" + JsonUtils.toJSON(rsp));

Architecture to Implement as Following: 

MPC Architecture - video transcoding and encrypt

  • x
  • convention:


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.