华为云用户手册

  • 查询单个转码任务 1 2 3 4 5 //按单个TaskId查询任务,TaskId是转码请求响应中返回的任务ID ListTranscodingTaskRequest req = new ListTranscodingTaskRequest().withTaskId(Collections.singletonList(3273178L)); //发送请求 ListTranscodingTaskResponse listTranscodingTaskResponse = initMpcClient().listTranscodingTask(req); System.out.println(JsonUtils.toJSON(listTranscodingTaskResponse));
  • 代码示例 调用前请根据实际情况替换如下变量:"SDK_AK"、"SDK_SK"、{your endpoint string}以及{your project id}。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/httphandler" mpc "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mpc/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mpc/v1/model" "net/http" ) func RequestHandler(request http.Request) { fmt.Println(request) } func ResponseHandler(response http.Response) { fmt.Println(response) } ak := os.Getenv("SDK_AK") sk := os.Getenv("SDK_SK") projectId := os.Getenv("{your project id}") func main() { client := mpc.NewMpcClient( mpc.MpcClientBuilder(). WithEndpoint("{your endpoint}"). WithCredential( basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build()). WithHttpConfig(config.DefaultHttpConfig(). WithIgnoreSSLVerification(true). WithHttpHandler(httphandler. NewHttpHandler(). AddRequestHandler(RequestHandler). AddResponseHandler(ResponseHandler))). Build()) request := &model.ListTranscodingTaskRequest{ TaskId:&[]int64{1900293}, } response, err := client.ListTranscodingTask(request) if err == nil { fmt.Println("%+v\n",response) } else { fmt.Println(err) } }
  • 安装SDK 媒体转码Go SDK支持go 1.14及以上版本。执行go version检查当前Go的版本信息。 使用go get安装Go SDK,执行如下命令安装Go SDK库以及相关依赖库,具体的SDK版本号请参见SDK开发中心。 1 2 3 4 # 安装Go库 go get github.com/huaweicloud/huaweicloud-sdk-go-v3 # 安装依赖 go get github.com/json-iterator/go
  • 开始使用 导入依赖模块。 1 2 3 4 5 6 7 8 9 import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/httphandler" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mpc/v1" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/mpc/v1/model" "net/http" ) 配置客户端属性。 默认配置 1 2 # Use default configuration httpConfig := config.DefaultHttpConfig() 代理配置(可选)。 1 2 3 4 5 6 7 8 9 username := os.Getenv("USER_NAME") password := os.Getenv("USER_PASSWARD") // 根据需要配置网络代理 httpConfig.WithProxy(config.NewProxy(). WithSchema("http"). WithHost("proxy.huaweicloud.com"). WithPort(80). WithUsername(username). WithPassword(password)) SSL配置(可选) 1 2 // 根据需要配置是否跳过SSL证书校验 httpConfig.WithIgnoreSSLVerification(true); 初始化认证信息。 支持两种方式认证,您可以根据实际情况进行选择。 使用永久AK/SK 首先需要获取永久AK和SK,以及projectId,您可以参考开发前准备获取。 1 2 3 4 5 6 7 8 ak := os.Getenv("SDK_AK") sk := os.Getenv("SDK_SK") projectId := os.Getenv("PROJECT_ID") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() 使用临时AK/SK 首先需要获得临时AK、SK和SecurityToken,您可以通过token获取或者通过委托授权获取。 1 2 3 4 5 6 7 8 9 10 ak := os.Getenv("SDK_AK") sk := os.Getenv("SDK_SK") projectId := os.Getenv("PROJECT_ID") securityToken := os.Getenv("SECURITY_TOKEN") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). WithSecurityToken(securityToken). Build() 相关参数说明如下所示: ak:账号Access Key。 sk:账号Secret Access Key 。 projectId:云服务所在项目ID ,根据你想操作的项目所属区域选择对应的项目ID。 securityToken:采用临时AK/SK认证场景下的安全票据。 初始化客户端。 1 2 3 4 5 6 7 8 # 初始化MPC的客户端 client := mpc.NewMpcClient ( mpcMpcClientBuilder(). WithEndpoint(endpoint). // endpoint值如 "https://mpc.region01.myhuaweicloud.com" WithCredential(auth). WithHttpConfig(config.DefaultHttpConfig()). Build()) endpoint:MPC应用区域和各服务的终端节点,具体请参见地区和终端节点。 发送请求并查看响应。 1 2 3 4 5 6 7 8 9 10 // 初始化请求,以调用接口查询转码模板为例 request := &model.ListTranscodingTaskRequest{ TaskId:&[]int64{1900293}, } response, err := client.ListTranscodingTask(request) if err == nil { fmt.Printf("%+v\n",response) } else { fmt.Println(err) } 异常处理。 表1 异常处理 一级分类 一级分类说明 ServiceResponseError service response error url.Error connect endpoint error 1 2 3 4 5 6 7 # 异常处理 response, err := client.ListTranscodingTask(request) if err == nil { fmt.Println(response) } else { fmt.Println(err) } 原始Http侦听器。 在某些场景下可能对业务发出的Http请求进行Debug,需要看到原始的Http请求和返回信息,SDK提供侦听器功能来获取原始的为加密的Http请求和返回信息。 原始信息打印仅在debug阶段使用,请不要在生产系统中将原始的Http头和Body信息打印到日志,这些信息并未加密且其中包含敏感数据;当Body体为二进制内容,即Content-Type标识为二进制时 body为"***",详细内容不输出。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 func RequestHandler(request http.Request) { fmt.Println(request) } func ResponseHandler(response http.Response) { fmt.Println(response) } ak := os.Getenv("SDK_AK") sk := os.Getenv("SDK_SK") projectId := os.Getenv("{your project id}") client := mpc.NewMpcClient( mpc.MpcClientBuilder(). WithEndpoint("{your endpoint}"). WithCredential( basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build()). WithHttpConfig(config.DefaultHttpConfig(). WithIgnoreSSLVerification(true). WithHttpHandler(httphandler. NewHttpHandler(). AddRequestHandler(RequestHandler). AddResponseHandler(ResponseHandler))).Build())
  • 核心代码 设置水印模板的参数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 //创建水印模板请求 CreateWatermarkTemplateRequest req = new CreateWatermarkTemplateRequest() .withBody(new WatermarkTemplate() //设置模板名称 .withTemplateName("watermark_name") //设置模板类型 .withType("Image") //设置图片水印处理方式 .withImageProcess("Grayed") //水印宽度 .withWidth("1920") //水印高度 .withHeight("1080") //水印相对视频顶点水平偏移位置 .withDx("10") //水印相对视频顶点垂直偏移位置 .withDy("10") //水印的位置 //.withReferpos("BottomLeft") //水印开始时间,与timeline_duration配合使用 .withTimelineStart("6") //水印持续时间,默认值“ToEND”,表示持续到视频结束 .withTimelineDuration("8")); 发送新建水印模板请求,并显示返回消息。 1 2 3 4 // 发送新建水印模板请求给 媒体处理 服务 CreateWatermarkTemplateResponse rsp = initMpcClient().createWatermarkTemplate(req); // 打印返回消息 System.out.println("CreateWatermarkTemplateResponse=" + JsonUtils.toJSON(rsp));
  • 核心代码 创建动图任务。 动图任务需要设置输入视频文件、输出动图路径、动图帧率、动图宽高等参数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 //设置输入视频地址和输出路径 ObsObjInfo input = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("ok.mp4"); ObsObjInfo output = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("output"); //创建动图请求 CreateAnimatedGraphicsTaskRequest req = new CreateAnimatedGraphicsTaskRequest() .withBody(new CreateAnimatedGraphicsTaskReq().withInput(input).withOutput(output) .withOutputParam(new AnimatedGraphicsOutputParam() //设置动图格式 .withFormat(AnimatedGraphicsOutputParam.FormatEnum.GIF) //设置动图帧率 .withFrameRate(15) //设置起始时间,单位毫秒 .withStart(0) //设置结束时间,单位毫秒,最大时间间隔60s .withEnd(3_000))); // 发起请求 CreateAnimatedGraphicsTaskResponse rsp = initMpcClient().createAnimatedGraphicsTask(req); // 打印结果 System.out.println("CreateAnimatedGraphicsTaskResponse=" + JsonUtils.toJSON(rsp));
  • 分页查询 1 2 3 4 5 6 // 分页查询 ListEncryptTaskRequest req = new ListEncryptTaskRequest().withPage(1).withSize(4); // 向MPC发送查询独立加密任务的请求 ListEncryptTaskResponse rsp = initMpcClient().listEncryptTask(req); // 打印返回消息 System.out.println(rsp.toString());
  • 根据任务ID查询 1 2 3 4 5 6 //根据任务ID查询,最多支持10个任务ID ListEncryptTaskRequest req = new ListEncryptTaskRequest().withTaskId(Collections.singletonList("3223179")); // 向MPC发送查询独立加密任务的请求 ListEncryptTaskResponse rsp = initMpcClient().listEncryptTask(req); // 打印返回消息 System.out.println(rsp.toString());
  • 根据任务状态查询 1 2 3 4 5 6 // 根据任务的状态查询 ListEncryptTaskRequest req = new ListEncryptTaskRequest().withStatus(ListEncryptTaskRequest.StatusEnum.FAILED); // 向MPC发送查询独立加密任务的请求 ListEncryptTaskResponse rsp = initMpcClient().listEncryptTask(req); // 打印返回消息 System.out.println(rsp.toString());
  • 根据时间段查询 1 2 3 4 5 6 // 根据时间段查询 ListEncryptTaskRequest req = new ListEncryptTaskRequest().withStartTime("20201220131400").withEndTime("20201221131400"); // 向MPC发送查询独立加密任务的请求 ListEncryptTaskResponse rsp = initMpcClient().listEncryptTask(req); // 打印返回消息 System.out.println(rsp.toString());
  • 复合查询 1 2 3 4 5 6 7 8 // 复合查询 ListEncryptTaskRequest req = new ListEncryptTaskRequest().withPage(1).withSize(4) .withStartTime("20201220131400").withEndTime("20201221131400") .withStatus(ListEncryptTaskRequest.StatusEnum.FAILED); // 向MPC发送查询独立加密任务的请求 ListEncryptTaskResponse rsp = initMpcClient().listEncryptTask(req); // 打印返回消息 System.out.println(rsp.toString());
  • 核心代码 1 2 3 4 5 // 设置需要取消的任务id DeleteExtractTaskRequest req = new DeleteExtractTaskRequest().withTaskId("3223182"); //发送消息到转码服务 DeleteExtractTaskResponse rsp = initMpcClient().deleteExtractTask(req); System.out.println("rsp=" + rsp.toString());
  • 核心代码 设置转码模板的参数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 //创建转码模板请求 CreateTransTemplateRequest req = new CreateTransTemplateRequest() .withBody(new TransTemplate().withTemplateName("test_123") //设置视频参数 .withVideo(new Video() // 视频编码格式,1表示H264,2表示H265 .withCodec(1) // 设置视频码率,单位:kbit/s .withBitrate(6000) // 编码档次,建议设为3 .withProfile(3) .withLevel(15) // 编码质量, 值越大质量越高,耗时越长 .withPreset(3) .withRefFramesCount(4) .withMaxIframesInterval(5) .withBframesCount(4) .withHeight(1080) .withWidth(1920)) //设置音频参数 .withAudio(new Audio() //设置音频编码格式,1:AAC,2:HEAAC1,3:HEAAC2,4:MP3 .withCodec(1) //采样率,1:AUDIO_SAMPLE_AUTO,2:22050Hz,3:32000Hz,4:44100Hz,5:48000Hz,6:96000Hz .withSampleRate(4) //音频码率,单位:kbit/s .withBitrate(128) //声道数 .withChannels(2)) //设置公共参数 .withCommon(new Common() .withDashInterval(5) .withHlsInterval(5) //高清低码开关 .withPvc(false) //封装类型,1:HLS,2:DASH,3:HLS+DASH,4:MP4,5:MP3,6:ADTS .withPackType(1))); 发送新建转码模板请求,并显示返回消息。 1 2 3 4 //发送创建转码模板请求 CreateTransTemplateResponse rsp = initMpcClient().createTransTemplate(req); //打印返回消息 System.out.println("CreateTransTemplateResponse=" + JsonUtils.toJSON(rsp));
  • 分页查询 1 2 3 4 5 6 // 分页查询 ListRemuxTaskRequest req = new ListRemuxTaskRequest().withPage(0).withSize(10); // 发送查询请求给媒体处理服务 ListRemuxTaskResponse rsp = initMpcClient().listRemuxTask(req); // 打印返回消息 System.out.println("rsp=" + rsp.toString());
  • 根据时间段查询 1 2 3 4 5 6 // 根据时间段查询 ListRemuxTaskRequest req = new ListRemuxTaskRequest().withStartTime("20201220131400").withEndTime("20201221131400"); // 发送查询请求给媒体处理服务 ListRemuxTaskResponse rsp = initMpcClient().listRemuxTask(req); // 打印返回消息 System.out.println("rsp=" + rsp.toString());
  • 根据任务ID查询 1 2 3 4 5 6 //查询转封装任务 ListRemuxTaskRequest req = new ListRemuxTaskRequest().withTaskId(Collections.singletonList("8191203")); // 发送查询请求给媒体处理服务 ListRemuxTaskResponse rsp = initMpcClient().listRemuxTask(req); // 打印返回消息 System.out.println("rsp=" + rsp.toString());
  • 根据任务状态查询 1 2 3 4 5 6 // 根据任务的状态查询 ListRemuxTaskRequest req = new ListRemuxTaskRequest().withStatus(ListRemuxTaskRequest.StatusEnum.FAILED); // 发送查询请求给媒体处理服务 ListRemuxTaskResponse rsp = initMpcClient().listRemuxTask(req); // 打印返回消息 System.out.println("rsp=" + rsp.toString());
  • 复合查询 1 2 3 4 5 6 7 8 // 复合查询 ListRemuxTaskRequest req = new ListRemuxTaskRequest().withPage(0).withSize(10) .withStartTime("20201220131400").withEndTime("20201221131400") .withStatus(ListRemuxTaskRequest.StatusEnum.FAILED); // 发送查询请求给媒体处理服务 ListExtractTaskResponse rsp = initMpcClient().listExtractTask(req); // 打印返回消息 System.out.println("rsp=" + rsp.toString());
  • 核心代码 创建截图任务请求。 新建截图任务请求包括输入文件、输出文件的路径。具体参数请参考新建截图任务接口。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 //设置截图输入视频地址 ObsObjInfo input = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("ok.mp4"); //设置截图输出路径 ObsObjInfo output = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("output"); //创建截图请求 CreateThumbnailsTaskRequest req = new CreateThumbnailsTaskRequest() .withBody(new CreateThumbReq().withInput(input).withOutput(output) //设置截图类型,此处理按时间点截图 .withThumbnailPara(new ThumbnailPara().withType(ThumbnailPara.TypeEnum.DOTS) //设置截图输出文件名称 .withOutputFilename("photo") //设置截图的时间点 .withDots(Collections.singletonList(2)) //设置截图的宽 .withWidth(480) //设置截图的高 .withHeight(360))); 说明:生成的截图文件按截图时间戳命名,从首帧开始截取,中间按时间间隔截取,最后末帧截取一张。如视频文件20s,截图间隔为11s,则生成的截图文件为0.jpg,11.jpg,20.jpg。 发送创建截图任务请求并显示返回消息。 1 2 CreateThumbnailsTaskResponse rsp = initMpcClient().createThumbnailsTask(req); System.out.println("CreateThumbnailsTaskResponse=" + JsonUtils.toJSON(rsp));
  • 核心代码 设置水印模板的参数。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 //创建更新水印模板请求 UpdateWatermarkTemplateRequest req = new UpdateWatermarkTemplateRequest() .withBody(new WatermarkTemplate() //设置模板名称 .withTemplateName("watermark_name") //设置模板类型 .withType("Image") //设置图片水印处理方式 .withImageProcess("Grayed") //水印宽度 .withWidth("1920") //水印高度 .withHeight("1080") //水印相对视频顶点水平偏移位置 .withDx("10") //水印相对视频顶点垂直偏移位置 .withDy("10") //水印的位置 //.withReferpos("BottomLeft") //水印开始时间,与timeline_duration配合使用 .withTimelineStart("0") //水印持续时间,默认值“ToEND”,表示持续到视频结束 .withTimelineDuration("ToEND")); 发送更新水印模板请求,并显示返回消息。 1 2 3 4 // 发送修改水印配置请求给媒体处理服务 UpdateWatermarkTemplateResponse rsp = initMpcClient().updateWatermarkTemplate(req); // 打印返回消息 System.out.println("UpdateWatermarkTemplateResponse=" + JsonUtils.toJSON(rsp));
  • 核心代码 1 2 3 4 5 // 设置需要取消的任务ID CancelRemuxTaskRequest req = new CancelRemuxTaskRequest().withTaskId("8191203"); // 发送消息到转码服务 CancelRemuxTaskResponse rsp = initMpcClient().cancelRemuxTask(req); System.out.println("rsp=" + rsp.toString());
  • 核心代码 1 2 3 4 5 6 //设置查询转码模板参数,可以查询多个,最多10个 ListTemplateRequest req = new ListTemplateRequest().withTemplateId(Collections.singletonList(346090)); //发送查询转码模板请求 ListTemplateResponse rsp = initMpcClient().listTemplate(req); //返回查询转码模板结果 System.out.println("httpCode=" + rsp.getHttpStatusCode() + " rsp=" + JsonUtils.toJSON(rsp));
  • 安装SDK 媒体转码服务端SDK支持python 3及以上版本。执行“ python --version”检查当前python的版本信息。 使用服务端SDK前,您需要安装“huaweicloudsdkcore ”和“huaweicloudsdkmpc”,具体的SDK版本号请参见SDK开发中心。 使用pip安装 执行如下命令安装Python SDK核心库以及相关服务库: 1 2 3 4 # 安装核心库 pip install huaweicloudsdkcore # 安装MPC服务库 pip install huaweicloudsdkmpc 使用源码安装 执行如下命令安装Python SDK核心库以及相关服务库: 1 2 3 4 5 6 7 # 安装核心库 cd huaweicloudsdkcore-${version} python setup.py install # 安装MPC服务库 cd huaweicloudsdkmpc-${version} python setup.py install
  • 代码示例 调用前请根据实际情况替换如下变量:"SDK_AK"、"SDK_SK"、{your endpoint string} 以及 {your project id}。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 # coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkcore.http.http_config import HttpConfig from huaweicloudsdkmpc.v1 import * def list_transcoding_task(client): try: request = ListTranscodingTaskRequest(task_id = [1900293]) response = client.list_transcoding_task(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) if __name__ == "__main__": ak = os.environ["SDK_AK"] sk = os.environ["SDK_SK"] project_id = os.environ["{your project id}"] endpoint = "{your endpoint}" config = HttpConfig.get_default_config() config.ignore_ssl_verification = True credentials = BasicCredentials(ak, sk, project_id) mpc_client = MpcClient.new_builder(MpcClient) \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ .build() list_transcoding_task(mpc_client)
  • 核心代码 创建视频解析任务。 视频解析任务需要设置输入视频文件参数,如果有必要,还可以将元数据生成文件存放在指定的路径下。 1 2 3 4 5 6 7 8 9 10 //设置解析输入视频地址和输出路径 ObsObjInfo input = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("ok.mp4"); ObsObjInfo output = new ObsObjInfo().withBucket("mpc-east-2").withLocation("region01").withObject("output"); //创建解析请求 CreateExtractTaskRequest req = new CreateExtractTaskRequest() .withBody(new CreateExtractTaskReq().withInput(input)); // 发起请求 CreateExtractTaskResponse rsp = initMpcClient().createExtractTask(req); // 打印结果 System.out.println("CreateExtractTaskResponse=" + JsonUtils.toJSON(rsp));
  • 复合查询 1 2 3 4 5 6 7 8 // 复合查询 ListAnimatedGraphicsTaskRequest req = new ListAnimatedGraphicsTaskRequest().withPage(0).withSize(10) .withStartTime("20201220131400").withEndTime("20201221131400") .withStatus(ListAnimatedGraphicsTaskRequest.StatusEnum.FAILED); // 发送查询动图任务请求给媒体处理服务 ListAnimatedGraphicsTaskResponse rsp = initMpcClient().listAnimatedGraphicsTask(req); // 打印返回消息 System.out.println("rsp=" + JsonUtils.toJSON(rsp));
  • 根据任务状态查询 1 2 3 4 5 6 // 根据任务的状态查询 ListAnimatedGraphicsTaskRequest req = new ListAnimatedGraphicsTaskRequest().withStatus(ListAnimatedGraphicsTaskRequest.StatusEnum.FAILED); // 发送查询动图任务请求给媒体处理服务 ListAnimatedGraphicsTaskResponse rsp = initMpcClient().listAnimatedGraphicsTask(req); // 打印返回消息 System.out.println("rsp=" + JsonUtils.toJSON(rsp));
  • 根据任务ID查询 1 2 3 4 5 6 //根据任务ID查询,最多支持10个任务ID ListAnimatedGraphicsTaskRequest req = new ListAnimatedGraphicsTaskRequest().withTaskId(Collections.singletonList("3198527")); // 发送查询动图任务请求给媒体处理服务 ListAnimatedGraphicsTaskResponse rsp = initMpcClient().listAnimatedGraphicsTask(req); // 打印返回消息 System.out.println("rsp=" + JsonUtils.toJSON(rsp));
  • 分页查询 1 2 3 4 5 6 // 分页查询 ListAnimatedGraphicsTaskRequest req = new ListAnimatedGraphicsTaskRequest().withPage(1).withSize(10); // 发送查询动图任务请求给媒体处理服务 ListAnimatedGraphicsTaskResponse rsp = initMpcClient().listAnimatedGraphicsTask(req); // 打印返回消息 System.out.println("rsp=" + JsonUtils.toJSON(rsp));
  • 根据时间段查询 1 2 3 4 5 6 // 根据时间段查询 ListAnimatedGraphicsTaskRequest req = new ListAnimatedGraphicsTaskRequest().withStartTime("20201220131400").withEndTime("20201221131400"); // 发送查询动图任务请求给媒体处理服务 ListAnimatedGraphicsTaskResponse rsp = initMpcClient().listAnimatedGraphicsTask(req); // 打印返回消息 System.out.println("rsp=" + JsonUtils.toJSON(rsp));
共100000条