Your own web radio, with a few easy steps

Your own web radio, with a few easy steps

Thanks to internet, today is very easy to have Your own online media.

In this article, I'll share my experience so far with my online radio.

First off all, we have to choose some computer. In my case, this DELL Optiplex 460 with dual core CPU Intel/ 64 bit, 4 GB of RAM, 256 GB-Hard disk, Lan port 1 Gbit?~about 80 euro.

Second this is operating system - UBUNTU - 18.04 / 64 bit, I choose this Linux distribution, because is very well supported and very easy for configuration.

Now, let's have a look, how is working this model by block diagram :

|Audio Player| ->|Encoder|-> |Broadcast service|->|Public Host|->|Internet|

The most easy way, to have audio player with pre-enabled encoder, to use something easy and user friendly. This is well known, open-source, inter-system compatible, very popular among DJ's - Mixxx.

In my case, for encoding format, I choose .ogg and this encoder is built inside in the player.

Let's install Mixxx on UBUNTU:

sudo add-apt-repository ppa:mixxx/mixxx

sudo apt-get update

sudo apt-get install mixxx

Or, if You decide to uninstall:

sudo apt-get remove --autoremove mixxx
        

The next think is to test the player. Just type in Terminal:

plyaer@stream: mixxx
        

The player is open and ready. Add some music in the library and play, check the sound and functions. Configurations, settings and the playlist, I will not comment, because there is brilliant "how-tos" on the Mixxx web portal. Just the setting for the broadcast with server I'll show below.

It's time to install the service for public broadcast. I choose Icecast.

Icecast is a free media streamer that support popular streams like Ogg (Vorbis and Theora), Opus, WebM and MP3… You can use Icecast to stream your media from your computer or server and provide ubiquitous access to your music anywhere over the Internet…

Icecast comes with support for Ubuntu out of the box…. Simply run the?apt-get command on Ubuntu to install Icecast packages easily with little to no configuration…

To install Icecast on Ubuntu, run the commands below:

sudo apt update
sudo apt install icecast2
        


During the installation, you’ll be prompted whether to install automatically with its default configuration, choose Yes and continue.

───┤ Configuring icecast2 ├──────────────────────────┐
 │                                                                           │ 
 │ Choose this option to set up passwords for Icecast2. Until these are      │ 
 │ configured the server will not be activated.                              │ 
 │                                                                           │ 
 │ You should not use this option if you have already manually tweaked the   │ 
 │ configuration of Icecast2.                                                │ 
 │                                                                           │ 
 │ Configure Icecast2?                                                       │ 
 │                                                                           │ 
 │                <Yes>                       <No>                           │ 
 │                                                                           │ 
 └───────────────────────────────────────────────────────────────────────────┘ 
        

Specify the server hostname name and continue (in my case, the name of the machine is "stream") :

───────┤ Configuring icecast2 ├─────────────────────────┐
  │ Please specify the fully qualified domain name that should be used as   │ 
  │ prefix to all streams.                                                  │ 
  │                                                                         │ 
  │ Icecast2 hostname:                                                      │ 
  │                                                                         │ 
  │ localhost______________________________________________________________ │ 
  │                                                                         │ 
  │                         <Ok>                                            │ 
  │                                                                         │ 
  └─────────────────────────────────────────────────────────────────────────┘ 
                                                                              
        

After that, type in the user and superadmin password to access the backend.

Once Icecast is installed, you can run the commands below to start and enable Icecast service to always start up when the server boots up:

sudo systemctl start icecast2
sudo systemctl enable icecast2
        

To check the service status, run the commands below:

sudo status icecast2

        

You should see similar lines as below:

● icecast2.service - LSB: Icecast2 streaming media server
   Loaded: loaded (/etc/init.d/icecast2; generated)
   Active: active (running) since Tue 2019-04-02 10:37:10 CDT; 1min 44s ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 4 (limit: 4683)
   CGroup: /system.slice/icecast2.service
           └─2224 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml

Apr 02 10:37:10 ubuntu1804 systemd[1]: Starting LSB: Icecast2 streaming media server...
Apr 02 10:37:10 ubuntu1804 icecast2[2219]:  * Starting streaming media server icecast2
Apr 02 10:37:10 ubuntu1804 icecast2[2219]: [2019-04-02  10:37:10] WARN CONFIG/_parse_root Warning,
        

Finally, open your browser and browse to the server name or IP address followed by port?8000

https://localhost:8000/

You should see Icecast default page ( I changed the port to 8004):

If you want to configure Icecast, open its configuration file by running the commands below:

sudo nano /etc/icecast2/icecast.xml
        

Then make your changes and save. For example, to change the default port, update the highlighted port and save.

<hostname>localhost</hostname>
<!-- You may have multiple <listener> elements -->
<listen-socket>
<port>8000</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>
        

The default username is?admin, and the password is what you type when installing Icecast.

By default the Icecast process is run as the root user. To improve security it is strongly advised that you run it as a dedicated user with less powerful privileges. You can specify this user by setting the?changeowner?in the security section of the configuration file?/etc/icecast2/icecast.xml.

Once Icecast Server correctly, use any of the compatible Icecast Clients or source client to transmit audio to Icecast Server and to all the listeners.

At last but not least, there is a importing setting for broadcast in Mixxx player:

In Preferences, the last section - Live Broadcasting, 1st- choose from the drop-down menu 'Icecast 2' , 2nd - Host, just type 127.0.0.1, 3rd - login/password=admin/your pass, 4th -mount '/listen.ogg', 5th-Port, by default 8000, 6th - check the "Public sream", fill up the stream (radio) name, your website, Description and Genre, 7th - Bitrate -leave it 128kbps, Format-Ogg Vorbis, Channels-Stereo, 8th- Now check on the top-left corner "Enable live broadcasting" and click "OK" !

If all settings are correct in Preferences section on Mixxx and Your Icecast server is runing succesfully, You may hit the play button and there will be system notification for connection with Icecast server. Also, from another host - tablet, computer, phone on the same network, You may check Your server and try to play music from the browser.

Et voila: https://shorturl.at/chBD5

MPX Web Radio - Planet



Brazilian project for various music online, with various bitrate -64kb/s, 128kb/s, 256kb/s.

!NB1: The Internet parameters, should be at least 50Mb with static IP address !

!NB2: The computer on the local LAN, should be with static IP address !

!NB3: On the router, do the NAT for internal IP address and port !

!NB4: Check Your external IP and port !

!NB5: This example, fully cover the OSI, SaaS, PaaS? model.

Normally, everything should work normally. Also, if You would like to have publicity and popularity, the design for the web-player should be advanced and etc.


Best of luck, to everyone who will give a try to this model !

...coming soon "OwnCloud" :)





要查看或添加评论,请登录

Plamen Pankov的更多文章

  • Personal Cloud Service

    Personal Cloud Service

    Well, it seems today, the service so called "cloud technology" is very popular, because of mobile devices -…

社区洞察

其他会员也浏览了