64
กกกกกกกกกกกกกกกกกกก กกกกกกกกกกกกกก Open source : Red 5 กกกกกกกกกกกกกกกกกกก กกกกกกกกกกก (Video Conference) Red5 Open Source Flash Server Tel 086-5758301 กกกก e-mail : [email protected] กกกกกกกกกกกก กกกกกกกก Update 4/07/2011

Red5 streaming template

Embed Size (px)

DESCRIPTION

การติดตั้งสตรีมมิ่งเซิร์ฟเวอร์แบบ Open source : Red 5 และการพัฒนาระบบวีดิทัศน์ทางไกล (Video Conference โดยนายบัณฑิต พฤฒเศรณีTel 086-5758301 หรือ e-mail : [email protected]

Citation preview

Page 1: Red5 streaming template

การติ�ดติ��งสติร�มม� งเซิ�ร�ฟเวอร�แบบ Open source : Red 5 และการพั�ฒนาระบบว�ด�ทั�ศน�ทัางไกล (Video Conference)

Red5 Open Source Flash Server

Tel 086-5758301 หร อ e-mail : [email protected]

โดยนายบ�ณฑิ�ติ พัฤฒเศรณ�

Update 4/07/2011

Page 2: Red5 streaming template

2

ลดค่'าใช้*จ่'าย

ลดค่วามเส� ยง

Web Web ConferencingConferencing

ลดการลงทั,น

เพั� มค่วามสามารถการ

ผล�ติสะดวกรวดเร/วในการส อสาร

การทั0างานร'วมก�น

องค่�ประกอบทั� ส0าค่�ญของการทั0า Video Conference

Page 3: Red5 streaming template

One to One (แบบ 1 ติ'อ 1)

One to Many(แบบ 1 ติ'อ ผ4*ฟ5งจ่0านวน

มาก)

Many to Many(แบบกล,'ม)

Live Broadcast

Page 4: Red5 streaming template

Line Output

Mic Input

Video Camera

LAN

IEEE1394

VM Server RED5

Uninet

Student

Student

Student

Student

Student

Technical Staff

Administrator

Internet I/O

NotebookSystem requirementsInternet Upload = 600 Kbps UPInternet Upload = 600 Kbps UP Microsoft Windows XP 2 GB RAM minimum

http://conference.thaicyberu.go.th/

Page 5: Red5 streaming template

Red5 สน�บสน,นระบบปฏิ�บ�ติ�การใดบ*าง

- Window Server- Linux Server- Cent OS Server- Free BSD Server- Ubuntu Server - Mac OSX 10.4

Page 6: Red5 streaming template

6

ประเทัศไทัย การให้�บร�การประชุ�มทางไกลจะเป�นในร�ปแบบ IP Service และ Web Service โดยสำ�าห้ร�บตลาด Video Conference ตลอดระยะเวลา 3 ป" เพิ่�$มมากขึ้&'น

ผลส0ารวจ่จ่ากบร�ษั�ทั Frost & Sullivan

Page 7: Red5 streaming template

ม4ลค่'าการลงทั,นของติลาดโลกในเร อง Web Conferencing

Page 8: Red5 streaming template
Page 9: Red5 streaming template

Skype (Skype (สไค่ป9สไค่ป9 ) ) คื)อ โปรแกรมท*$ใชุ�ต�ดต+อสำ)$อสำารก�นระห้ว+างผ่+านอ�นเทอร-เน.ตด�วยขึ้�อคืวามพิ่ร�อมเสำ*ยงและภาพิ่จากกล�อง Webcam โดยจะเป�นการสำ)$อสำารก�นแบบ Real Time ล�กษณะจะคืล�าย Windows Live Messenger

Page 10: Red5 streaming template

Dimdim Web Meeting ขึ้�อด* คื)อ เราไม+ต�องม* Server ห้ร)อ ผ่��ด�แลระบบให้�ย�+งยาก สำม�คืรใชุ�บร�การแล�วสำามารถประชุ�มก�นได�เลยผ่+านห้น�าเว.บ ขึ้�อจ�าก�ดสำ�าห้ร�บร� +นท*$ใชุ�ฟร* จ�าก�ดผ่��เขึ้�าประชุ�มได� 20 คืน และห้น�าจอสำ�าห้ร�บ VDO Conference ไม+สำามารถขึ้ยายให้�ให้ญ่+ได�

Page 11: Red5 streaming template
Page 12: Red5 streaming template

Camfrog ค่ อ เป�นโปรแกรมท*$สำามารถต�ดต+อสำ)$อสำารได� 2 ทาง (two-way communication) ซึ่&$งเป�นการพิ่�ดคื�ย (chat) ระห้ว+างบ�คืคืลท*$เป�นชุ�มชุนทางอ�นเทอร-เน.ต โดยแบ+งออกเป�นห้�องๆ ตามห้�วขึ้�อในการสำนทนา โดยในป7จจ�บ�นจะม* 2 โซึ่นห้ล�กๆ คื)อ โซึ่นท�$วไป (general) และโซึ่นผ่��ให้ญ่+ 18( +only)

Page 13: Red5 streaming template

MSN เป:น Instant Messenger คื)อ โปรแกรมสำ+งขึ้�อคืวามขึ้�ามระบบเคืร)อขึ้+ายแบบท�นท*ท�นใด ห้ร)อ IM) จากบร�ษ�ทไมโคืรซึ่อฟท- ห้ร)อท*$คืนไทยเร*ยกสำ�'น ๆ ว+า “MSN " ห้ร)อ “M "ป7จจ�บ�นสำามารถสำ+งสำ)$ออ)$น ๆ นอกเห้น)อจากขึ้�อคืวาม เชุ+น ว*ด*โอ ,เสำ*ยง แบบท�นท*ท�นใด นอกเห้น)อไปจากการสำ+งไฟล-ขึ้�อม�ล เชุ+น ไฟล-เอกสำารเว�ร-ด ไฟล-เพิ่ลง ห้ร)อไฟล-

Page 14: Red5 streaming template
Page 15: Red5 streaming template

ระบบประช้,มกล,'ม

Page 16: Red5 streaming template

TCU Lecture Maker

Page 17: Red5 streaming template

ประหย�ดเวลา และลดค่วามเส� ยงในการเด�นทัางค่วามสะดวก รวดเร/วในการส อสารขององค่�กรใช้*งานง'าย สร*างสรรค่�ผลงานทั� ม�ประส�ทัธิ�ภาพัใช้*ประโยช้น�จ่ากการลงทั,นด*านเค่ร อข'ายอ�นเติอร�เน/ติม�ระบบร�กษัาค่วามปลอดภ�ยส4งค่วามย,'งยากในการใช้*งานค่'าติ�ดติ��ง Hardware และอ,ปกรณ�เช้ อมติ'อค่'าใช้*จ่'ายในการจ่�ดประช้,ม และประสานงานน�ดหมายค่'าใช้*จ่'ายในการเด�นทัาง

ประโยช้น� Video Conference

Page 18: Red5 streaming template

What is red5• An Open Source Flash Media

Server– Built on Java (J2EE)– Uses RTMP (Real Time Messaging

Protocol) • Red5 is an Open Source Flash Server

written in Java that supports: • Streaming Video (FLV, F4V, MP4, 3GP) • Streaming Audio (MP3, F4A, M4A, AAC) • Recording Client Streams (FLV and

AVC+AAC in FLV container) • Shared Objects • Live Stream Publishing • Remoting • Protocols: RTMP, RTMPT, RTMPS, and RTMPE

Page 19: Red5 streaming template

http://conference.thaicyberu.go.th/

Page 20: Red5 streaming template

Red5 Streaming Server : การใช้*บร�การ Broadcaster และ Video Conference

http://202291353. . .http://2022913218

Page 21: Red5 streaming template

ระบบช้,มทัางไกลผ'านเค่ร อข'ายอ�นเติอร�เน/ติ Video

Conference Chat

Page 22: Red5 streaming template
Page 23: Red5 streaming template

Generation Streaming• กระบวนการทั0างานของ Web แติ'ก'อนทั� จ่ะน0า

ระบบ Streaming Media มาใช้*งาน• ค่วามแติกติ'างของเทัค่โนโลย�น0ามาใช้* รวมไป

ถ=งช้น�ดของส อทั� จ่ะน0ามาข=�น Streaming server

• ขนาดของ Bandwidth ทั� ให*บร�การ Streaming โดยใช้*เส*นทัางถนนของ Uninet ถ=ง 10Gbit

Page 24: Red5 streaming template
Page 25: Red5 streaming template
Page 26: Red5 streaming template
Page 27: Red5 streaming template
Page 28: Red5 streaming template
Page 29: Red5 streaming template
Page 30: Red5 streaming template
Page 31: Red5 streaming template
Page 32: Red5 streaming template

Flash

Page 33: Red5 streaming template
Page 34: Red5 streaming template

Flash

Page 35: Red5 streaming template
Page 36: Red5 streaming template
Page 37: Red5 streaming template
Page 38: Red5 streaming template
Page 39: Red5 streaming template
Page 40: Red5 streaming template
Page 41: Red5 streaming template
Page 42: Red5 streaming template
Page 43: Red5 streaming template
Page 44: Red5 streaming template
Page 45: Red5 streaming template
Page 46: Red5 streaming template
Page 47: Red5 streaming template
Page 48: Red5 streaming template
Page 49: Red5 streaming template

Application install on Server

Page 50: Red5 streaming template

Uses RTMP (Real Time Messaging Protocol)

Page 51: Red5 streaming template

การเปร�ยบเทั�ยบค่วามน�ยมในติลาดค่4'แข'งส0าหร�บการเปร�ยบเทั�ยบค่วามน�ยมในติลาดค่4'แข'งส0าหร�บ Player

Page 52: Red5 streaming template

Flash Version Contribution to Total

การเปร�ยบเทั�ยบในกล,'ม การเปร�ยบเทั�ยบในกล,'ม Flash VersionFlash Version ติ'างๆติ'างๆ

Page 53: Red5 streaming template

rtmp.host_port = 0.0.0.0:1935 http.host = your.server.com http.port = 5080 rtmpt.host = 0.0.0.0 rtmpt.port = 8088 debug_proxy.host_port = 1936 proxy_forward.host_port = 127.0.0.1:5080

Port Red5

Page 54: Red5 streaming template

public function initURIList():Void{

LSOUserPreferences.load("VideoConference");

var uriList:Array = LSOUserPreferences.getPreference("uriList");if(uriList != undefined && uriList.length > 0){

uri.dataProvider = uriList;}else{

// add default values for now:uri.addItem("rtmp://192.168.1.2/fitcDemo");uri.addItem("rtmp://fancycode.com/fitcDemo");uri.addItem("rtmp://69.64.37.77/fitcDemo");

}}

Code Flash Action scrip

Red5\swf\DEV_Source\classes\org\red5\samples\livestream\videoconference

Page 55: Red5 streaming template

function setupCameraMic():Void{

// setup camcam = Camera.get();// setting dimensions and frameratecam.setMode(320, 240, 12);// set to minimum of 70% qualitycam.setQuality(0,70);

// setup micmic = Microphone.get();mic.setRate(44);

}

Code Flash Action scrip

Page 56: Red5 streaming template

Technical Feasibility•Terracotta (เทัอราค่อทัติ*า)

– A Java Clustering Open Source Solution– http://www.terracotta.org– The TC team is now working with us to

achieve the clustering goal of Red5.

Page 57: Red5 streaming template

Minimal Configuration

Generic HTTP Load Balancer

Red5 Server A Red5 Server B Red5 Server C

Cluster on Terracotta

Terracotta Servermanages

FP Client FP Client FP Client

RTMPT

Page 58: Red5 streaming template

Large Concurrence with Medium Size Client Interaction

Generic HTTP Load Balancer

Edge Server asReverse Proxy

Edge Server asReverse Proxy

Edge Server asReverse Proxy

Origin Server A Origin Server B Origin Server C

Edge Cluster on Terracotta

Terracotta Server

App/A App/B App/C

manages

FP Client FP Client FP Client

RTMPT

Independent Origin Servers (Separation based on URL)

Cross Links to Origins

Page 59: Red5 streaming template

Large Concurrence with Big Size Client Interaction

Generic HTTP Load Balancer

Edge Server asReverse Proxy

Edge Server asReverse Proxy

Edge Server asReverse Proxy

Origin Server A Origin Server B Origin Server C

Edge Cluster on Terracotta

Terracotta Servermanages

FP Client FP Client FP Client

RTMPT

Origin Servers on Terracotta

Cross Links to Origins or via Load-Balancer

Terracotta Servermanages

Page 60: Red5 streaming template

ข*อด�ส0าหร�บผ4*ด4แลห*องประช้,มข*อด�ส0าหร�บผ4*ด4แลห*องประช้,ม 1. ไม+ต�องไปเสำ*ยเวลาย�+งก�บชุ�ดเคืร)$องม)อ

conference ในห้�องประชุ�มในการต�ดต�'ง และทดสำอบ 2. ไม+ต�องไปจ�ดเก.บอ�ปกรณ-ห้ลายชุ�'นในห้�องประชุ�ม 3. อ�ปกรณ-ไม+ห้ายม*เพิ่*ยง Camera และ microphone

4. ราคืาไม+แพิ่งท�'ง Camera และ microphone 5. ไม+เสำ*ยคื+าใชุ�จ+าย MA ด�าน Hardware

Page 61: Red5 streaming template

ข*อด�ส0าหร�บผ4*พั�ฒนา ข*อด�ส0าหร�บผ4*พั�ฒนา Red5Red5

1. ภาษาท*$ใชุ�สำ�าห้ร�บการเขึ้*ยนโปรแกรมไม+ยากสำามารถแก�ไขึ้ Source code และพิ่�ฒนาต+อยอดได� 2. ต�องม*คืวามร� �พิ่)'นฐานเก*$ยวก�บโปรแกรม Flash Action scrip 3. สำามารถเพิ่�$มขึ้*ดคืวามสำามารถขึ้อง Application ได� เชุ+น

- เพิ่�$มขึ้นาดจอภาพิ่ให้ญ่+ขึ้&'น - ปร�บขึ้นาด frame rate ให้�เห้มาะสำมก�บการใชุ�งาน

- เพิ่�$มจ�านวนห้�องในชุ�ดกล�+ม Conference ได� 4. ไม+ต�องไปย�+งก�บโคืรงสำร�างห้ล�กขึ้อง Red5 เพิ่ราะคื+า Parameter จะสำ+ง Scrip ไปย�ง Application ได�เลย

Page 62: Red5 streaming template

แนวโน*มการพั�ฒนาและน0าไปแนวโน*มการพั�ฒนาและน0าไปใช้* ใช้* Red5Red5 1. พิ่�ฒนาต+อยอดใชุ�ก�บ Mobile Learning

ขึ้องระบบ 3G 2 . น�าไปพิ่�ฒนาระบบกล�องวงจรป;ด CCTV

ตามจ�ดต+างๆขึ้องบร�เวณบ�าน และสำ�าน�กงาน3. น�าไปต�ดต�'งก�บระบบจ�ดการเร*ยนการสำอนทาง

ไกล ห้ร)อ ต�ดก�บ LMS เชุ+น TCULMS ห้ร)อ LMS อ)$นๆ

4. สำน�บสำน�นการน�าไปใชุ�ก�บจ�ดเสำ*$ยงภ�ยใน 3 จ�งห้ว�ดภาคืใต� ซึ่&$งประห้ย�ดคื+าใชุ�จ+ายอย+างมาก

Page 63: Red5 streaming template

การน0าไปติ�ดติ��งของ Red5 ทั� สามารถติ�ดติ��งได*• Red5 1.0 RC1 (2 February 2011) • Windows | WAR | ZIP | Tarball | OSX • Red5 0.9.1 Final (21 February 2010) • OSX | Windows | ZIP | Tarball | Replacement Jar • Red5 0.9.0 Final (27 January 2010) • OSX | Windows | ZIP | Tarball | Source • Red5 0.9.0 RC2 (03 November 2009) • OSX | Windows | ZIP | Tarball | Source • Red5 0.9.0 RC1 (03 August 2009) • OSX | Windows | Windows (Java5) | ZIP • Red5 0.8.0 Final • OSX | Windows | Windows (Java5) | Tarball | Tarball

(Java5) | WAR | WAR (Java5)

Page 64: Red5 streaming template

Questions

ทั'านใดสนใจ่สามารถร'วมเข*าอบรมในสายการพั�ฒนาโปรแกรม Red5

"ระบบประช้,มทัางไกลเพั อการจ่�ดการเร�ยนการสอนออนไลน�" แบบ Open Source ได*ทั�

http://www.thaicyberu.go.th

หร อติ�ดติ'อ อ.บ�ณฑิ�ติ พัฤฒเศรณ� Telephone 086-5758301