Audio/Video Metadata

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

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

Request Description

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

Header Description

Parameter Required Description
HOST Yes The download domain bound to the storage space

Parameter Description

Parameter Required Description
op Yes Operation type, fixed value: avinfo (audio/video information)

Response Description

Successful Response

If the request is successful, a JSON string with the following content is returned:

{
    "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
            // ... other fields
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "Advanced Audio Coding",
            "codec_type": "audio",
            "codec_time_base": "1/44100",
            "codec_tag_string": "mp4a",
            "codec_tag": "0x6134706d"
            // ... other fields
        }
    ],
    "format": {
        "filename": "/disk1/fopd_tmpdir/avinfo184020568",
        "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"
        // ... other fields
    }
}

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

Error Response

If the request fails, a JSON object in the following format is 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 to retrieve audio/video information

Request Example

curl -v "http://downloadDomain/1.mp4?op=avinfo"
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!