将ffmpeg流传输到sox rec [英] Pipe ffmpeg stream to sox rec

查看:375
本文介绍了将ffmpeg流传输到sox rec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过ffpmeg读取音频流,如下所示:

I am reading an audio stream via ffpmeg like this:

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

并希望通过管道将其发送给sox命令:

and want to pipe it to a sox command:

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

最终,我要实现的目标是从脱口秀节目的实时Icecast流中录制音频.我只想录制个人讲话.每当有寂静时,我想停止录音,并在他们再次讲话后开始新的录音.

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.

推荐答案

您遇到了什么困难?我尝试了一下,使用sox手册页中给出的示例时发现的唯一问题是sox -可能很难从几个字节理解输入格式.

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.

尝试通过flac,它在这里有效:

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

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

这篇关于将ffmpeg流传输到sox rec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆