Icecast Installation and Management

A Guide to Open Source Audio Streaming

Kerry Cox, Ph.D.

IT Security Consultant
Fidelity Investments

Dedication

For my wife, Karen and for our three sons; Calvin, Andrew, and Jacob, and our new daughter Kjerstin. http://gnuware.com/family/.

Table of Contents
Preface
1. Book Topics
2. Audience
3. About This Book
4. About The Author
5. Assumptions This Book Makes
6. Chapter Synopsis
7. A Simple Request
8. To Do Items
9. Acknowledgments
1. Introduction
1.1. What is Icecast?
1.2. Basic Use and Function
1.3. Possible Uses
1.4. Legal Issues
1.5. Example Deployment
1.6. Regarding the Online Version of this Book
2. Audio Fundamentals
2.1. MP3 Basics
2.2. What is "Lossiness"
2.3. Masking Effects
2.3.1. Simultaneous or Auditory Masking
2.3.2. Temporal masking
2.4. Frequencies
2.5. The Encoding Process
2.6. What Are Bitrates?
2.6.1. CBR Versus VBR
2.6.2. Bitrates Versus Samplerates
2.7. Audio Encoding Implementation
2.7.1. Sine Wave Encoding Programs
2.8. Other Considerations
2.8.1. Raw Power
2.8.2. Decoding or Playing Audio Files
2.8.3. Popular Decoders
2.9. The Anatomy of an MP3 File
2.9.1. Within the Header Frame
2.9.2. Decoding the Audio Frame
2.10. ID3 Space
2.11. Frames per Second
3. Getting to Know Icecast
3.1. Hardware Requirements
3.2. Tested Operating Systems
3.3. Testing Environments
3.4. Volume Adjustment
4. Encoding Raw Audio
4.1. Lame Encoding
4.2. Installing LAME
4.2.1. Ogg Vorbis Options
4.3. Command Line LAME
4.4. Lame CLI Options
4.4.1. Input Options
4.5. Other Encoders
4.5.1. Icecast Supported Encoders
4.5.2. Decoders
5. Older Icecast Releases
5.1. Which Version to Use?
5.2. Obtaining the Source
5.2.1. Installing from RPMs
5.2.2. Compiling the Code
5.2.3. Default Settings
5.3. Editing the Icecast Configuration File
5.3.1. Explaining the Configuration File
5.4. Starting the Icecast Server
6. Streaming Utilities for Icecast1
6.1. LiveIce
6.1.1. Included Features
6.1.2. Installing LiveIce
6.1.3. Modifying the LiveIce Syntax
6.1.4. Sample LiveIce Configuration File
6.1.5. Explaining the liveice.cfg Syntax
6.1.6. Automating the Configuration
6.1.7. Running LiveIce
6.2. LiveIce XMMS
6.2.1. Command Line Options
6.3. MuSE
6.3.1. MuSE's Main Interface
7. Installing the Icecast2 Server
7.1. Locating the Icecast2 Source
7.1.1. Using Subversion
7.1.2. Downloading from Subversion
7.1.3. Other Subversion-Hosted Modules
7.1.4. Checking the Libraries
7.1.5. Building the Subversion Code
7.2. Downloading the Icecast Source
7.2.1. Compiling from Source
7.2.2. Creating Directories
7.2.3. Default Icecast2 Directories
7.3. Setting Up Icecast2 for Windows
8. Examining the XML Files
8.1. Icecast2 XML Configuration
8.1.1. An Example icecast.xml File
8.1.2. Icecast2 Configuration Variables
8.1.3. Relay Settings
8.1.4. Mount Specific Settings
8.1.5. Path Settings
8.1.6. Logging Settings
8.1.7. Security Settings
8.2. Ices2 XML Configuration
8.2.1. Live Audio Streaming Configurations
8.2.2. Configuring a Static Playlist Stream
8.2.3. Ices2 Configuration Variables
8.2.4. Stream Settings
8.2.5. Input Modules
8.2.6. Playlist
9. Alternative Streamers
9.1. LiveIce-sn
9.1.1. Installation and Configuration
9.1.2. Randomizing Files in a Playlist
9.1.3. Defining Mountpoints
9.1.4. Streaming
9.2. Ices0
9.2.1. Configuring ices0
9.2.2. Starting the Stream
9.3. DarkIce
9.3.1. Example darkice.cfg Configuration
9.3.2. Starting the DarkIce Streamer
9.4. DarkSnow
9.5. Ezstream
9.5.1. Configuration Settings
9.5.2. Re-encoding ezstream
9.6. LiveIce XMMS
9.7. Oddcast for Linux and Windows
9.7.1. How DSP Plugins Work
9.7.2. Oddcast for Linux
9.7.3. Oddcast for Windows
9.7.4. Ogg Streaming under Windows
10. Running Icecast in an Production Environment
10.1. Starting the Icecast2 Server
10.2. Starting the Ices2 Streamer
10.3. Automating Server and Streamer Startup
10.4. Debugging Issues
10.4.1. Troubleshooting the icecast Server
10.4.2. Troubleshooting the Streamer
10.4.3. Troubleshooting the Client
11. Audio Conversion Tools
11.1. Converting MP3 Files to Ogg Vorbis
11.1.1. Required Components
12. Monitoring the Listening Audience
12.1. Default Methodologies
12.1.1. Monitoring Icecast1 Use
12.1.2. Determining Icecast2 Listenership
12.2. Accessing Stats via the Web
12.2.1. Using Analog
12.2.2. Customizing Webalizer
12.2.3. Implementing awstats with Icecast2
13. Additional Tools and Tips
13.1. Relay Streaming
13.1.1. Enabling Relaying Under Icecast1
13.2. Capturing Streaming Audio to Static Files
13.3. Tips and Tweaks
13.3.1. Spoofing Mime Types
13.4. Scripts
14. Appendix A - Links
14.1. Streaming Audio
14.1.1. Servers
14.1.2. Streamers
14.2. Informative Sites
14.2.1. Developer Sites
15. Appendix B - Glossary
15.1. Technical Terminology
15.1.1. A Terms
15.1.2. B Terms
15.1.3. C Terms
15.1.4. D Terms
15.1.5. E Terms
15.1.6. F Terms
15.1.7. G Terms
15.1.8. H Terms
15.1.9. I Terms
15.1.10. J Terms
15.1.11. L Terms
15.1.12. M Terms
15.1.13. N Terms
15.1.14. P Terms
15.1.15. Q Terms
15.1.16. R Terms
15.1.17. S Terms
15.1.18. T Terms
15.1.19. V Terms
16. Appendix C - Sample Icecast and Ices Configuration Files
16.1. Icecast
16.1.1. Sample icecast1 icecast.conf Configuration File
16.1.2. Sample icecast2 icecast.xml Configuration File
16.2. Ices
16.2.1. Sample ices.xml Configuration File
17. Appendix D - Legal Limitations and Information Regarding Audio Streaming
17.1. Understanding the Legal Implications
17.1.1. The Basics
17.1.2. The New Law
17.1.3. Analysis Model
17.1.4. Online Music