Create Video Transcoding

Products

Object Storage Service

2022-02-18 08:33:07

Create Video Transcoding

This version of Media Processing Service will not be maintained any more. It is recommended to use New Version of Media Processing Service

Description: Video transcode the video file on JD Cloud Object Storage Service, and save the transcoded video as a new file.

Request syntax:

PUT /bucket/object?pretreatmentStrategyV2&expires=<expires value>&policy=<policy string>  HTTP/1.1
Content-MD5: 
Content-Disposition: 
Host: oss.cn-north-1.jcloudcs.com
Date: date
Description:

expires: Expired time, standard HTTP Header

policy: Transcoding policy, JSON format, and policy related parameters are explained as follows:

  • "targetSaveas": Save as, i.e. the location where the processed video files is stored.

  • "persistentOps": A video transcoding rule triggered after resource uploading.

  • vcodec": optional value h264 or h265, by default h264 (note: when flv is output, h265 is not supported, error 4 will be returned upon call)

  • inFrameRate": Set video and enter source frame rate. For example, 15/1 means the frame rate is 15.

  • audioVolume": The optional values are as follows:

  1. floating-point count, output volume = original volume*input value, such as "5.0";
  2. Absolute value of output volume, such as "10dB".

The existing video transcoding rules are as follows:

video format_resolution_bit rate
video_mp4_1920x1080_1500kbps
video_mp4_1280x720_1000kbps
video_mp4_854x480_800kbps
video_mp4_640x480_500kbps
video_mp4_640x360_500kbps
video_mp4_480x360_440kbps
video_mp4_320x240_240kbps
video_flv_1280x720_1000kbps
video_flv_854x480_800kbps
video_flv_640x480_500kbps
video_flv_640x360_500kbps
video_flv_480x360_440kbps
video_flv_320x240_240kbps
video_hls_1920x1080_1500kbps
video_hls_1280x720_1000kbps
video_hls_854x480_800kbps
video_hls_640x480_500kbps
video_hls_640x360_500kbps
video_hls_480x360_440kbps
video_hls_320x240_240kbps

Request Example:

PUT /bucket/object?pretreatmentStrategyV2&expires=3600&policy={"persistentOps":"video_mp4_480x360_440kbps","saveas":"kkk:aaaa.wmv","targetSaveas":"a2trOmFhYWEud212"} HTTP/1.1
   Date: Mon, 22 Feb 2016 03:35:32 GMT
   Authorization: jingdong   NcB3e3VUn45NtjV3:A0LcbZin1FhRnSH697Q0D+64t8E=
   Content-Length: 0
   Host: oss.cn-north-1.jcloudcs.com
   Connection: Keep-Alive
User-Agent: JSS-SDK-JAVA/1.2.0 (Java 1.8.0_45; Vendor Oracle Corporation; Windows 7 6.1; HttpClient 4.2.1)

Request Response:

HTTP/1.1 200 OK
x-jss-request-id: 8CEF3204E1AD1C2D
Server: JSS/1.0
ETag: "a0eb630d0cab1a1240b2bae67410cdb7"
Content-Type: application/json;charset=UTF-8
Content-Length: 34
Date: Tue, 15 Dec 2015 13:10:50 GMT
{“taskId”: "0a354cca27994b398931b205bbf96985"}   
Wrong return information:
{"code":"NoSuchKey","message":" The specified file used for video transcoding does not exist, file name = Wildlifetest.wmv","resource":"/test-bucket13/Wildlifetest.wmv","requestId":"8764E879D8AEE8BF"}
Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通