Pipe ffmpeg stream to sox rec

六眼飞鱼酱① 提交于 2020-01-13 19:29:00

问题


I am reading an audio stream via ffpmeg like this:

ffmpeg -i http://icecast.radiovox.org:8000/live.ogg -f mp3 filename

and want to pipe it to a sox command:

rec filename rate 32k silence 1 0.1 3% 1 3.0 3%.

Ultimately, what I am trying to achieve, is to record the audio from a live Icecast stream of a talk show. I only want recordings though of the individual's speaking. Everytime there is silence, I want to stop the recording and start a new one once they start speaking again.


回答1:


What difficulty did you meet? I tried myself and the only problem I noticed in using the example given in the sox man page is that sox - may have trouble understanding the input format from just a few bytes.

Try going through flac, it worked here:

ffmpeg -i http://icecast.radiovox.org:8000/live.ogg -f flac - | sox - song.ogg silence 1 0.50 0.1% 1 2.0 0.1% : newfile : restart



来源:https://stackoverflow.com/questions/50162149/pipe-ffmpeg-stream-to-sox-rec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!