背景
使用声纹识别时候提交音频报错,使用ffmpeg系列的子组件ffprobe来获取我的音频信息。
ffmpeg 获取音频信息
使用ffprobe来获取音频的信息
附上命令行
ffprobe -v quiet -show_format -show_streams -print_format json "F:\voice_data\170930125\register_0.wav"
返回结果
{
"streams": [
{
"index": 0,
"codec_name": "opus",
"codec_long_name": "Opus (Opus Interactive Audio Codec)",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 1,
"channel_layout": "m