当我使用 ffmpeg 检测音频静音时,结果的开始时间为负数。
我想要它从 0 开始,谁能帮助我?
D:\audiodrop>ffmpeg -i silence.wav -af silencedetect=noise=-27dB:d=1 -f null -
ffmpeg version 3.4.git Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.2.0 (Rev2, Built by MSYS2 project)
configuration:
libavutil 56. 7.101 / 56. 7.101
libavcodec 58. 12.102 / 58. 12.102
libavformat 58. 9.100 / 58. 9.100
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 12.100 / 7. 12.100
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'silence.wav':
Duration: 00:00:06.60, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
encoder : Lavf58.9.100
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
Metadata:
encoder : Lavc58.12.102 pcm_s16le
[silencedetect @ 000001ca9b8719c0] silence_start: -0.0247619
size=N/A time=00:00:06.60 bitrate=N/A speed=1.7e+003x
video:0kB audio:569kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
答案1
这显然是旧版 ffmpeg 的一个错误。请从下载最新版本http://ffmpeg.org/download.html相反。您可以获得静态构建,它不需要编译。