Difference between revisions of "Icecast: feeding menggunakan ezstream"

From OnnoWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
==Instalasi Ezstream==
 
==Instalasi Ezstream==
  
  apt-get install ezstream
+
sudo su
 +
  apt-get install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad \
 +
gstreamer0.10-plugins-ugly ezstream
  
 +
di Ubuntu 20.04
 +
 +
sudo apt-get install -y ezstream
  
 
==Membuat Playlist==
 
==Membuat Playlist==
Line 10: Line 15:
 
Cara yang paling gampang misalnya
 
Cara yang paling gampang misalnya
  
  find /var/data/album/lagu/pop-barat/ -name *mp3 -type f > /var/data/album/playlist-onno.txt
+
  find /var/data/album/lagu/pop-barat/ *mp3 -type f > /var/data/album/playlist-onno.txt
 +
find /home/onno/Music/ *mp3 -type f > /home/onno/Music/playlist-onno.txt
  
 
==Konfigurasi Ezstream==
 
==Konfigurasi Ezstream==
Line 22: Line 28:
 
  cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml ~
 
  cp /usr/share/doc/ezstream/examples/ezstream_mp3.xml ~
 
  cd ~
 
  cd ~
 +
chmod -Rf 644 ezstream_mp3.xml
 
  gedit ~/ezstream_mp3.xml
 
  gedit ~/ezstream_mp3.xml
  
Line 35: Line 42:
 
     <sourcepassword>hackme</sourcepassword>
 
     <sourcepassword>hackme</sourcepassword>
 
     <format>MP3</format>
 
     <format>MP3</format>
     <filename>/var/data/album/playlist-onno.txt</filename>
+
     <filename>/home/onno/Music/playlist-onno.txt</filename>
 
     <!-- Once done streaming playlist.m3u, exit: -->
 
     <!-- Once done streaming playlist.m3u, exit: -->
 
     <stream_once>1</stream_once>
 
     <stream_once>1</stream_once>
Line 57: Line 64:
 
  </ezstream>
 
  </ezstream>
  
 +
url adalah lokasi server. Disini digunakan localhost karena icecast2 berjalan di mesin yang sama. onnoradio bisa di ubah ke nama lain. Alamat lengkap http://localhost:8000/onnoradio
 +
sourcepassword sesuai dengan settingan di file konfigurasi icecast2.
 +
filename adalah lokasi dari playlist, bisa relatif terhadap file konfigurasi atau absolut.
 +
stream_once set ke 0 untuk looping. Set ke 1 untuk di jalankan sekali.
 +
svrinfopublic set ke 0 untuk menjaga agar stasiun radio kita tidak masuk ke halaman kuning icecast.
  
 +
==Menjalankan 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.
+
Jalankan streaming menggunakan
    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.
+
ezstream -c ~/ezstream_mp3.xml
  
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:
+
Arahkan client musik seperti totem / rhythmbox / audacious / bhanshee ke http://your-server-or-ip-adres.org:8000/onnoradio (atau ke alamat server anda) dan start mendengarkan.
  
kill -10 `pidof ezstream`
+
Jika mesin server di booting dan kita ingin agar tetap jalan maka masukan ke
 
Happy broadcasting. And keep it legal, will you?
 
  
 +
/etc/rc.local
  
  
Line 99: Line 92:
  
 
* [[IceCast]]
 
* [[IceCast]]
 +
* [[icecast]]
 +
* [[icecast: instalasi]]
 +
* [[icecast: konfigurasi dasar]]
 +
* [[icecast: feeding menggunakan ezstream]]
 +
* [[IceCast: Live Stream]]
 +
* [[icecast: Live stream menggunakan internet DJ console]]
 +
* [[Multimedia di Linux]]

Latest revision as of 08:56, 5 June 2021

Ezstream adalah program Command Line untuk mengirimkan stream ke icecast.

Instalasi Ezstream

sudo su
apt-get install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-plugins-bad \
gstreamer0.10-plugins-ugly ezstream

di Ubuntu 20.04

sudo apt-get install -y ezstream

Membuat Playlist

Cara yang paling gampang misalnya

find /var/data/album/lagu/pop-barat/ *mp3 -type f > /var/data/album/playlist-onno.txt
find /home/onno/Music/ *mp3 -type f > /home/onno/Music/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 ~
chmod -Rf 644 ezstream_mp3.xml
gedit ~/ezstream_mp3.xml

Contoh

<ezstream>
    <url>http://localhost:8000/onnoradio</url>
    <sourcepassword>hackme</sourcepassword>
    <format>MP3</format>
    <filename>/home/onno/Music/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 adalah lokasi server. Disini digunakan localhost karena icecast2 berjalan di mesin yang sama. onnoradio bisa di ubah ke nama lain. Alamat lengkap http://localhost:8000/onnoradio
sourcepassword sesuai dengan settingan di file konfigurasi icecast2.
filename adalah lokasi dari playlist, bisa relatif terhadap file konfigurasi atau absolut.
stream_once set ke 0 untuk looping. Set ke 1 untuk di jalankan sekali.
svrinfopublic set ke 0 untuk menjaga agar stasiun radio kita tidak masuk ke halaman kuning icecast.

Menjalankan Ezstream

Jalankan streaming menggunakan

ezstream -c ~/ezstream_mp3.xml

Arahkan client musik seperti totem / rhythmbox / audacious / bhanshee ke http://your-server-or-ip-adres.org:8000/onnoradio (atau ke alamat server anda) dan start mendengarkan.

Jika mesin server di booting dan kita ingin agar tetap jalan maka masukan ke

/etc/rc.local


Referensi

Pranala Menarik