Do you want to stream your own radio shows/gameplays/music mixing live on the Internet? If you do, then continue reading this article. We will use software called Icecast2 on the server side and broadcast to it and listen from it from anywhere in the world. You will need a Linux server for this procedure.
A Linux based server and
Internet access with enough bandwidth for streaming and ability to open ports.
Server side software installation - Icecast2
Icecast is used for a lot of things, for example to stream video or audio to the Internet. We will install the server application which can be
controlled from the web interface later on. Installation is very simple. You have to type
sudo apt install icecast2 screen in your Debian based Linux server shell
to install all needed software for the streaming purpose.
screen is used to run multiple ssh terminals in background and quickly switch between them and keep them
running even if you log out of the ssh. When installing, you will be prompted to enter passwords and hostname. For hostname enter your domain/ip in format example.com/184.108.40.206 that
can be accessed from the Internet. For passwords use all different passwords for better security.
icecast2 is installed, use
sudo nano /etc/icecast2/icecast2.xml
to edit your icecast config. First change Location and Admin email to whatever you like and after some scrolling, you will find Port setting. Use a port that is not yet used and open it in
your routers settings and remember it. In the end of the file you will see User:Group section. Set group and username to
icecast. Then find error log setting and set the error log
path to /home/icecast. This is where the logs will be saved.
Exit and save the file by using Ctrl+X and Y.
adduser icecast to add a new user to your sistem and set a complex password.
The last thing you have to do is to start a new screen session by typing
screen. Run the command
icecast2 -c /etc/icecast2/icecast.xml to start
your icecast server and then exit from the screen session using Ctrl+A,D. To later reattach to that screen session, use
screen -R. If your port is open, open a
web browser on your computer and go to http://yourdomain.tld:port/. If you see Icecast2 server Info page you are good to go.
Audio source configuration
In your streaming program (Mixxx DJ program in this example) open Preferences and find Streaming settings. Choose Icecast2 as stream type, source as username, password you have specified for the source during the installation and for server Host use IP/DOMAIN:PORT you have specified in the installation. Also make sure to enter a mountpoint, for the sake of the example I will just use dj. Then use any audio format, compatible with the listeners player and apropriate bandwidth. Then start streaming and play some music. Visit server info page in your web browser again to see if your stream has popped up. It should and then everything is set up for the server and broadcaster part.
To brodadcast video, use some other software like OBS, the setup will be similar.
Your listeners will have to open a web browser and navigate to http://yourDomainOrIP:Port/MountPoint and they will hear your stream. If it is a video stream, they will also see the image.
Thanks for reading this article. If you like my posts, please subscribe to my blog and you will get notified for future posts. Subscription form can be found under this text.