Multim3d14 Str34m1ng S3rv3r dengan Helix, Woowza di Linux, FreeBSD dan Blind0ws TOC: [Round 1 - Helix Server under Linux] [Round 2 - Helix under Windows] [Round 3 - Multimedia Server dengan Woowza] [Round 4 - Multimedia Server dengan GNUMP3D] [Round 5 - Multimedia Server dengan IceCast] "multimedia streaming membutuhkan protokol2 real time,seperti: rtsp, rtmp" [Round 1 - Helix Server under Linux]=================== helix server utk linux bisa didownload di https://helixcommunity.org/download.php/2046/v111_servinst_nodist_linux-2.6-glibc23-i686.bin setelah itu tingal chmod +x dan jalankan via cmd ./v111_servinst_nodist_linux-2.6-glibc23-i686.bin utk instal. jika instalasi berhasil misal di sini sy install di ================================== root@mywisdom-Vostro1310:/home/mywisdom/Desktop/helix2# ls adm_b_db Commerce default.cfg hlxserver.cfg Logs RealPlayer11GOLD.bin v111_servinst_nodist_linux-2.6-glibc23-i686.bin Bin Content HelixAdministrator License Plugins Secure root@mywisdom-Vostro1310:/home/mywisdom/Desktop/helix2# ==================================== untuk menjalankan server, silahkan edit hlxserver.cfg pastikan port2 nya ga bentrok dg daemon2 laen yg udah diinstall. untuk run servernya: root@mywisdom-Vostro1310:/home/mywisdom/Desktop/helix2# Bin/./hlxserver hlxserver.cfg misal di sini konfig: root@mywisdom-Vostro1310:/home/mywisdom/Desktop/helix2# head --line 20 hlxserver.cfg ?XML Version="1.0" ? !-- S Y S T E M -- Var ProcessorCount="0"/ !-- P A T H S -- Var PidPath="/home/mywisdom/Desktop/helix2/Logs/hlxserver.pid"/ Var PluginDirectory="/home/mywisdom/Desktop/helix2/Plugins"/ Var SupportPluginDirectory="/home/mywisdom/Desktop/helix2/Lib"/ Var LicenseDirectory="/home/mywisdom/Desktop/helix2/License"/ !-- P O R T S -- !-- RTSP: 554 -- !-- HTTP: 80 (...then 8080 if 80 is unavailable) -- klo port 80 udah ada apache bisa pake port 8080 Var RTSPPort="554"/ Var HTTPPort="80"/ Var MonitorPort="9090"/ Var AdminPort="24100"/ !-- P A S S W O R D S -- =========== ok kita cek dulu apa udah run: ============================= root@mywisdom-Vostro1310:/home/mywisdom# nmap -A -PN localhost Starting Nmap 5.21 ( http://nmap.org ) at 2011-07-19 14:39 WIT Nmap scan report for localhost (127.0.0.1) Host is up (0.000069s latency). Hostname localhost resolves to 2 IPs. Only scanned 127.0.0.1 rDNS record for 127.0.0.1: localhost.localdomain Not shown: 996 closed ports PORT STATE SERVICE VERSION 80/tcp open rtsp Helix DNA Server 11.1.0.801 (linux-2.6-glibc23-i686) 554/tcp open rtsp Helix DNA Server 11.1.0.801 (linux-2.6-glibc23-i686) 631/tcp open ipp CUPS 1.4 9090/tcp open zeus-admin? Device type: general purpose Running: Linux 2.6.X OS details: Linux 2.6.19 - 2.6.31 Network Distance: 0 hops Service Info: OS: Linux OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 20.89 seconds =============================== - RTSPPort adl nomor port untuk RTSP (Real Time Streaming Protocol) bisa diakses dengan url rtsp://url_multimedia_bla_bla_bla di setting di atas make port 554. utk keterangan lengkap rtsp protokol bisa dicek di rfc2326. beberapa server yg support rtsp: * QuickTime Streaming Server: Apple's closed-source streaming server that ships with Mac OS X Server. * Darwin Streaming Server: Open-sourced version of QuickTime Streaming Server maintained by Apple. * pvServer: Formerly called PacketVideo Streaming Server, this is Alcatel-Lucent's streaming server product. * Helix Universal Server: RealNetworks commercial streaming server for RTSP, RTMP, iPhone OS, Silverlight and HTTP streaming media clients * Helix DNA Server: RealNetworks' streaming server. Comes in both open-source and proprietary flavors. * LIVE555: Open source C++ server and client libraries used in well known clients like VLC and mplayer. * Feng: Lean and mean streaming server with focus with rfc compliance. * VideoLAN: Open source media player and streaming server. * Windows Media Services: Microsoft's streaming server included with Windows Server. * VX30: Streaming video server and embedded JAVA client from Maui X-Stream. * Xenon Streaming Server: Mobile streaming server from Vidiator Technology (US) Inc. * RtpRtspStack: Streaming server which is designed for low footprint and high performance applications. * Gstreamer based RTSP Server and client. * FFmpeg: includes ffserver a GPL or LGPL RTSP streaming server. * Erlyvideo[2] has RTSP client and can restream video to other protocols. * ViaMotion : integrated RTSP server for Video On Demand by Anevia * Netris iStream Video Server for services on demand from Netris utk klien yg support cli dari protokol rtsp adl: curl =============== root@mywisdom-Vostro1310:/home/mywisdom/Desktop# curl rtsp://localhost:554 ================== * Administrasi untuk mengakses page admin ketikkan url sesuai alamat ip dari server Anda: http://address:AdminPort/admin/index.html misal di mari krn diinstall di local http://localhost:24100/admin/index.html isikan dengan username dan password yang udah diset saat instalasi tadi atau bisa juga diliat di hlxserver.cfg klo berhasil nongol page admin dengan menu2nya, monggo dites sendiri: - Server Setup Ports IP Binding MIME Types Connection Control Redundant Servers Mount Points HTTP Delivery Cache Directives Delayed Shutdown User/Group Name - Security Access Control User Databases Authentication Commerce - Logging & Monitoring Server Monitor Basic Logging Advanced Logging - Broadcast Distribution Scalable Multicasting Back-Channel Multicasting Session Announcement -Content Management Content Browsing * mime types ini untuk setting mime 2 yang disupport oleh daemon helix. misal ditambah mime utk 3gp video/3gpp ekstensi : 3gp video/3gpp2 ekstensi: 3gpp2 buat ngetes bisa download sample2 3gp di mari: http://www.mv3gp.com utk klien rtsp kota akan pakai real player under linux chmod +x RealPlayer11GOLD.bin lalu install setelah dirun klik menu preferences , pilih transport, centang use specific transport , configure rtsp bagi yg mao pake cli juga bisa dites skrip perl ini yang ane comot dari om kosho: =============== #!/usr/bin/perl # # rtsp-request: Command Line RTSP Tool 0.1 # http://www.kosho.org/tools/rtsp-request/ # $|=0; my $VERSION=0.1; use Getopt::Std; use RTSP::Lite; getopts('cbdphvm:'); $url = $ARGV[0]; if ($opt_h) { print STDERR "Command Line RTSP tool $VERSION\n"; print STDERR "Usage: rtsp-request [OPTION]... -m method-name URL [optional-request-header]...\n"; print STDERR " -m method-name (OPTIONS, DESCRIBE, SETUP, PLAY, ...)\n"; print STDERR " -c display response code and message\n"; print STDERR " -b display received response body\n"; print STDERR " -p display received response headers\n"; print STDERR " -v display separators\n"; print STDERR " -d display network read and write (debug)\n"; print STDERR " -h display help\n"; print STDERR " optional-request-header, cf. \"User-Agent=rtsp-request\"\n"; print STDERR " return-code, 0: response code is 200, -1: others\n"; exit (0); } ($protocol,$host,$junk,$port,$object) = $url =~ /^([^:\/]+):\/\/([^\/:]*)(:(\d+))?(\/.*)$/; if (!defined($port)) { $port = 554; } if ($protocol ne "rtsp") { print STDERR "This tool only supports rtsp \n"; exit (-1); } $rtsp = new RTSP::Lite; if ($opt_d) { $rtsp->debug(1); } if (!($req = $rtsp->open($host,$port))) { print "Unable to open: $!\n"; exit (0); } $rtsp->method($opt_m); $rtsp->user_agent("rtsp-request:$VERSION"); shift @ARGV; while ($header_string = shift @ARGV) { ($header, $param) = $header_string =~ /^([^=]+)=(.*)/; $rtsp->add_req_header($header,$param); } $rtsp->request($url); if ($opt_c) { if ($opt_v) { print "--- Status ---\n"; } print $rtsp->status." ".$rtsp->status_message(); } if ($opt_p) { my @headers = $rtsp->headers_array(); if ($opt_v) { print "--- Received Headers ---\n"; } foreach $header (@headers) { print "$header\n"; } } if ($opt_b) { if ($opt_v) { print "--- Received Body ---\n"; } print $rtsp->body(); } exit(0); ============ skrip perl di atas membutuhkan RTSP::Lite bisa didownload di http://search.cpan.org/~nabeshima/RTSP-Lite-0.1/Lite.pm ====================== root@mywisdom-Vostro1310:~# wget http://search.cpan.org/CPAN/authors/id/N/NA/NABESHIMA/RTSP-Lite-0.1.tar.gz --2011-07-19 14:55:25-- http://search.cpan.org/CPAN/authors/id/N/NA/NABESHIMA/RTSP-Lite-0.1.tar.gz Resolving search.cpan.org... 199.15.176.161, 207.115.101.144 Connecting to search.cpan.org|199.15.176.161|:80... connected. HTTP request sent, awaiting response... 302 Found Location: http://ftp.itb.ac.id/pub/CPAN/authors/id/N/NA/NABESHIMA/RTSP-Lite-0.1.tar.gz [following] --2011-07-19 14:55:25-- http://ftp.itb.ac.id/pub/CPAN/authors/id/N/NA/NABESHIMA/RTSP-Lite-0.1.tar.gz Resolving ftp.itb.ac.id... 167.205.50.9, 2403:8000:1:5000::9 Connecting to ftp.itb.ac.id|167.205.50.9|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7130 (7.0K) [application/x-gzip] Saving to: `RTSP-Lite-0.1.tar.gz' 100%[======================================>] 7,130 --.-K/s in 0.04s 2011-07-19 14:55:26 (156 KB/s) - `RTSP-Lite-0.1.tar.gz' saved [7130/7130] root@mywisdom-Vostro1310:~# tar zxvf RTSP-Lite-0.1.tar.gz RTSP-Lite-0.1/ RTSP-Lite-0.1/Lite.pm RTSP-Lite-0.1/Makefile.PL RTSP-Lite-0.1/README RTSP-Lite-0.1/rtsp-request RTSP-Lite-0.1/describe.pl RTSP-Lite-0.1/play.pl root@mywisdom-Vostro1310:~# cd RTSP-Lite-0.1 root@mywisdom-Vostro1310:~/RTSP-Lite-0.1# perl Makefile.PL Writing Makefile for RTSP::Lite root@mywisdom-Vostro1310:~/RTSP-Lite-0.1# make install Installing /usr/local/share/perl/5.10.1/RTSP/Lite.pm Installing /usr/local/share/perl/5.10.1/RTSP/play.pl Installing /usr/local/share/perl/5.10.1/RTSP/describe.pl Installing /usr/local/man/man3/RTSP::Lite.3pm Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod ================================ ok kita tes dulu: ================= root@mywisdom-Vostro1310:/home/mywisdom/public_html/artikel# perl rtspl.pl -h Command Line RTSP tool 0.1 Usage: rtsp-request [OPTION]... -m method-name URL [optional-request-header]... -m method-name (OPTIONS, DESCRIBE, SETUP, PLAY, ...) -c display response code and message -b display received response body -p display received response headers -v display separators -d display network read and write (debug) -h display help optional-request-header, cf. "User-Agent=rtsp-request" return-code, 0: response code is 200, -1: others root@mywisdom-Vostro1310:/home/mywisdom/public_html/artikel ===================== atau bisa juga pakai open RSTP ============================ root@mywisdom-Vostro1310:/home/mywisdom# openRTSP Usage: openRTSP [-p ] [-r|-q|-4|-i] [-a|-v] [-V] [-d ] [-D [-c] [-S ] [-n] [-O] [-t|-T ] [-u ] [-s ] [-z ] [-w -h ] [-f ] [-y] [-H] [-Q []] [-F ] [-b ] [-B ] [-I ] [-m] (or openRTSP -o [-V] ) ============================ ok mari kita tes: ==== root@mywisdom-Vostro1310:/home/mywisdom/public_html/artikel# openRTSP rtsp://212.212.212.212 Failed to get a SDP description from URL "rtsp://212.212.212.212": connect() failed: Connection timed out ======== oh ada kesalahan teknis, kaci2: root@mywisdom-Vostro1310:/home/mywisdom/public_html/artikel# openRTSP rtsp://127.0.0.1 Sending request: OPTIONS rtsp://127.0.0.1 RTSP/1.0 CSeq: 1 User-Agent: openRTSP (LIVE555 Streaming Media v2010.04.09) Received OPTIONS response: RTSP/1.0 200 OK CSeq: 1 Date: Tue, 19 Jul 2011 08:03:09 GMT Server: Helix DNA Server Version 11.1.0.801 (linux-2.6-glibc23-i686) (RealServer compatible) Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, PAUSE, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN TurboPlay: 1 StatsMask: 3 Sending request: DESCRIBE rtsp://127.0.0.1 RTSP/1.0 CSeq: 2 Accept: application/sdp User-Agent: openRTSP (LIVE555 Streaming Media v2010.04.09) Received DESCRIBE response: RTSP/1.0 404 Not Found CSeq: 2 Date: Tue, 19 Jul 2011 08:03:09 GMT Failed to get a SDP description from URL "rtsp://127.0.0.1": cannot handle DESCRIBE response: RTSP/1.0 404 Not Found ok berarti di lokal kita server helix dah ready [Helix DNA client] ok kurang lebih untuk mengakses server helix spt ini: ============================= protocol://address:port/mount_points/path/file ============================= protokol di sini kita akan pakai rtsp, mount_points bisa dilihat di admin , misal di server ini: /home/mywisdom/Desktop/helix2/Content ok selanjutnya kita akan menginstall helix dna client ok untuk memahami hub antara helix client dan server silahkan baca di: http://www.qsatoolworks.com/faqs/faqdox/tcp2.html helix dna client bisa didownload di https://player.helixcommunity.org/2005/downloads/ [Round 2. Helix under Windows] untuk helix server versi windows, download mbrs-1420-ga-win32.zip selanjutnya mulai proses instalasi, silahkan disesuaikan nomor port dan admin akun dan password setelah instalasi selesai klik icon helix server di desktop: helix server ready ! utk mengkases admin helix klik ikon admin helix isikan username dan password yang tadi diset jika berhasil login maka akan masuk ke halaman admin helix: ok cukup untuk helix karena di sini kita ga akan memakai helix [Round 3 - Multimedia Server dengan Woowza] Woowza adl multimedia server interaktif untuk streaming video, audio dengan support protokol : rtmp, rtp (untuk mpeg transfer streaming), rtsp. Ok untuk studi kasus pertama kita akan coba buat multimedia server seperti www.1hijau.tv untuk meload videonya jika kita lihat 1hijau.tv dari sourcenya menggunakan protokol rtmp di mana lokasi server video di alamat ip 119.110.96.71 var so = new SWFObject('player.swf','mpl','655','391','9'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); so.addVariable('file','1htv'); so.addVariable('skin','http://www.1hijau.tv/beta/modieus.zip'); so.addVariable('abouttext','1Hijau.TV'); so.addVariable('aboutlink','aboutus.php'); so.addVariable('plugins','sharing-2'); so.addVariable('sharing.link','http://www.1hijau.tv'); so.addVariable('autostart','true'); so.addVariable('smoothing','false'); so.addVariable('stretching','exactfit'); so.addVariable('playerready','playerReadyCallback'); so.addVariable('streamer','rtmpt://119.110.96.71/live'); so.write('mediaspace'); ok mati kita scan untuk melihatnya: ========================== root@mywisdom-Vostro1310:/home/mywisdom# nmap -A 119.110.96.71 -PN Starting Nmap 5.21 ( http://nmap.org ) at 2011-07-19 17:37 WIT Nmap scan report for 119.110.96.71 Host is up (0.12s latency). Not shown: 974 closed ports PORT STATE SERVICE VERSION 21/tcp open ftp FileZilla ftpd 0.9.36 beta 80/tcp open http FlashCom 3.5.4 (Wowza Media Server 2 Perpetual 2.2.3 build26454 http config) |_html-title: Wowza Media Server 2 Perpetual 2.2.3 build26454 135/tcp filtered msrpc 139/tcp filtered netbios-ssn 445/tcp filtered microsoft-ds 554/tcp open http FlashCom 3.5.4 (Wowza Media Server 2 Perpetual 2.2.3 build26454 http config) |_html-title: Wowza Media Server 2 Perpetual 2.2.3 build26454 593/tcp filtered http-rpc-epmap 1433/tcp filtered ms-sql-s 1434/tcp filtered ms-sql-m 1900/tcp filtered upnp 1935/tcp open http FlashCom 3.5.4 (Wowza Media Server 2 Perpetual 2.2.3 build26454 http config) |_html-title: Wowza Media Server 2 Perpetual 2.2.3 build26454 2002/tcp open ssl/globe? 3128/tcp filtered squid-http 3389/tcp open ms-term-serv? 4444/tcp filtered krb524 4899/tcp filtered radmin 6129/tcp filtered unknown 8083/tcp open unknown 8086/tcp open http FlashCom 3.5.4 (Wowza Media Server 2 Perpetual 2.2.3 build26454 http config) |_html-title: Wowza Media Server 2 Perpetual 2.2.3 build26454 9898/tcp filtered unknown 49152/tcp open msrpc Microsoft Windows RPC 49153/tcp open msrpc Microsoft Windows RPC 49154/tcp open msrpc Microsoft Windows RPC 49155/tcp open msrpc Microsoft Windows RPC 49156/tcp open msrpc Microsoft Windows RPC 49157/tcp open msrpc Microsoft Windows RPC Device type: general purpose Running (JUST GUESSING) : Microsoft Windows Vista|2008|7|Longhorn (93%) Aggressive OS guesses: Microsoft Windows Vista (93%), Microsoft Windows Vista SP0 - SP2, Server 2008, or Windows 7 Ultimate (build 7000) (93%), Microsoft Windows 7 (92%), Microsoft Windows Vista SP1 (92%), Microsoft Windows Server 2008 SP1 (92%), Microsoft Windows Longhorn (91%), Microsoft Windows Server 2008 SP2 (91%), Microsoft Windows Vista SP0 or SP1 (89%), Microsoft Windows Vista Business (88%), Microsoft Windows Server 2008 (86%) No exact OS matches for host (test conditions non-ideal). Network Distance: 10 hops Service Info: OS: Windows TRACEROUTE (using port 199/tcp) HOP RTT ADDRESS 1 104.34 ms 10.18.128.1 2 119.79 ms fm-ip-202.73.96.73.fast.net.id (202.73.96.73) 3 119.80 ms fm-ip-202.73.96.73.fast.net.id (202.73.96.73) 4 119.85 ms 202.93.46.37 5 119.84 ms 202.93.41.81 6 152.77 ms 58.27.107.193 7 155.48 ms 219.93.179.6 8 152.82 ms 202.71.96.69 9 153.32 ms 202.71.98.251 10 152.73 ms 119.110.96.71 OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 195.28 seconds ======================================== di situ dia menggunakan windows dengan multimedia server woowza, di mana protokol yg dia pake adl rtmp (nanti sy jelaskan di bawah) Ada yang penasaran apa yang dipake youtube.com ??? ok mari kita buka 1 video dan perhatikan: ok mari kita scan pake apa dia ??? ==================================== root@mywisdom-Vostro1310:/home/mywisdom# nmap -A v7.nonxt7.c.youtube.com -PN Starting Nmap 5.21 ( http://nmap.org ) at 2011-07-19 18:18 WIT Nmap scan report for v7.nonxt7.c.youtube.com (173.194.49.75) Host is up (0.12s latency). Not shown: 995 filtered ports PORT STATE SERVICE VERSION 80/tcp open http Google httpd 2.0 (GFE) | robots.txt: has 1 disallowed entry |_/ |_html-title: Error 404 (Not Found)!!1 113/tcp closed auth 443/tcp open ssl/http Google httpd 2.0 (GFE) | robots.txt: has 1 disallowed entry |_/ | html-title: 302 Moved |_Did not follow redirect to http://www.google.com 554/tcp closed rtsp 1935/tcp open rtmp Real-Time Messaging Protocol Device type: general purpose|printer|WAP|PBX Running (JUST GUESSING) : Linux 2.6.X|2.4.X (95%), HP embedded (92%), Gemtek embedded (90%), Siemens embedded (90%), Toshiba Linux 2.4.X (89%) Aggressive OS guesses: Linux 2.6.9 - 2.6.28 (95%), Linux 2.6.22 (Fedora Core 6) (93%), HP Designjet Z3100ps printer (92%), Linux 2.6.28 (Gentoo) (92%), Linux 2.6.24 - 2.6.31 (91%), Linux 2.6.13 - 2.6.28 (91%), Linux 2.6.24 - 2.6.28 (91%), OpenWrt (Linux 2.4.30 - 2.4.34) (90%), Gemtek P360 WAP or Siemens Gigaset SE515dsl wireless broadband router (90%), Linux 2.6.18 (Centos 5.3) (90%) No exact OS matches for host (test conditions non-ideal). Service Info: OS: Linux TRACEROUTE (using port 554/tcp) HOP RTT ADDRESS 1 ... 30 OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 63.58 seconds ================================= ok di sini dia pake rtmp (Real Time Messaging Protocol) port 1935 (jangan keblinger sama rtmp satu lagi rtmp(routing table maintenance protocol)). rtmp merupakan protokol khusus untuk transfer video dan audio. Ok folks kali ini kita akan setting server multimedia dengan woowza under windows 7. bisa didownload di http://www.wowzamedia.com/downloads/WowzaMediaServer-2-2-4/WowzaMediaServer-2.2.4.exe untuk menginstall woowza dibutuhkan java dan java development kit minimal versi 5 bisa didownload dari http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html Setelah menginstall woowza, untuk running server, silakan klik startup di C:\Program Files\Wowza Media Systems\Wowza Media Server 2.2.4\bin (sesuaikan dir instalasi) atau bisa dari start menu windows (wowza startup) [Round 4 - Multimedia Server dengan GNUMP3D] GNUmp3d adl streaming server untuk mp3 dan berbagai jenis media lain. gnu mp2 d bisa didownload di http://savannah.gnu.org/download/gnump3d/gnump3d-3.0.tar.bz2