文档中心 Object Storage API Avinfo字段说明

Avinfo字段说明

更新时间:2025-08-18 15:33:05

接口会返回音视频文件的丰富元信息,主要包括 streams(流信息)和 format(格式信息)两个字段,本文档对接口响应字段进行说明。

音视频流信息 streams 字段

每个音视频流对应 streams 数组中的一项。

常见字段

字段名 说明
avg_frame_rate 平均帧率
bit_rate 码率
codec_long_name 编码器全称
codec_name 编码器名
codec_tag 编码器标签
codec_tag_string 编码器标签名
codec_time_base 编码器每帧时长
codec_type 编码器类型
display_aspect_ratio 显示长宽比
disposition 处理信息(见下说明)
duration 文件总时间
rotate 旋转信息
duration_ts 帧总时间
has_b_frames 记录帧缓存大小
height 视频高度
index 流索引号
level 级别
nb_frames 帧数
pix_fmt 像素格式
profile 配置文件
r_frame_rate 真实基础帧率
sample_aspect_ratio 采样率
start_pts 起始时间
start_time 首帧时间
tag 标签信息(见下说明)
time_base 每帧时长
width 视频宽度

disposition 字段说明

字段 说明
attached_pic 是否为附件图片
clean_effects 是否为清音效
comment 是否为注释
default 是否为默认流
dub 是否为配音
forced 是否为强制流
hearing_impaired 是否为听障流
karaoke 是否为卡拉OK
lyrics 是否为歌词
original 是否为原始流
visual_impaired 是否为视障流

tag 字段说明

字段 说明
creation_time 创建时间
encoder 编码器
handler_name 处理器名字
language 语言

音频流特有字段

字段名 说明
bits_per_sample 采样码率
channels 音频通道数
sample_fmt 采样格式
sample_rate 采样率

文件格式信息 format 字段

该字段包含当前文件整体的相关属性。

字段说明

字段名 说明
bit_rate 码率
duration 时长
format_long_name 文件全称
format_name 文件名
nb_programs 程序集数量
nb_streams 流数量
probe_score 格式探测得分
size 文件大小
start_time 首帧时间
tag 标签信息(见下说明)

tag 字段说明

字段 说明
compatible_brands 兼容性品牌
creation_time 创建时间
major_brand 主品牌
minor_version 次要版本

典型响应示例

{
    "streams": [
        {
            "avg_frame_rate": 平均帧率
            "bit_rate": 码率
            "codec_long_name": 编码器名全称
            "codec_name": 编码器名
            "codec_tag": 编码器标签
            "codec_tag_string": 编码器标签名
            "codec_time_base": 编码器每帧时长
            "codec_type": 编码器类型
            "display_aspect_ratio": 显示长宽比
            "disposition": { 处理信息
                "attached_pic": 0,
                "clean_effects": 0,
                "comment": 0,
                "default": 1,
                "dub": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "karaoke": 0,
                "lyrics": 0,
                "original": 0,
                "visual_impaired": 0
            },
            "duration": 文件总时间
            "rotate": 旋转信息
            "duration_ts": 帧总时间
            "has_b_frames": 记录帧缓存大小
            "height": 高度
            "index": 流索引号
            "level": 级别
            "nb_frames": 帧数
            "pix_fmt": 像素个数
            "profile": 配置信息
            "r_frame_rate": 真实基础帧率
            "sample_aspect_ratio": 采样率
            "start_pts": 起始时间
            "start_time": 首帧时间
            "tag": {  标签
                "creation_time": 创建时间
                "encoder": 编码器
                "handler_name": 处理器名字
                "language": 语言
            },
            "time_base": 每帧时长
            "width": 宽度
        },
        {
            "avg_frame_rate": 平均帧率
            "bit_rate": 码率
            "bits_per_sample": 采样码率
            "channels": 音频数
            "codec_long_name": 编码器全名
            "codec_name": 编码器名
            "codec_tag": 编码器标签
            "codec_tag_string": 编码器标签名
            "codec_time_base": 编码器每帧时长
            "codec_type": 编码器类别
            "disposition": { 处理信息
                "attached_pic": 0,
                "clean_effects": 0,
                "comment": 0,
                "default": 1,
                "dub": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "karaoke": 0,
                "lyrics": 0,
                "original": 0,
                "visual_impaired": 0
            },
            "duration": 文件总时间
            "duration_ts": 帧总时间
            "index": 流索引号
            "nb_frames": 帧数
            "profile": 配置文件
            "r_frame_rate": 真实基础帧率
            "sample_fmt": 采样格式
            "sample_rate": 采样率
            "start_pts": 起始时间
            "start_time": 首帧时间
            "tag": {  标签
                "creation_time": 创建时间
                "handler_name": 处理器名字
                "language": 语言
            },
            "time_base": 每帧时长
        }
    ]
    "format": {
        "bit_rate": 码率
        "duration": 时长
        "format_long_name": 文件名全称
        "format_name": 文件名
        "nb_programs": 程序集的数目
        "nb_streams": 流的数目
        "probe_score": 格式探测得分
        "size": 文件大小
        "start_time": 首帧时间
        "tag": { 标签信息
            "compatible_brands": 兼容性品牌
            "creation_time": 创建时间
            "major_brand": 主品牌
            "minor_version": 次要版本
        }
    }
}

本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!