ffprobe读取音视频元数据信息,json格式输出
Posted passedbylove
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ffprobe读取音视频元数据信息,json格式输出相关的知识,希望对你有一定的参考价值。
命令格式:
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读取音视频元数据信息,json格式输出的主要内容,如果未能解决你的问题,请参考以下文章
ffprobe 或 avprobe 在 JSON 输出中返回纯文本错误