问题描述
我正在尝试将ffmpeg与gnuplot结合使用以绘制一些音频频谱,我正在关注此ffmpeg doc链接。
现在,我要问-
之后的这一行上的“破折号” -f data
是什么意思,它应该是文件名:ffmpeg命令的最后一个元素应该是输出文件,但我没有文件运行命令后,在目录中将其命名为-
。
ffmpeg -y -i in.wav -ac 1 -filter:a aresample=8000 -map 0:a -c:a pcm_s16le -f data - | gnuplot -p -e "plot '<cat' binary filetype=bin format='%int16' endian=little array=1:0 with lines;"
我查看了ffmpeg文档,但未找到任何内容。
解决方法
输出端的
-
表示stdout
。您也可以在其位置写pipe:1
。作为输入,它表示stdin
,可以写为pipe:0
。