Examples usage of various codecs with FFMpeg.
- flac.sh : An Icecast Source Client
- for Windows (Cygwin is required)
- and macOS (
brew install ffmpeg
)
- another_examples.sh : Samples
- FFMpeg can push to Icecast2 in various formats: Opus/Vorbis/AAC/MP3
- this script shows optimal format, container and codec combinations.
- Recommended settings for stable streaming with good quality:
- HE-AAC (aac_he): 48k-64k
- HE-AACv2 (aac_he_v2): 32k-48k
- LC-AAC VBR 3-4
- Higer is good quality, increases bitrate
- if you want to use CBR, set 96k-128k. (not recommended)
- Opus VBR 48k-64k
- CBR is not recommended
- Vorbis q3
- Higer is good quality, increases bitrate
- MP3 V6-V4
- Lower is good quality, increases bitrate
- if you want to use CBR, set 128k-160k
@edenzul
I have been trying the same idea for the same motivation and wrote about my findings in this Gist.
As it turns out, reducing latency with Icecast2 is probably not easy.

Even if you reduce the VLC buffer as shown in the image, there will still be latency, and synchronization will drift.
Opus and Speex have much less delay in encoding and decoding, but the delay is not only caused by encoding and decoding, but also by the buffers on Icecast2 and VLC.
( https://wiki.hydrogenaud.io/index.php?title=Opus#Lower_latency_versus_quality.2Fbitrate_trade-off )
Icecast2 and VLC are implemented with an approach that requires stable sound quality, which is incompatible with low latency applications. VoIP-related software such as Discord or mumble would be better for that application.
I have not used them, but there is a software called VBAN or SonoBus.
There are other open standards, but I don't have much information on them.
https://en.wikipedia.org/wiki/Audio_over_Ethernet#Layer-3_protocols