使用ffprobe 查询wav文件信息

安装

安装过程和ffmepg相同不在赘述

不带参数查询文件信息

ffprobe ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav
ffprobe: /usr/local/lib/libuuid.so.1: no version information available (required by /lib/x86_64-linux-gnu/libblkid.so.1)
ffprobe version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, wav, from 'ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav':
Duration: 00:00:03.73, bitrate: 128 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, s16, 128 kb/s

去除不必要的日志

ffprobe -loglevel quiet ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav

使用-show_format

ffprobe -loglevel quiet -show_format ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav
[FORMAT]
filename=ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav
nb_streams=1
nb_programs=0
format_name=wav
format_long_name=WAV / WAVE (Waveform Audio)
start_time=N/A
duration=3.730000
size=59724
bit_rate=128094
probe_score=99
[/FORMAT]

使用-print_format json输出为json格式

ffprobe -loglevel quiet -show_format -print_format json  ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav
{
"format": {
"filename": "ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "wav",
"format_long_name": "WAV / WAVE (Waveform Audio)",
"duration": "3.730000",
"size": "59724",
"bit_rate": "128094",
"probe_score": 99
}
}

使用 -show_format -show_streams

ffprobe -loglevel quiet -show_format -show_streams -print_format json  ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.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": 29840,
"duration": "3.730000",
"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": "ZH_biaobei_标准合成_甜美女声_楠楠_5_5_5_6_1_4047db9ffe21ffc845816028a9fdd120.wav",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "wav",
"format_long_name": "WAV / WAVE (Waveform Audio)",
"duration": "3.730000",
"size": "59724",
"bit_rate": "128094",
"probe_score": 99
}
}

本文由博客一文多发平台 OpenWrite 发布!

使用ffprobe 查询wav文件信息的更多相关文章

  1. Oracle 查询库文件信息

    --.查看Oracle数据库中数据文件信息的命令方法 select b.file_name 物理文件名, b.tablespace_name 表空间, b.bytes// 大小M, (b.bytes- ...

  2. centos8平台用ffprobe获取视频文件信息(ffmpeg4.2.2)

    一,ffprobe的作用 ffprobe是强大的视频分析工具, 用于从多媒体流中获取相关信息或查看文件格式信息, 并以可读的方式打印 说明:刘宏缔的架构森林是一个专注架构的博客,地址:https:// ...

  3. Python解析Wav文件并绘制波形的方法

    资源下载 #本文PDF版下载 Python解析Wav文件并绘制波形的方法 #本文代码下载 Wav波形绘图代码 #本文实例音频文件night.wav下载 音频文件下载 (石进-夜的钢琴曲) 前言 在现在 ...

  4. Unix无缓冲文件操作函数、文件信息查询

    问题描述:         Unix无缓冲文件操作函数.文件信息查询 问题解决:        struct stat 结构体信息: 具体代码: 具体源文件:

  5. 使用QFileInfo类获取文件信息(在NTFS文件系统上,出于性能考虑,文件的所有权和权限检查在默认情况下是被禁用的,通过qt_ntfs_permission_lookup开启和操作。absolutePath()必须查询文件系统。而path()函数,可以直接作用于文件名本身,所以,path() 函数的运行会更快)

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/Amnes1a/article/details/65444966QFileInfo类为我们提供了系统无 ...

  6. C++标准库实现WAV文件读写

    在上一篇文章RIFF和WAVE音频文件格式中对WAV的文件格式做了介绍,本文将使用标准C++库实现对数据为PCM格式的WAV文件的读写操作,只使用标准C++库函数,不依赖于其他的库. WAV文件结构 ...

  7. python 播放 wav 文件

    未使用其他库, 只是使用 pywin32 调用系统底层 API 播放 wav 文件. # Our raison d'etre - playing sounds import pywintypes im ...

  8. android播放器如何获取音乐文件信息

    转http://blog.csdn.net/hellofeiya/article/details/8464356, android自带的音乐播放器中,在获取音乐文件信息的时候是通过扫描得到相关信息的. ...

  9. Windwos平台上ffmpeg解码音频并且保存到wav文件中

    先附上代码,测试通过 #include <stdio.h> #include <math.h> #include "libavutil/avstring.h" ...

随机推荐

  1. xheditor图片上传

    前端步骤:分为三部,这三部做完之后就能正确显示富文本了 1.下载xheditor文件,并按照如下要求进行引入: <!-- xheditor富文本的文件引入 --> <script t ...

  2. PhpStorm+XAMPP+Xdebug 集成开发和断点调试环境配置

    0x01 Xdebug安装 参考:https://xdebug.org/docs/install cd xdebug-/ phpize sudo ./configure --enable-xdebug ...

  3. CF33C Wonderful Randomized Sum 题解

    原题链接 简要题意: 你可以无限次的把该数组的一个前缀和后缀 \(\times -1\),问最终的最大序列和. 这题盲目WA了数次才知道本质 这题89个数据吊打std CF真好啊,发现一个错后面就不测 ...

  4. [模拟]Educational Codeforces Round 2A Extract Numbers

    Extract Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  5. linux下vmware could not open /dev/vmmon/no/such/file/or/directory问题

    执行 sudo vmware-modconfig --console --install-all 详解这里  

  6. adb软件国产安卓手机对系统的把控

    国产安卓手机对系统的把控,现在想搞机的方法是愈来愈麻烦,华为最先的申请解锁码,到现在直接系统锁死不给解.让我等搞机小伙伴是望机兴叹.安卓手机的通病随着系统升级,手机就越来越卡.本想通过卸载系统自带应用 ...

  7. Keras 多层感知机 多类别的 softmax 分类模型代码

    Multilayer Perceptron (MLP) for multi-class softmax classification: from keras.models import Sequent ...

  8. jdk1.8练习201909200843By:镜花水月(月神)

    package org.jimmy.test2019091701; import java.util.Arrays; import java.util.List; import java.util.S ...

  9. 关于 Vue 中 我对中央事线管理器的(enentBus)误解

    由于这段时间公司比较闲,就对vue 中的一些模糊的点做了一些加强,突然就想到了常挂在嘴边兄弟组件传值 我理解的兄弟组件的传值是可以跨理由传值的,比如我从http://localhost:8080/lo ...

  10. (七)Spring Cloud 配置中心config

      spring cloud config是一个基于http协议的远程配置实现方式. 通过统一的配置管理服务器进行配置管理,客户端通过http协议主动的拉取服务的的配置信息,完成配置获取. 下面我们对 ...