I have urls to the Icecast/Shoutcast streams, how can i relay these streams in multiple bitrates? I know how to reencode file, but don't know how to reencode stream in multiple bitrates.
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
Can I do it with Icecast + Ices or which soft i need to use?
Stream transcoding can be done with multiple tools. avconv/ffmpeg, vlc, liquidsoap, ezstream, …
One example: https://stackoverflow.com/a/29500982/2648865
Towards your multiple bitrate part: you need to run multiple processes of the transcoding tool in most cases.
If you are concerned with bandwidth consumption, then I'd recommend to set up a relay of the remote stream on your local Icecast server and use that as the input for the transcoding.
added after question was edited:
I'm going to guess that both original streams are 128k.
As explained here: 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>
To obtain the two lower quality streams, proceed as outlined above. It's complicated using ices for this, so one of the others would be easier.
If you want to automate starting the transcoding, look into:
http://icecast.org/docs/icecast-2.4.1/config-file.html#mountsettings - specifically on-connect:
<mount>
<mount-name>/icecast_stream_128</mount-name>
<on-connect>/usr/local/bin/start-transcoders-icecast-stream</on-connect>
</mount>
note: this command is run before the stream is available, you might need to delay startup of the transcoders by a few seconds to avoid problems.