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
@mrx23dot Are you running ffmpeg multiple times? If you're actually trying to make an internet radio station, it may make more sense to use a tool like Mixxx which is meant for doing that.
@keiya For low latency, the manpage for ffmpeg says it has support for the Real-Time Messaging Protocol (RTMP). I use
mpv
to play rtmp streams, sovlc
should also work. If RTMP isn't what you want, ffmpeg also supports a bunch of other live-streaming formats: Real-Time Streaming Protocol (RTSP), Secure Reliable Transport (SRT), Real-Time Transport Protocol (RTP), and HTTP Live Streaming (HLS). The only notable absence is WebRTC.The manpage gives some examples of how to use RTMP:
Protocol syntax
rtmp://[username:password@]server[:port][/app][/instance][/playpath]
To publish to a password protected server, passing the playpath and app names separately:
To read with ffplay a multimedia resource named "sample" from the application "vod" from an RTMP server "myserver":