视频点播 VOD-创建媒资:OBS转存方式:请求示例

时间:2024-05-22 10:32:26

请求示例

  • 转存存储在OBS桶中的HLS视频至点播服务中(ts文件需和m3u8文件在同一目录下)
    POST https://{endpoint}/v1.0/{project_id}/asset/reproduction
    
    Content-Type: application/json
    {
      "video_type": "HLS",
      "title": "tittle",
      "auto_publish": 1,
      "input": {
        "bucket": "bucket_name",
        "location": "cn-north-4",
        "object": "test/hls/test_video.m3u8"
      },
      "storage_mode": 1,
      "output_bucket": "bucket_name",
      "output_path": "test/hls"
    }
  • 转存存储在OBS桶中的音视频文件至点播服务中
    POST https://{endpoint}/v1.0/{project_id}/asset/reproduction
    
    Content-Type: application/json
    {
      "input": {
        "bucket": "bucket",
        "location": "cn-north-4",
        "object": "path"
      },
      "title": "title",
      "description": "des",
      "category_id": -1,
      "tags": "test",
      "video_type": "MP4",
      "auto_publish": 1,
      "template_group_name": "tempName"
    }
support.huaweicloud.com/api-vod/vod_04_0201.html