最終更新日:2025-08-18 15:52:06
オーディオ/ビデオオブジェクトのメタデータを取得します。IAM wos:GetAvinfo 権限が必要です。
GET /Key?avinfo HTTP/1.1
Host: Bucket.Endpoint
Date: Date
Authorization: Authorization
| 名前 | 説明 | 必須 |
|---|---|---|
| avinfo | オーディオ/ビデオオブジェクトのメタデータ。型: 文字列 | Yes |
Common Request Headers をご利用ください。
なし
HTTP/1.1 StatusCode
x-wos-request-id: RequestId
Date: Date
Content-Type: type
Content-Length: length
Server: WS-web-server
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GetAvinfoResult>
<Streams>
<Index>index</Index>
<Codec_name>codec_name</Codec_name>
<Codec_type>codec_type</Codec_type>
<Width>width</Width>
<Height>height</Height>
<Pix_fmt>pix_fmt</Pix_fmt>
<Duration>duration</Duration>
<Bit_rate>bit_rate</Bit_rate>
<Nb_frames>nb_frames</Nb_frames>
<R_frame_rate>r_frame_rate</R_frame_rate>
<Avg_frame_rate>avg_frame_rate</Avg_frame_rate>
</Streams>
<Format>
<Nb_streams>nb_streams</Nb_streams>
<Format_name>format_name</Format_name>
<Duration>duration</Duration>
<Size>size</Size>
<Bit_rate>bit_rate</Bit_rate>
</Format>
</GetAvinfoResult>
Common Response Headers をご利用ください。
レスポンス内では、avinfoがXML形式で一覧表示されます。以下の表を参照してください。
| 名前 | 説明 |
|---|---|
| GetAvinfoResult | ビデオのメタデータ情報。型: XML |
| Streams | ストリーム情報。型: XML |
| Index | ストリームインデックス番号。型: 正の整数 |
| Codec_name | エンコーダ名。型: 文字列 |
| Codec_type | エンコーダタイプ。型: 文字列 |
| Width | 幅。型: 正の整数 |
| Height | 高さ。型: 正の整数 |
| Pix_fmt | ピクセルフォーマット。型: 文字列 |
| Duration | 全体の再生時間。型: 文字列 |
| Bit_rate | ビットレート。型: 文字列 |
| Nb_frames | フレーム数。型: 文字列 |
| R_frame_rate | 実際のフレームレート。型: 文字列 |
| Avg_frame_rate | 平均フレームレート。型: 文字列 |
| sample_rate | サンプリングレート。型: 文字列 |
| Channels | 音声チャンネル数。型: 正の整数 |
| Nb_streams | ストリーム数。型: 正の整数 |
| Format_name | フォーマット名。型: 文字列 |
| Size | オブジェクトサイズ。型: 文字列 |
| コード | メッセージ |
|---|---|
| 599 | InputFile Invalid |
GET /test?avinfo HTTP/1.1
Host: testbucket.s3-cn-south-1.wcsapi.com
Date: Wed, 04 Nov 2020 03:09:24 GMT
x-wos-date:20201104T030923Z
Authorization: WOS-HMAC-SHA256 Credential=7e7dae54118c45a6ffd213a18c9d4847b51a73f1/20201104/cn-east-2/wos/wos_request, SignedHeaders=host;x-wos-content-sha256;x-wos-date, Signature=1c104d10373f9813ecba257d5f48eecbb44f87b572e14edb7fce6c51d64cae13
HTTP/1.1 200 OK
Server: WS-web-server
x-wos-request-id: 202829121210026220201104110923r44rlIlOsampled
Content-Type: application/xml;charset=UTF-8
Date: Wed, 04 Nov 2020 03:09:24 GMT
Content-Length: 885
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<GetAvinfoResult>
<Streams>
<Index>0</Index>
<Codec_name>h264</Codec_name>
<Codec_type>video</Codec_type>
<Width>1366</Width>
<Height>768</Height>
<Pix_fmt>yuv420p</Pix_fmt>
<Duration>2643.520000</Duration>
<Bit_rate>1217993</Bit_rate>
<Nb_frames>66088</Nb_frames>
<R_frame_rate>25/1</R_frame_rate>
<Avg_frame_rate>25/1</Avg_frame_rate>
</Streams>
<Streams>
<Index>1</Index>
<Codec_name>aac</Codec_name>
<Codec_type>audio</Codec_type>
<Sample_rate>44100</Sample_rate>
<Channels>2</Channels>
<Duration>2643.522177</Duration>
<Bit_rate>127900</Bit_rate>
<Nb_frames>113847</Nb_frames>
<R_frame_rate>0/0</R_frame_rate>
<Avg_frame_rate>0/0</Avg_frame_rate>
</Streams>
<Format>
<Nb_streams>2</Nb_streams>
<Format_name>mov,mp4,m4a,3gp,3g2,mj2</Format_name>
<Duration>2643.523000</Duration>
<Size>446437306</Size>
<Bit_rate>1351037</Bit_rate>
</Format>
</GetAvinfoResult>