ffmpeg: Copy/bridge a mp3 stream to an (internal) icecast server

Hi,

a friend of mine has an internal icecast server and want to distribute an exiting internet stream to it.

For such a task you can use ffmpeg to copy or bridge a stream. ffmpeg can read a stream and can write to a stream.

Example:

michael@debdev ~ # ffmpeg -i https://mp3.internetradio.org/stream.mp3 -acodec libmp3lame -ab 128k -content_type audio/mpeg -f mp3 icecast://source:Password@10.10.100.120:8000/stream 

Or disable metadata map and set your own title

michael@debdev ~ # ffmpeg -i https://mp3.internetradio.org/stream.mp3 -acodec libmp3lame -ab 128k -content_type audio/mpeg -map 0 -map_metadata 0:s:0 -metadata title="My Stream title" -f mp3 icecast://source:Password@10.10.100.120:8000/stream 

This receives a stream from the URL https://mp3.internetradio.org/stream.mp3. reencodes the stream to 128k mp3 and sends it to an icecast server icecast://source:Password@10.10.100.120:8000/stream

Michael

Advertisment to support michlstechblog.info

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.