Difference between revisions of "Icecast: feeding menggunakan ezstream"

From OnnoWiki
Jump to navigation Jump to search
Line 8: Line 8:
 
==Membuat Playlist==
 
==Membuat Playlist==
  
 +
Cara yang paling gampang misalnya
  
Your online radio station is up, but isn't yet broadcasting anything. That's the task of ezstream. If icecast2 won't start, check the logs in /var/log/icecast2 for clues.
+
find /var/data/album/lagu/pop-barat/ -name *mp3 -type f > /var/data/album/playlist-onno.txt
Configure ezstream and create playlist
 
  
Ezstream will be feeding the icecast2 streaming media server with mp3's or ogg music files. First, put together a selection of mp3's and make a playlist text file with the full path to a mp3 files on single lines. An easy way to do this from the command line is:
+
==Konfigurasi Ezstream==
  
find /home/wim/ -name *mp3 -type f > /home/wim/playlist-armin.txt
+
Ada banyak contoh konfigurasi Ezstream
  
This will find all mp3's in the home directory of user wim and dumps the output in the file playlist-armin.txt. The -type f makes sure that find only returns files and not directories.
+
ls /usr/share/doc/ezstream/examples
 +
 
 +
Disini kita menggunakan ezstream_mp3.xml
 +
 
 +
cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml ~
 +
cd ~
 +
gedit ~/ezstream_mp3.xml
 +
 
 +
Contoh
 +
 
 +
<ezstream>
 +
    <url>http://localhost:8000/onnoradio</url>
 +
    <!--
 +
      If a different user name than "source" should be used, set it in
 +
      <sourceuser/>:
 +
      -->
 +
    <!-- <sourceuser>mr_stream</sourceuser> -->
 +
    <sourcepassword>hackme</sourcepassword>
 +
    <format>MP3</format>
 +
    <filename>/var/data/album/playlist-onno.txt</filename>
 +
    <!-- Once done streaming playlist.m3u, exit: -->
 +
    <stream_once>1</stream_once>
 +
    <!--
 +
      The following settings are used to describe your stream to the server.
 +
      It's up to you to make sure that the bitrate/samplerate/channels
 +
      information matches up with your input stream files. Note that
 +
      <svrinfoquality /> only applies to Ogg Vorbis streams.
 +
      -->
 +
    <svrinfoname>My Stream</svrinfoname>
 +
    <svrinfourl>http://www.oddsock.org</svrinfourl>
 +
    <svrinfogenre>RockNRoll</svrinfogenre>
 +
    <svrinfodescription>This is a stream description</svrinfodescription>
 +
    <svrinfobitrate>128</svrinfobitrate>
 +
    <svrinfochannels>2</svrinfochannels>
 +
    <svrinfosamplerate>44100</svrinfosamplerate>
 +
    <!--
 +
      Prohibit the server to advertise the stream on a public YP directory:
 +
      -->
 +
    <svrinfopublic>0</svrinfopublic>
 +
</ezstream>
  
Next, copy one of the example config files from /usr/share/doc/ezstream/examples to your home directory and open the file in your favorite editor. I chose ezstream_mp3.xml. An example file is attached at the end of this post. Make the following changes.
 
  
<ezstream>
 
<url>http://localhost:8000/armin</url>
 
<sourcepassword>hccsecret</sourcepassword>
 
<format>MP3</format>
 
<filename>/home/wim/playlist-armin.txt</filename>
 
<stream_once>0</stream_once>
 
<svrinfoname>HCC streaming radio</svrinfoname>
 
<svrinfourl>http://koorenneef.nl</svrinfourl>
 
<svrinfogenre>Dance</svrinfogenre>
 
<svrinfodescription>A State Of Trance Radio</svrinfodescription>
 
<svrinfobitrate>320</svrinfobitrate>
 
<svrinfochannels>2</svrinfochannels>
 
<svrinfosamplerate>44100</svrinfosamplerate>
 
<!-- No advertising on a public YP directory -->
 
<svrinfopublic>0</svrinfopublic>
 
</ezstream>
 
  
 
     url is the location of your server (localhost since ezstream is running on the same machine as icecast2) followed by the name of your feed. This can be anything and I chose armin. In a moment, after ezstream is feeding mp3's to the icecast2 server, your listeners can point their clients to http://your-server-or-ip-adres:8000/armin to hear the music.
 
     url is the location of your server (localhost since ezstream is running on the same machine as icecast2) followed by the name of your feed. This can be anything and I chose armin. In a moment, after ezstream is feeding mp3's to the icecast2 server, your listeners can point their clients to http://your-server-or-ip-adres:8000/armin to hear the music.
Line 45: Line 67:
 
The last thing to do is start ezstream and start broadcasting to the world!
 
The last thing to do is start ezstream and start broadcasting to the world!
  
ezstream -c /home/wim/ezstream_mp3.xml
+
ezstream -c /home/wim/ezstream_mp3.xml
  
 
Now, point a music client like totem, rhythmbox or audacious to http://your-server-or-ip-adres.org:8000/armin (or where ever your server is located) and start listening.
 
Now, point a music client like totem, rhythmbox or audacious to http://your-server-or-ip-adres.org:8000/armin (or where ever your server is located) and start listening.
Line 55: Line 77:
 
     icescast2: http://www.icecast.org/
 
     icescast2: http://www.icecast.org/
 
     ezstream: http://www.icecast.org/ezstream.php
 
     ezstream: http://www.icecast.org/ezstream.php
 +
 +
==Tip==
  
 
Tip 1: If your server is behind a router, don't forget to configure port forwarding or your router will block all requests to port 8000.
 
Tip 1: If your server is behind a router, don't forget to configure port forwarding or your router will block all requests to port 8000.
Line 69: Line 93:
  
 
* http://koorenneef.nl/content/run-your-own-online-radio-station-icecast2-and-ezstream-howto
 
* http://koorenneef.nl/content/run-your-own-online-radio-station-icecast2-and-ezstream-howto
 +
* http://www.icecast.org/ - tentang icecast2
 +
* http://www.icecast.org/ezstream.php
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 
* [[IceCast]]
 
* [[IceCast]]

Revision as of 19:04, 17 July 2011

Ezstream adalah program Command Line untuk mengirimkan stream ke icecast.

Instalasi Ezstream

apt-get install ezstream


Membuat Playlist

Cara yang paling gampang misalnya

find /var/data/album/lagu/pop-barat/ -name *mp3 -type f > /var/data/album/playlist-onno.txt

Konfigurasi Ezstream

Ada banyak contoh konfigurasi Ezstream

ls /usr/share/doc/ezstream/examples

Disini kita menggunakan ezstream_mp3.xml

cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml ~
cd ~
gedit ~/ezstream_mp3.xml

Contoh

<ezstream>
    <url>http://localhost:8000/onnoradio</url>
    <sourcepassword>hackme</sourcepassword>
    <format>MP3</format>
    <filename>/var/data/album/playlist-onno.txt</filename>
    <stream_once>1</stream_once>
    <svrinfoname>My Stream</svrinfoname>
    <svrinfourl>http://www.oddsock.org</svrinfourl>
    <svrinfogenre>RockNRoll</svrinfogenre>
    <svrinfodescription>This is a stream description</svrinfodescription>
    <svrinfobitrate>128</svrinfobitrate>
    <svrinfochannels>2</svrinfochannels>
    <svrinfosamplerate>44100</svrinfosamplerate>
    <svrinfopublic>0</svrinfopublic>
</ezstream>


   url is the location of your server (localhost since ezstream is running on the same machine as icecast2) followed by the name of your feed. This can be anything and I chose armin. In a moment, after ezstream is feeding mp3's to the icecast2 server, your listeners can point their clients to http://your-server-or-ip-adres:8000/armin to hear the music.
   sourcepassword is the password we set in the icecast2 config file.
   filename is the location of our playlist, relative to the config file or an absolute path.
   stream_once is set to 0 to keep repeating the playlist. Set to 1 of you only want to play your list once.
   svrinfopublic is set to 0 to prevent your radio station from being published on the public yellow pages of icecast.

The last thing to do is start ezstream and start broadcasting to the world!

ezstream -c /home/wim/ezstream_mp3.xml

Now, point a music client like totem, rhythmbox or audacious to http://your-server-or-ip-adres.org:8000/armin (or where ever your server is located) and start listening.

You may want to autostart ezstream after a reboot by adding a command to /etc/rc.local.

There is more info available at

   icescast2: http://www.icecast.org/
   ezstream: http://www.icecast.org/ezstream.php

Tip

Tip 1: If your server is behind a router, don't forget to configure port forwarding or your router will block all requests to port 8000.

Tip 2: If for some reason you want to skip to the next song in your playlist, execute the following command and send the SIGUSR1 signal to the running ezstream process:

kill -10 `pidof ezstream`

Happy broadcasting. And keep it legal, will you?


Referensi

Pranala Menarik