มาทำสถานีวิทยุออนไลน์กัน

เตรียมตัวกันก่อน หากคุณใช้ Windows และต้องการให้ Windows ของคุณเป็น broadcaster ให้ดาวน์โหลด SHOUTcast สำหรับ Windows มาติดตั้ง ผมไม่ขอพูดถึง Windows นะครับ สำหรับ Linux ก้อดาวน์โหลดเวอร์ชั่นสำหรับ Linux มาครับ ที่ http://www.shoutcast.com/downloads/sc1-9-8/sc_serv_1.9.8_Linux.tar.gz เมื่อได้ไฟล์มาแล้วให้คลี่ไฟล์ sc_serv_1.9.8_Linux.tar.gz ออกมาด้วยคำสั่ง

#mkdir /opt/sc_serv
#tar zxvf sc_serv_1.9.8_Linux.tar.gz -C /opt/sc_serv

จากนั้นแก้ไขข้อมูลใน sc_serv.conf ในส่วน Requirement ได้แก่

MaxUser เป็นการกำหนดจำนวนผู้ฟังมากที่สุดกี่คน มีวิธีการคำนวณง่ายๆ คือ ถ้าคุณใช้ ADSL 256kbps และ broadcast เพลงที่ 24kbps ให้กำหนดจำนวน MaxUser = 256kbps/24kbps = 10 คน ที่ต้องกำหนดเช่นนี้เพราะต้องการไม่ให้ช่องสัญญาณ busy เกินไปและให้จำนวนคนฟังเหมาะสมกับขนาดของข้อมูลที่ส่งไปด้วย

Password ในส่วนนี้เป็นการกำหนดรัสผ่านสำหรับ streamer ที่ต้องการส่ง stream มายัง broadcaster นี้
PortBase กำหนด port ที่จะใช้ในการสื่อสารค่าปริยายคือ 8000 หากต้องการเปลี่ยนให้กำหนดตัวเลขสูงกว่า 1024 ครับ

เมื่อพร้อมแล้วก้อ start broadcaster ของเราได้แล้วโดยใช้คำสั่ง

#/opt/sc_serv/sc_serv &

กลับมาเตรียมโปรแกรมส่ง stream ของเราครับ หาท่านใช้ Winamp บน Windows ดาวน์โหลด Plug-In ไปติดตั้งได้เลยครับ และพร้อมส่งได้เลยเมื่อคุณเล่นไฟล์เพลง หากเป็น Linux, Mac และอื่นๆ ต้องใช้้ sc_trans ซึ่งเป็นตัวส่ง stream บน Linux ดาวน์โหลดได้ที่ http://www.shoutcast.com/downloads/sc_trans_posix_040.tgz เมื่อได้ไฟล์มาแล้ว คลี่ไฟล์ออกโดยใช้คำสั่ง

#tar zxvf sc_trans_posix_040.tgz -C /opt

แก้ไขไฟล์ sc_trans.conf ดังนี้

PlaylistFile คือ ไฟล์รายการเพลงที่ต้องการเล่นและส่งข้อมูลไปให้ broadcaster ค่าปริยายคือ example.lst ให้คุณแก้ไขเป็นชื่อของคุณเองครับ เช่น playlist.lst เป็นต้น

ServerIP คือ domainname หรือ IP Address ของตัว broadcaster
ServerPort คือ หมายเลขพอร์ตที่ใช้ในการสื่อสาร ค่าปริยายคือ 8000

StreamTitle คือ ชื่อรายการ streaming ของคุณครับ เช่น DJ Ja Ja
StreamURL คือ URL ที่ผู้ฟังจะฟัง stream ของคุณได้ เช่น http://radio.dj-jaja.com:8000
Genre คือแนวเพลงของคุณ เช่น Rock, POP, R&B เป็นต้น

Shuffle คือกำหนดให้สุ่มเล่นเพลง ค่าปริยายเป็น 1 หากไม่ต้องการสุ่มเล่นเพลงให้ใส่ 0 ครับ

Bitrate คือจำนวนบิตในการส่ง ค่าปริยายคือ 8000 (8kbps)
SampleRate คือสัญญาณเสียง ค่าปริยายคือ 11025 (11Khz)
Channels คือจำนวน Channel ค่าปริยายคือ 1 (Mono)

มีค่าสำเร็จมาให้แล้วดังนี้
ี้
; Bitrate/SampleRate/Channels recommended values:
; 8kbps 8000/11025/1
; 16kbps 16000/11025/1
; 24kbps 24000/22050/1
; 32kbps 32000/22050/1
; 64kbps mono 64000/44100/1
; 64kbps stereo 64000/22050/2
; 96kbps stereo 96000/44100/2
; 128kbps stere0 128000/44100/2

Qulity คือกำหนดค่าคุณภาพเสียง 1-10 หมายเลข 1 คือดีที่สุด ส่วน 10 ก้อแย่สุด

CrossfadeMode กำหนดให้เล่น crossfade ค่าปริยายคือ 1
CrossfadeLength ช่วงในการ crossfade ค่าปริยายคือ 800ms

UseID3 ใช้ข้อมูล ID3 ของไฟล์ ค่าปริยายคือ 0 ไม่ได้ใช้ข้อมูล ID3

AIM, ICQ, IRC กำหนดค่า AIM, ICQ และ IRC เอาไว้ให้ผู้ฟังคุยกับ DJ

เมื่อตั้งค่าได้ตามใจแล้ว มาสร้าง list เพลงสำหรับเล่นและส่งไปยัง broadcaster กันครับ โดยใช้คำสั่ง

#find /home/mp3 -type f -name “*.mp3″ > /opt/sc_trans_040/playlist.lst

สมมุติว่าผมเก็บไฟล์ mp3 ที่เรียงเพลงไว้แล้วใน dir /home/mp3 นะครับ จากนั้นสั่งให้ sc_trans ส่ง stream ให้เราครับ

#/opt/sc_trans_040/sc_trans_linux &

ให้คุณใช้ browser ไปยังโดเมน broadcaster ของคุณครับ เช่น http://radio.dj-jaja.com:8000 คุณจะพบว่า sc_serv ที่ run ไว้แล้วจะแสดงรายชื่อเพลงที่กำลังเล่น รอคนฟังอยู่แล้ว ถ้าต้องการฟังเพลงก้อเพียงแค่คลิกท่ เมนู Listen หรือใช้โปรแกรมฟังเพลงอย่าง Winamp, Kaffeine หรือ Amarok ชี้ไปยัง http://radio.dj-jaja.com:8000 ครับ
ที่มา : http://sorawee.bangpreang.com/?p=379

How To we install shoutcast1.9.8 on Linux

How To we install shoutcast1.9.8 on Linux

wget http://www.shoutcast.com/downloads/sc1-9-8/sc_serv_1.9.8_Linux.tar.gz

He adjuntado dos archivos que deben ser copiados en /etc/init.d para que shoutcast se ejecute al inicio. Para no tener errores debemos organizar un poco la ubilcación de los archivos:

cd /usr/src
wget http://www.shoutcast.com/downloads/sc1-9-8/sc_serv_1.9.8_Linux.tar.gz
tar zvxf sc_serv_1.9.8_Linux.tar.gz
mv sc_serv /usr/bin
mkdir /etc/shoutcast
mv sc_serv.conf /etc/shoutcast

Si usamos Debian copiamos el archivo shoutcast-debian-initd.txt que esta adjunto en este post a /etc/init.d:
cp shoutcast-debian-initd.txt /etc/init.d/shoutcast

update-rc.d shoutcast defaults
Si usamos Redhat copiamos el archivo shoutcast-redhat-initd.txt que esta adjunto a este post a /etc/init.d:
cp shoutcast-redhat-initd.txt /etc/init.d/shoutcast
chkconfig --add shoutcast

Ahora podremos iniciar el servidor shoutcast usando:
/etc/init.d/shoutcast start

Y detenerlo con:
/etc/init.d/shoutcast stop

How To we install shoutcast on Linux

How do we install shoutcast?

Generally you dont want to run shoutcast as root as that can be really bad. so we create a shoutcast user:

1.) Login to root
2.) adduser shoutcast
3.) passwd shoutcast

Now it will ask for a new password set this and remember it.
Now login as the new shoutcast user.
Installing shoutcast:

Lets take shoutcast from nullsoft:
wget http://www.shoutcast.com/downloads/sc1-9-2/shoutcast-1-9-2-linux-glibc6.tar.gz

extract shoutcast:
tar -zxvf shoutcast-1-9-2-linux-glibc6.tar.gz
rm -rf shoutcast-1-9-2-linux-glibc6.tar.gz
mv shoutcast-1-9-2-linux-glibc6 shoutcast
cd shoutcast

How to configure shoutcast?
your going to want to edit the shoutcast configuration.
pico sc_serv.conf
or
nano sc_serv.conf

MaxUser
Password
PortBase

uncomment AdminPassword and set an admin password.
Now at this point you can go threw the settings and change them to what you want or you can save and start shoutcast and it will work perfectly.
to save crtl+x

How do i start shoutcast?
./sc_serv sc_serv.conf

ที่มา : http://blog.webhosting.uk.com/web-hosting/how-to-install-shoutcast/

Ubuntu Linux Change IP Using Command Line Config File

Open terminal and type the following command:
sudo vi /etc/network/interfaces

OR
sudo gedit /etc/network/interfaces
Find eth0 section and setup IP address as follows:

auto eth0
iface eth0 inet static
address 192.168.2.1
netmask 255.255.255.0
network 192.168.2.0

broadcast 192.168.2.255Save and close the file. Once done, restart network:
$ sudo /etc/init.d/networking restart

Verify new IP address:
$ ifconfig eth0
$ ifconfig

How to Install Red5 0.9 on Ubuntu 10.04 LTS

If they aren’t already installed, add the following to /etc/apt/sources.list
view source
print?
01 deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
02 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
03 deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
04 deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

Then, install some required libraries
view source
print?
01 apt-get update
02 apt-get install java-package
03 apt-get install sun-java6-jdk
04 apt-get install sun-java6-jre
05 apt-get install ant
06 apt-get install subversion

Now, download and install Red5
view source
print?
01 wget http://www.red5.org/downloads/0_9/red5-0.9.1.tar.gz
02 tar xvfz red5-0.9.1.tar.gz
03 mv red5-0.9.1 red5
04 mv red5 /usr/share/

Let’s try running it now:
view source
print?
01 cd /usr/share/red5
02 sh red5.sh

You should see a bunch of text appear, the last line looking like:

[INFO] [Launcher:/installer] org.red5.server.service.Installer – Installer service created

Now try going to http://your-server-address:5080 in a web-browser. You should see:

Make Red5 Run at Startup

From the Red5 Directory (/usr/share/red5) create a new script:
view source
print?
01 nano /etc/init.d/red5.sh

And add:
view source
print?
01 #!/bin/bash
02 cd /usr/share/red5
03 sh red5.sh

Then run,
view source
print?
01 cp red5.sh /etc/init.d/
02 chmod +x /etc/init.d/red5.sh
03 update-rc.d red5.sh defaults 98 02

Have fun with Red5!