如何在飞行中重新编码流并翻译?

How to reencode stream in fly and translate?

我有 Icecast/Shoutcast 流的 URL,如何以多种比特率中继这些流?我知道如何重新编码文件,但不知道如何以多种比特率重新编码流。

For example i find two icecast/shoutcast stream url/server:

http://icecast_stream.ru:8000/play
http://shoutcast_stream:8000/

I want to relay it in multiple bitrates:
http://localhost:8000/icecast_stream_32
http://localhost:8000/icecast_stream_64
http://localhost:8000/icecast_stream_128


http://localhost:8000/shoutcast_stream_32
http://localhost:8000/shoutcast_stream_64
http://localhost:8000/shoutcast_stream_128

我可以用 Icecast + Ices 做吗?或者我需要使用哪个软件?

流转码可以通过多种工具完成。 avconv/ffmpeg、vlc、liquidsoap、ezstream、……
一个例子:

关于您的多比特率部分:在大多数情况下,您需要 运行 转码工具的多个进程。
如果您担心带宽消耗,那么我建议您在本地 Icecast 服务器上设置远程流的中继,并将其用作转码的输入。

问题编辑后添加:
我猜两个原始流都是128k。
如此处所述:http://icecast.org/docs/icecast-2.4.1/relaying.html#setting-up-a-single-broadcast-relay

<relay> <server>icecast_stream.ru</server> <port>8000</port> <mount>/play</mount> <local-mount>/icecast_stream_128</local-mount> <relay-shoutcast-metadata>1</relay-shoutcast-metadata> </relay>

要获得两个较低质量的流,请按照上述步骤进行操作。为此使用冰块很复杂,因此使用其他冰块会更容易。 如果您想自动开始转码,请查看:
http://icecast.org/docs/icecast-2.4.1/config-file.html#mountsettings - 特别是连接时:
<mount> <mount-name>/icecast_stream_128</mount-name> <on-connect>/usr/local/bin/start-transcoders-icecast-stream</on-connect> </mount>
注意:此命令在流可用之前运行,您可能需要将转码器的启动延迟几秒钟以避免出现问题。