Release Notes
Announcements
cos:GetObject permission to the action in the authorization policy. For all operation interfaces supported by COS, see COS action.GET /<ObjectKey>?ci-process=avinfo HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>Content-Length: <length>
Node Name (Keyword) | Description | Type | Required |
ObjectKey | Name of the object file. For example, test.mp4 | String | Yes |
ci-process | Operation type. Fixed value: avinfo, which represents the feature for obtaining media information. | String | Yes |
magicvar | Parameter for magic variables. When set to "1", the audio/video stream information will be parsed separately and encapsulated in the output. | String | No |
{"streams": [{"index": 0,"codec_name": "h264","codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","codec_type": "video","codec_time_base": "1/30","codec_tag_string": "avc1","codec_tag": "0x31637661","width": 1152,"height": 864,"has_b_frames": 0,"sample_aspect_ratio": "1:1","display_aspect_ratio": "4:3","pix_fmt": "yuv420p","level": 40,"is_avc": "1","nal_length_size": "4","r_frame_rate": "15/1","avg_frame_rate": "15/1","time_base": "1/15000","start_time": "0.000000","duration": "6413.333333","nb_frames": "96200","tags": {"creation_time": "2013-01-07 12:58:08","language": "eng","handler_name": "Video Media Handler"}},{"index": 1,"codec_name": "aac","codec_long_name": "Full name of the Advanced Audio encoder: Coding""codec_type": "audio","codec_time_base": "1/44100","codec_tag_string": "mp4a","codec_tag": "0x6134706d","sample_fmt": "s16","sample_rate": "44100","channels": 2,"bits_per_sample": 0,"r_frame_rate": "0/0","avg_frame_rate": "0/0","time_base": "1/44100","start_time": "0.000000","duration": "6413.374694","nb_frames": "276201","tags": {"creation_time": "2013-01-07 12:58:08","language": "eng","handler_name": "Sound Media Handler"}}],"format": {"nb_streams": 2,"format_name": "mov,mp4,m4a,3gp,3g2,mj2","format_long_name": "QuickTime/MPEG-4/Motion JPEG 2000 format","start_time": "0.000000","duration": "6413.359589","size": "101416337","bit_rate": "126506",}}
Node Name (Keyword) | Parent Node | Description | Type |
nb_streams | format | The quantity of streams (including video, audio, and sub_info) | Integer |
nb_programs | format | The number of programs | Integer |
format_name | format | name of the container format | String |
format_long_name | format | detailed name of the container format | String |
start_time | format | Start time, in seconds | String |
duration | format | Duration, in seconds | String |
bit_rate | format | Bitrate, in kbps | String |
size | format | Size, in Byte | String |
Node Name (Keyword) | Parent Node | Description | Type |
streams | None. | information of the audio and video streams | Array |
format | None. | Format information | Container |
Node Name (Keyword) | Parent Node | Description | Type |
index | streams | The ID of this stream | Integer |
codec_type | streams | Stream type | String |
codec_name | streams | name of the codec format | String |
codec_long_name | streams | detailed name of the codec format | String |
codec_time_base | streams | codec time_base | String |
codec_tag_string | streams | Codec Tag Name | String |
codec_tag | streams | Codec Tag | String |
color_primaries | streams | Chroma | String |
color_range | streams | Color Range | String |
color_transfer | streams | Color Channel | String |
profile | streams | Profile for video encoding | String |
height | streams | Video height (in px) | Integer |
width | streams | Video width (in px) | Integer |
has_b_frames | streams | Whether there are B-frames. 1 for yes, 0 for no | String |
refs | streams | Number of reference frames in video encoding | Integer |
sample_aspect_ratio | streams | Sample Aspect Ratio | String |
display_aspect_ratio | streams | Display Aspect Ratio | String |
pix_fmt | streams | Pixel Format | String |
filed_order | streams | Field Order | String |
level | streams | Level of video encoding | Integer |
r_frame_rate | streams | Video frame rate | String |
avg_frame_rate | streams | Average frame rate | String |
timebase | streams | time_base | String |
start_time | streams | Stream start time, in seconds | String |
duration | streams | Stream duration, in seconds | String |
bit_rate | streams | Bitrate, in kbps | String |
nb_frames | streams | Total frames | String |
language | streams | Language | String |
rotation | streams | Rotation angle | String |
creation_time | streams | Stream creation time | String |
sample_fmt | streams | Sample format | String |
sample_rate | streams | Sampling Rate | String |
channels | streams | Number of Channels | Integer |
channel_layout | streams | Channel Format | String |
Node Name (Keyword) | Parent Node | Description | Type |
format | None. | Format information | Container |
video | None. | video information | Container |
audio | None. | audio information | Container |
Node Name (Keyword) | Parent Node | Description | Type |
index | video | The ID of this stream | Integer |
codec_type | video | Stream type, fixed as video. | String |
codec_name | video | name of the codec format | String |
codec_long_name | video | detailed name of the codec format | String |
codec_time_base | video | codec time_base | String |
codec_tag_string | video | Name of the Codec Tag | String |
codec_tag | video | Codec Tag | String |
color_primaries | video | Chroma | String |
color_range | video | Color Range | String |
color_transfer | video | Color Channel | String |
profile | video | Video encoding profile | String |
height | video | Video height (in px) | Integer |
width | video | Video width (in px) | Integer |
has_b_frames | video | Whether there are B-frames. 1 for yes, 0 for no | String |
refs | video | Number of reference frames in video encoding | Integer |
sample_aspect_ratio | video | Aspect Ratio of the Sample | String |
display_aspect_ratio | video | Display Aspect Ratio | String |
pix_fmt | video | Pixel Format | String |
filed_order | video | Field Order | String |
level | video | Level of video encoding | Integer |
r_frame_rate | video | Video frame rate | String |
avg_frame_rate | video | Average frame rate | String |
timebase | video | time_base | String |
start_time | video | Start time of the video, in seconds | String |
duration | video | Video duration, in seconds | String |
bit_rate | video | Bitrate, in kbps | String |
nb_frames | video | Total frames | String |
language | video | Language | String |
rotation | video | Rotation angle | String |
creation_time | video | Time of stream creation | String |
Node Name (Keyword) | Parent Node | Description | Type |
index | audio | The ID of this stream | Integer |
codec_type | audio | Stream type, fixed as audio | String |
codec_name | audio | Name of the codec format | String |
codec_long_name | audio | detailed name of the codec format | String |
codec_time_base | audio | codec time_base | String |
codec_tag_string | audio | Codec Tag Name | String |
codec_tag | audio | Codec Tag | String |
sample_fmt | audio | Sample format | String |
sample_rate | audio | Sampling Rate | String |
channels | audio | Number of Channels | Integer |
channel_layout | audio | Channel Format | String |
timebase | audio | time_base | String |
start_time | audio | Start time of the audio, in seconds | String |
duration | audio | Audio duration, in seconds | String |
bit_rate | audio | Bitrate, in kbps | String |
language | audio | Language | String |
creation_time | audio | Creation time of the stream | String |
GET /for-test.mp4?ci-process=avinfo HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Mar 2016 09:45:46 GMTAuthorization: q-sign-algorithm=sha1&q-ak=***************************************&q-key-time=1484213027;32557109027&q-header-list=host&q-url-param-list=acl&q-signature=****************************************Content-Length: 0
HTTP/1.1 200 OKContent-Type: application/jsonContent-Length: 666Connection: keep-aliveDate: Fri, 10 Mar 2016 09:45:46 GMTServer: tencent-cix-cos-request-id: NTg3NzRiMjVfYmRjMzVfMTViMl82ZGZmNw=={"format": {"bit_rate": "1166.619000","duration": "27.000000","format_long_name": "QuickTime / MOV","format_name": "mov,mp4,m4a,3gp,3g2,mj2","nb_programs": 0,"nb_streams": 2,"size": "3937340","start_time": "0.000000"},"streams": [{"avg_frame_rate": "30/1","bit_rate": "1028.621000","codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","codec_name": "h264","codec_tag": "0x31637661","codec_tag_string": "avc1","codec_time_base": "1/15360","codec_type": "video","color_primaries": "bt709","color_range": "tv","color_transfer": "bt709","duration": "27.000000","has_b_frames": "2","height": 1280,"index": 0,"language": "und","level": 31,"nb_frames": "810","pix_fmt": "yuv420p","profile": "High","r_frame_rate": "30/1","refs": 1,"rotation": "0.000000","start_time": "0.000000","timebase": "1/15360","width": 720}, {"bit_rate": "129.505000","channel_layout": "stereo","channels": 2,"codec_long_name": "AAC (Advanced Audio Coding)","codec_name": "aac","codec_tag": "0x6134706d","codec_tag_string": "mp4a","codec_time_base": "1/44100","codec_type": "audio","duration": "26.915011","index": 1,"language": "und","sample_fmt": "fltp","sample_rate": "44100","start_time": "0.000000","timebase": "1/44100"}]}
GET /for-test.mp4?ci-process=avinfo&magicvar=1 HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Fri, 10 Mar 2016 09:45:46 GMTAuthorization: q-sign-algorithm=sha1&q-ak=***************************************&q-key-time=1484213027;32557109027&q-header-list=host&q-url-param-list=acl&q-signature=****************************************Content-Length: 0
{"audio": {"bit_rate": "129.505000","channel_layout": "stereo","channels": 2,"codec_long_name": "AAC (Advanced Audio Coding)","codec_name": "aac","codec_tag": "0x6134706d","codec_tag_string": "mp4a","codec_time_base": "1/44100","codec_type": "audio","duration": "26.915011","index": 1,"language": "und","sample_fmt": "fltp","sample_rate": "44100","start_time": "0.000000","timebase": "1/44100"},"format": {"bit_rate": "1166.619000","duration": "27.000000","format_long_name": "QuickTime / MOV","format_name": "mov,mp4,m4a,3gp,3g2,mj2","nb_programs": 0,"nb_streams": 2,"size": "3937340","start_time": "0.000000"},"video": {"avg_frame_rate": "30/1","bit_rate": "1028.621000","codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10","codec_name": "h264","codec_tag": "0x31637661","codec_tag_string": "avc1","codec_time_base": "1/15360","codec_type": "video","color_primaries": "bt709","color_range": "tv","color_transfer": "bt709","duration": "27.000000","has_b_frames": "2","height": 1280,"index": 0,"language": "und","level": 31,"nb_frames": "810","pix_fmt": "yuv420p","profile": "High","r_frame_rate": "30/1","refs": 1,"rotation": "0.000000","start_time": "0.000000","timebase": "1/15360","width": 720}}
피드백