问题
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