命令格式:

ffprobe -v quiet -show_format -show_streams -print_format json F:\temp\test1566606924822.wav

输出

{
    "streams": [
        {
            "index": 0,
            "codec_name": "pcm_s16le",
            "codec_long_name": "PCM signed 16-bit little-endian",
            "codec_type": "audio",
            "codec_time_base": "1/8000",
            "codec_tag_string": "[1][0][0][0]",
            "codec_tag": "0x0001",
            "sample_fmt": "s16",
            "sample_rate": "8000",
            "channels": 1,
            "bits_per_sample": 16,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/8000",
            "duration_ts": 1710489,
            "duration": "213.811125",
            "bit_rate": "128000",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            }
        }
    ],
    "format": {
        "filename": "F:\\temp\\test1566606924822.wav",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "wav",
        "format_long_name": "WAV / WAVE (Waveform Audio)",
        "duration": "213.811125",
        "size": "3421022",
        "bit_rate": "128001",
        "probe_score": 99
    }
}

 其他用法:

 ./ffprobe -select_streams v -show_packets -of json 1.ts


如果是音频,改 -select_streams a

如果要选择音轨,可以这样 -select_streams a:0


./ffprobe -select_streams a:0 -show_packets -of json 1.ts

 

posted on 2019-09-02 08:16  你不知道的浪漫  阅读(1293)  评论(0编辑  收藏  举报