Skip to content

Instantly share code, notes, and snippets.

aki77.haml-lint
aki77.rails-routes
alexkrechik.cucumberautocomplete
AndrewFridley.Breeze-Dark-Theme
asux.rspec-focus
auchenberg.vscode-browser-preview
bimbo-factorybot-snippets.bimbo-factorybot-snippets
bung87.rails
bung87.vscode-gemfile
christian-kohler.npm-intellisense

This is a quick set-up guide on how to install Icecast for Mp3 and Ogg streaming, sort of online radio. Tested on Debian Wheezy. Probably works on Ubuntu, etc. Icecast is a "server-like". It offers the HTTP URL/port through which end-users can play the media. However, Icecast itself does not serve the files. It must get its input from other "client-like" software. For example, Ices0 sends mp3 input to Icecast and then Icecast delivers to the end user. Similarly, Ices2 sends ogg input to Icecast and then Icecast delivers to the end user.

Set up icecast

Start by installing:

sudo apt-get install icecast2
# 1. Install mplayer command line (via Brew, Macports, or APT)
# 2. Add the following aliases to ~/.profile
# 3. Type `source ~/.profile`
# 3. Type `news` or `current` to listen in your terminal
alias news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News
alias current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current
alias classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR
alias localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current
alias heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland
irb(main):001:0> require 'RMagick'
=> true
irb(main):002:0> i = Magick::Image.ping('test.jpg').first
=> test.jpg JPEG 1600x1084 1600x1084+0+0 DirectClass 8-bit 485kb
irb(main):003:0> i.grey?
=> true
irb(main):004:0> i.colorspace
=> RGBColorspace=1
irb(main):005:0> i = Magick::Image.read('test.jpg').first
i=> test.jpg JPEG 1600x1084 1600x1084+0+0 DirectClass 8-bit 485kb