Avinfo Field Description

最終更新日:2025-08-18 15:33:05

APIは、主にstreams(ストリーム情報)とformat(ファイルフォーマット情報)のフィールド内で、音声および映像ファイルに関する包括的なメタデータを返します。本ドキュメントでは、APIレスポンスに含まれる各フィールドについて説明します。

音声および映像ストリーム情報 – streamsフィールド

各メディアストリームはstreams配列内の1つのアイテムに対応します。

共通フィールド

フィールド名 説明
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 Bフレームバッファサイズ
height 映像の高さ
index ストリームインデックス
level レベル
nb_frames フレーム数
pix_fmt ピクセルフォーマット
profile プロファイル
r_frame_rate 実効基準フレームレート
sample_aspect_ratio サンプルアスペクト比
start_pts 開始PTS(プレゼンテーションタイムスタンプ)
start_time 最初のフレーム時間
tag タグ情報(下記参照)
time_base フレーム持続時間
width 映像の幅

dispositionフィールドの説明

フィールド 説明
attached_pic サムネイル/添付画像
clean_effects クリーンエフェクト
comment コメント
default デフォルトストリーム
dub ダビング
forced 強制ストリーム
hearing_impaired 聴覚障害者用ストリーム
karaoke カラオケトラック
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": <average frame rate>,
            "bit_rate": <bitrate>,
            "codec_long_name": <full codec name>,
            "codec_name": <codec name>,
            "codec_tag": <codec tag>,
            "codec_tag_string": <codec tag string>,
            "codec_time_base": <codec frame duration>,
            "codec_type": <codec type>,
            "display_aspect_ratio": <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": <duration>,
            "rotate": <rotation information>,
            "duration_ts": <total frame time>,
            "has_b_frames": <B-frame buffer size>,
            "height": <height>,
            "index": <stream index>,
            "level": <level>,
            "nb_frames": <number of frames>,
            "pix_fmt": <pixel format>,
            "profile": <profile>,
            "r_frame_rate": <real base frame rate>,
            "sample_aspect_ratio": <sample aspect ratio>,
            "start_pts": <start PTS>,
            "start_time": <first frame time>,
            "tag": { // タグ情報
                "creation_time": <creation time>,
                "encoder": <encoder name>,
                "handler_name": <handler name>,
                "language": <language>
            },
            "time_base": <frame duration>,
            "width": <width>
        },
        {
            "avg_frame_rate": <average frame rate>,
            "bit_rate": <bitrate>,
            "bits_per_sample": <bits per sample>,
            "channels": <channels>,
            "codec_long_name": <full codec name>,
            "codec_name": <codec name>,
            "codec_tag": <codec tag>,
            "codec_tag_string": <codec tag string>,
            "codec_time_base": <codec frame duration>,
            "codec_type": <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>,
            "duration_ts": <total frame time>,
            "index": <stream index>,
            "nb_frames": <number of frames>,
            "profile": <profile>,
            "r_frame_rate": <real base frame rate>,
            "sample_fmt": <sample format>,
            "sample_rate": <sample rate>,
            "start_pts": <start PTS>,
            "start_time": <first frame time>,
            "tag": { // タグ情報
                "creation_time": <creation time>,
                "handler_name": <handler name>,
                "language": <language>
            },
            "time_base": <frame duration>
        }
    ],
    "format": {
        "bit_rate": <bitrate>,
        "duration": <duration>,
        "format_long_name": <full format name>,
        "format_name": <format name>,
        "nb_programs": <number of programs>,
        "nb_streams": <number of streams>,
        "probe_score": <probe score>,
        "size": <file size>,
        "start_time": <first frame time>,
        "tag": { // タグ情報
            "compatible_brands": <compatible brands>,
            "creation_time": <creation time>,
            "major_brand": <major brand>,
            "minor_version": <minor version>
        }
    }
}