ffprobe/ffmpg静音检测命令 [英] ffprobe/ffmpg silence detection command
问题描述
我正在研究流静默检测. 它正在ffmpeg中执行以下命令:
I'm working on a stream silence detection. It's working on the following command in ffmpeg:
ffmpeg -i http://mystream.com/stream -af silencedetect=n=-50dB:d=0.5 -f null - 2> log.txt
我想获取日志文件的json输出.
'ffprobe'中有一个json选项,但silencedetect=n=-50dB:d=0.5
不起作用.
I would like to get a json output of the logfile.
There is a json option in 'ffprobe' but silencedetect=n=-50dB:d=0.5
is'nt working.
帮助!
干杯!
推荐答案
ffprobe用于探测容器级或流级元数据. silencedetect
是用于分析解码音频流内容的过滤器;它的输出不受作者选择的控制.
ffprobe is meant to probe container-level or stream-level metadata. silencedetect
is a filter which analyses the content of decoded audio streams; its output isn't controlled by the choice of writer.
您可以做的是,由于silencedetect也将其结果记录到元数据标签中,因此只会将该数据输出到文件中.
What you could do, since silencedetect also logs its result to metadata tags, is output just that data to a file.
ffmpeg -i http://mystream.com/stream -af silencedetect=n=-50dB:d=0.5,ametadata=print:file=log.txt -f null -
输出
frame:281 pts:323712 pts_time:6.744
lavfi.silence_start=6.244
frame:285 pts:328320 pts_time:6.84
lavfi.silence_end=6.84
lavfi.silence_duration=0.596
frame:413 pts:475776 pts_time:9.912
lavfi.silence_start=9.412
frame:1224 pts:1410048 pts_time:29.376
lavfi.silence_end=29.376
lavfi.silence_duration=19.964
这篇关于ffprobe/ffmpg静音检测命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!