CDNetworks Documentation Object Storage API Simple Audio/Video Metadata (avinfo2)

Simple Audio/Video Metadata (avinfo2)

Last update:2025-08-18 15:32:29

This API is used to retrieve basic metadata of specified audio and video resources stored on the CDNetworks Object Storage platform.

Request Description

GET /<key>?op=avinfo2
HOST: <DownloadDomain>

Header Description

Parameter Required Description
Host Yes The download domain bound to the bucket

Parameter Description

Parameter Required Description
op Yes Operation type. Must be avinfo2 (simplified audio/video information)

Response Description

Successful Response

If the request is successful, a JSON object in the following format will be returned:

{
    "streams": [
        {
            "index": 0,
            "codec_name": "h264",
            "codec_type": "video",
            "width": 480,
            "height": 480,
            "pix_fmt": "yuv420p",
            "duration": "246.633333",
            "bit_rate": "1173144",
            "nb_frames": "7399",
            "rotate": "90"
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_type": "audio",
            "sample_rate": "44100",
            "channels": 2,
            "duration": "246.595918",
            "bit_rate": "122396",
            "nb_frames": "10620"
        }
    ],
    "format": {
        "nb_streams": 2,
        "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
        "duration": "246.639000",
        "size": "40149865",
        "bit_rate": "1302330"
    }
}

For detailed field descriptions, please refer to avinfo Field Description.

Note: The rotate field is optional and only appears if the video stream contains rotation information.

Failed Response

If the request fails, a JSON object in the following format will be returned:

{
    "code": "<code string>",
    "message": "<message string>"
}
Field Required Description
code Yes HTTP response code. See HTTP Response Status Codes
message Yes Error message indicating the reason for failure when retrieving simplified audio/video information

Request Example

curl -v "http://downloadDomain/1.mp4?op=avinfo2"
Is the content of this document helpful to you?
Yes
I have suggestion
Submitted successfully! Thank you very much for your feedback, we will continue to strive to do better!