Skip to content

Instantly share code, notes, and snippets.

@kfatehi
Created June 5, 2016 03:42
Show Gist options
  • Save kfatehi/aafb8c6b1f8a0e7d1020d98bcd420f00 to your computer and use it in GitHub Desktop.
Save kfatehi/aafb8c6b1f8a0e7d1020d98bcd420f00 to your computer and use it in GitHub Desktop.
Rebroadcasting an icecast stream to another icecast server with inline transcoding

What?

A one-liner that pulls an AAC stream, pipes it into ffmpeg which transcodes it to mp3, then pipes it into ezstream with your settings (in the xml file) which streams it your radio.

Dependencies

sudo apt-get install ficy ffmpeg ezstream

<ezstream>
<url>http://zeno.link.radiojar.com:80/your-mount-point</url>
<sourcepassword>your-password</sourcepassword>
<format>MP3</format>
<filename>stdin</filename>
</ezstream>
fIcy http://example.org/somestream | ffmpeg -i pipe: -f mp3 - | ezstream -c ezstream-config.xml
@bobular
Copy link

bobular commented Mar 21, 2020

This is brilliant - saved us in a lockdown party (Traktor only streams in Ogg Vorbis, Apple devices can't handle it... still after 15+ years...).

Thank you!

Adding the bitrate to the ffmpeg command has to be after the pipe: so it's

ffmpeg -i pipe: -ab 192k -f mp3 -

The default for me seemed to be 96k which I could hear the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment