Internet radio device

    In the article, I will finally tell you how our radio station is arranged from the inside. We will talk about the main programs used and the general approach to the organization of round-the-clock broadcasting with the possibility of direct inclusion. So what is an internet radio station? This is a hardware-software complex that forms some kind of sound result. In our case, this is music, screensavers, live broadcasts. Listeners can connect to the stream with their favorite music player or listen from the site.






    The easiest way to tell from the end, from the audience. The listeners connect to the server-mounted daemon broadcasting icecast2 (hereinafter simply icecast), which distributes a ready-made mp3 stream to everyone. At the same time, another program is responsible for the formation of the mp3 stream, icecast can only switch between incoming streams.

    In our case, in normal mode, icecast broadcasts a stream that forms ices. If the host joins the icecast to conduct a live broadcast, the icecast automatically switches to it, as a more priority stream. By the way, at the same time, the ices module works in parallel and does not know anything about what has happened, that is, it continues to form its own background stream. This, incidentally, can be used (and used) by the presenter and relay it through himself, mixing to the voice and talking in pauses, but this is the topic of the last article.

    Icecast2: live broadcasts and thread switching
    Generally speaking, Icecast2 is such a multiplexer, it has several input streams between which it switches and there are listeners to whom it distributes the result.

    How the live broadcast works is clear: a well-formed stream should go from the host, which icecast will distribute to listeners. If this stream is absent, then icecast will broadcast the main stream formed by ices, about which below.

    Despite the seemingly rather simple purpose, icecast has a number of uniquely interesting possibilities, with which you can greatly facilitate your life and diversify the work of the station.

    For example, icecast allows you to assign scripts to switch flows. It is these scripts that start broadcasting messages on a radio twitter and start recording automatically, and when the live broadcast ends, the recording is automatically transferred to the proper place, rss is updated, and the message about the recording appears on Twitter.

    Such things make the radio, among other things, also convenient for listeners: it is easy to get on the air, even if it is not planned, and if you missed it, listen to it in podcast mode.

    ices + ardj: main broadcasting
    When there is no presenter, the radio plays music, jingles and micropodcasts; ices does all of this with the powerful support of ardj.

    Ices is engaged in decoding mp3 or ogg files, forming a ready-to-relay continuous stream, inside it there is a partial mixing of tracks (cross-fade).

    In general, ices have two main modes of operation:
          1) play music on a given playlist
          2) call an external script that says what to play.

    The first option is quite boring, we use the second: ardj is responsible for the formation of the ether. When the next song comes to an end, ices calls ardj, which returns it the name of the file with the next song or splash screen, which should now be played.

    ardj is an invention of umonkey , a separate article, or even a book, should be devoted to the logic of ardj, but in short, it can:
        - ratings: we can vote for music;
        - tags;
        - playlists;
        - prerolls: before the songs you can make screensavers from musicians,
        - the playback queue (takes precedence over playlists, is controlled by people).

    Accumulated votes for or against songs allow you to calculate conditionally “good” and “bad” music, this rating affects the frequency of rotation, there is a special time when sucks are played - candidates for removal from the rotation in general, and after 13:00, music with a higher rating is played which is just nice to listen to.

    All these features of ardj make it possible to organize a radio station close to real life: for example, play something fun in the morning and only calm music at night, dilute the whole thing with jingles, during the day, for example, we have an hour of micropodcasts and so on (our broadcasting grid ) .

    Administrators and regular users can interfere with ardj by sending messages to the jabber bot.

    Instead of a conclusion
    “I also have a radio” is heavily involved in open source ideas and plays free music, which we are all pretty familiar with, and the voting system allows you to build a digestible broadcast and find interesting free music.

    The described approach, of course, is just one of the possible ones and it only claims to show how an operating Internet radio station can be arranged.

    Also popular now: