learning outcome

85
EEC4113 Data Communication & Multimedia System Chapter 11: Application Layer – Networked Multimedia by Muhazam Mustapha and contributions by class members, October 2010

Upload: nyoko

Post on 15-Jan-2016

21 views

Category:

Documents


0 download

DESCRIPTION

EEC4113 Data Communication & Multimedia System Chapter 11: Application Layer – Networked Multimedia by Muhazam Mustapha and contributions by class members, October 2010. Learning Outcome. At the end of this chapter, the students are expected to have the knowledge about - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Learning Outcome

EEC4113Data Communication &

Multimedia SystemChapter 11: Application Layer – Networked

Multimedia

by Muhazam Mustapha and contributions by class members,October 2010

Page 2: Learning Outcome

Learning Outcome

• At the end of this chapter, the students are expected to have the knowledge about– Application Layer Protocols– Formats and Compression schemes of

Multimedia Data– Some available multimedia techniques for the

internet

Page 3: Learning Outcome

Chapter Content

• Application Layer Protocols– HTTP, FTP, SMTP, POP(3)

• Multimedia Transfer Techniques

• Multimedia Transfer in Practice– VoIP, IPTV, Video & Audio Streaming

• Compression of Multimedia Data

Page 4: Learning Outcome

Application Layer Protocols

Page 5: Learning Outcome

Application Layer

• Application Layer is the top most layer in OSI Network Model

• It interacts with the end users through via network application software

• It consists of a large number of protocols that is used by the application to make network / web communication– That is why the application is named web

application (like browsers, email client, etc)

Page 6: Learning Outcome

Application Layer

• Almost all protocols are made of plain text except for secured ones like HTTPS and FTPS

• If any binary data needed to be sent through HTTP, it will be encoded with some binary-to-text encoding scheme like Base64

Page 7: Learning Outcome

Application Layer Protocols

• The protocols are also called process-to-process protocols as they actually bind the processes running on the end machines

• Examples of TCP/IP standard application layer protocols:– HTTP, FTP, SMTP, POP(3), IMAP, telnet,

DNS, DHCP, RPC, etc

• Examples of non-TCP/IP standard protocols:– Bit Torrent, NFS, NIS, DDS, etc

Page 8: Learning Outcome

HTTP

• Hypertext Transfer Protocol – the protocol that transfers web content

• Heart of WWW data transfer

• Almost all other technologies created for the web is designed around HTTP protocol– e.g. The concept of sessions in web

programming is nothing more than cookies in HTTP protocol

• Consists of a request that is followed by a response

Page 9: Learning Outcome

HTTP

• The request and response are of the following format sequence:– Request/Response line– Header– Blank line– Body

• HTTP 1.1 major upgrade: Allowing requests to be made to domains that share the IP address

Page 10: Learning Outcome

HTTP

• HTTP connection is non-persistent– Means throughout the web download, if there

is any extra files required, there will be separate connections made

• Example: An HTML file has 3 images– First HTTP connection is made to download

the HTML, then disconnected– It will be followed then by 3 more connect-

disconnect sessions of HTTP to download the 3 images

Page 11: Learning Outcome

HTTP Header

• The header in the request or response will provide more information about the request or the response

• This includes:– User agent: browser type and operating

system– Accepted language, encoding, MIME types– Content length, last modified

Page 12: Learning Outcome

HTTP Request

• Most widely used HTTP requests:– GET: request for a file with extra info in query

string– POST: request for a file with extra info in

STDIN– PUT: request to upload file– HEAD: request for header sample

Page 13: Learning Outcome

HTTP Request

• GET Request examples:– GET /images/logo.png HTTP/1.0

User-Agent: Mozilla/5.0 (Linux; X11)Accept-Language: en

– GET /images/logo.png HTTP/1.1Host: www.muhazam.comUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0Accept-Language: en

– GET /script/student.asp?name=ain HTTP/1.0User-Agent: Mozilla/5.0 (Linux; X11)Accept-Language: en

Request

Header

Blank line

Specific domain name

Query string

Page 14: Learning Outcome

HTTP Response

• Responses are given as status codes

• Some of the most common ones:– 200: OK – request done– 401: Unauthorized – password wrong– 403: Forbidden – access to protected area– 404: Not found – the isn’t in server– 500: Internal server error – due to some

coding error

Page 15: Learning Outcome

HTTP Response

• GET Response example:HTTP/1.1 200 OK

Date: Mon, 23 May 2005 22:38:34 GMT

Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)

Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT

Etag: "3f80f-1b6-3e1cb03b"

Accept-Ranges: bytes

Content-Length: 438

Connection: close

Content-Type: text/html; charset=UTF-8

<html>

<head>

. . . . .

Response

Header

Blank line

Content

Page 16: Learning Outcome

FTP

• File Transfer Protocol – the protocol that transfers arbitrary file content

• FTP connection is persistent– Means the user can perform many tasks

during a single session

• Needs a proper FTP client to operate fully– WS FTP, CuteFTP, etc

• Nowadays browsers are already equipped with some FTP capabilities

Page 17: Learning Outcome

FTP

• Consists of a number of commands– PWD – current working directory– LIST – list the current directory– DEL – delete a file– MKDIR – make directory– CHDIR – change to a directory– etc

Page 18: Learning Outcome

FTP

• Specifying URL:

ftp://[<user>[:<password>]@]<host>[:<port>]/<url-path>

– Example:– ftp://public.ftp-servers.example.com/mydirectory/myfile.txt– ftp://user001:[email protected]/mydirectory/myfile.txt

• FTP clients are capable of taking username and password discreetly, but for browsers normally we need to specify it as plain text

Page 19: Learning Outcome

SMTP

• Simple Mail Transfer Protocol – the protocol that transfers email

• It transfers both outgoing and incoming emails – despite some misconceptions

• Consists of some commands to talk between SMTP servers:– HELO, MAIL FROM, RCPT TO, etc

Page 20: Learning Outcome

SMTP• Example:S: 220 smtp.example.com ESMTP PostfixC: HELO relay.example.orgS: 250 Hello relay.example.org, I am glad to meet youC: MAIL FROM:<[email protected]>S: 250 OkC: RCPT TO:<[email protected]>S: 250 OkC: RCPT TO:<[email protected]>S: 250 OkC: DATAS: 354 End data with <CR><LF>.<CR><LF>C: From: "Bob Example" <[email protected]>C: To: "Alice Example" <[email protected]>C: Cc: [email protected]: Date: Tue, 15 Jan 2008 16:02:43 -0500C: Subject: Test messageC:C: Hello Alice.C: This is a test message with 5 header fields and 4 lines in the message body.C: Your friend,C: BobC: .S: 250 Ok: queued as 12345C: QUITS: 221 Bye{The server closes the connection}

Page 21: Learning Outcome

POP

• Post Office Protocol – the protocol that transfers email to email client

• Email clients like, MS Outlook, Netscape Mail, Thunderbird, etc use this protocol to download emails from server to local machine

• Some of commands:– LIST, STAT, RETR, DELE, etc

Page 22: Learning Outcome

Multimedia TransferTechniques

Page 23: Learning Outcome

Multimedia Transfer Techniques

• The main problem in multimedia transfer over the internet is the speed and efficiency– Speed required to reduce delay and buffering– Efficiency required to reduce packet loss and

jittering

• A few techniques employed– Web server– Streaming server– RTSP

Page 24: Learning Outcome

Web Server Technique

• Web browser makes the request

• After the server responds the browser delegates the play process to a media player

• The media player will then communicate directly to the web server to play the content

Page 25: Learning Outcome

Web Server Technique

Browser

Media Player

Web Server

Request

Streaming

Delegation

Page 26: Learning Outcome

Web Server Technique

• Advantage: Easiest to implement and least costly

• Disadvantage: Still rely on normally slow web servers

Page 27: Learning Outcome

Streaming Server Technique

• Web browser makes the request

• After the web server responds with the information about the streaming server, the browser delegates the play process to a media player

• The media player will then communicate directly to the streaming server to play the content

Page 28: Learning Outcome

Streaming Server Technique

Browser

Media Player

Request

Streaming

Delegation

Web Server

Streaming Server

Page 29: Learning Outcome

Streaming Server Technique

• Advantage: Speedier and more reliable, even though still as HTTP transfer

• Disadvantage: Requires an extra and more expensive server

Page 30: Learning Outcome

RTSP Technique

• Real Time Streaming Protocol

• Just like the streaming server, but now it is using a dedicated protocol

• RTSP is a protocol the has some capabilities of a media player, like play, pause, stop, etc

Page 31: Learning Outcome

Reducing Delay

• There is an interleaving technique used to reduce delay in video streaming

• The in-sequence packets are re-arranged into interleaving groups, then transferred in that sequence

• At receiver, the interleaving groups are re-arranged back to the original sequence

• If any group lost, it only causes small distributed jittering instead of a long wait for that lost group

Page 32: Learning Outcome

Reducing Delay

Interleave

Streaming LOST

Small less annoying but distributed jitters

Re-arrange

Page 33: Learning Outcome

Multimedia Transfer in Practice

Page 34: Learning Outcome

Radio over Internet Protocol(RoIP)• RoIP takes Internet Protocol (IP) input that convert

communications stream to IP• RoIP is not just about linking radios• Enables interoperable communications between

new and legacy public safety radio systems, commercial wireless and wired phones

• Allows a dispatcher to dynamically drag and drop parties and channels to form and dissolve talk groups remotely

RoIP Slides contributed by: ABDUL MUIZ BIN SHAHIDAN,MUHAMMAD ATIQ B CHE MOHD ROSLI

Page 35: Learning Outcome

Radio over Internet Protocol(RoIP)

• Session Initiation Protocol - SIP System Diagram RoIP is not just about linking radios

Page 36: Learning Outcome

Radio over Internet Protocol(RoIP)

• HTML code for hot FM radios:

• <embed name="mediaplayer1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://rs9.radiostreamer.com:10000" type="application/x-mplayer2" controller="true" loop="0" transparentstart="1" autostart="true" enablecontextmenu="false" showstatusbar="1" width="320" height="80"></embed>

Page 37: Learning Outcome

Radio over Internet Protocol(RoIP)• List of stations:

Page 38: Learning Outcome

Radio over Internet Protocol(RoIP)• Malaysia Listing:

• Radio MMU (Multimedia University)• iRadio OUM (Open University Malaysia)• IIUM FM (International Islamic University

Malaysia)• UFM (Universiti Teknologi Malaysia)• Putra FM (Universiti Putra Malaysia)• UMS KKFM (Universiti Malaysia Sabah)• Radio Malaysia Johor• Sinar FM• Hot FM

Page 39: Learning Outcome

Radio over Internet Protocol(RoIP)• Users:

• In the US military.– Increasingly in business.

• Emergency agencies across the US.

• Network that joins 42 federal, state, tribal, transit, and utility agencies without buying a single new radio.

Page 40: Learning Outcome

Voice over IP (VoIP)• Voice over Internet Protocol (VoIP)-technology that

allows you to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line.

• Some VoIP services may only allow you to call other people using the same service, but others may allow you to call anyone who has a telephone number - including local, long distance, mobile, and international numbers.

• Some VoIP services only work over your computer or a special VoIP phone, other services allow you to use a traditional phone connected to a VoIP adapter.

VoIP Slides contributed by: NURUL MARLIANA BT MUSA,SUHANA BINTI MOHD TAHIR

Page 41: Learning Outcome

Voice over IP (VoIP)

• Providers:– Skype (peer to peer program – both side

must have Skype installed)– Zamir Telecom Limited– Google Voice

Page 42: Learning Outcome

Voice over IP (VoIP)

• Protocols:– MEGACO (H.248)– MGCP– MIME– RVP ( Remote Voice protocol )– SDP– SIP– SGCP– SKINNY

Page 43: Learning Outcome

Voice over IP (VoIP)

• Advantages:– Operational cost

• Routing phone calls over existing data networks to avoid the need for separate voice and data networks

– Flexibility• The ability to transmit more than one

telephone call over a single broadband connection.

Page 44: Learning Outcome

Voice over IP (VoIP)

• Advantages (continued):– Location independence

• Only a sufficiently fast and stable Internet connection is needed to get a connection from anywhere to a VoIP provider

Page 45: Learning Outcome

Voice over IP (VoIP)

• The operation:• VoIP services convert your voice into a digital signal

that travels over the Internet.

• If you are calling a regular phone number, the signal is converted to a regular telephone signal before it reaches the destination.

• VoIP can allow you to make a call directly from a computer, a special VoIP phone, or a traditional phone connected to a special adapter.

• Wireless "hot spots" in locations such as airports, parks, and cafes allow you to connect to the Internet and may enable you to use VoIP service wirelessly.

Page 46: Learning Outcome

Voice over IP (VoIP)

• Example of residential network including VoIP:

Page 47: Learning Outcome

IPTV

• IPTV – Internet Protocol Television• It is digital television delivered on TV

(or PC) through high speed internet connection (broadband)

• Channels are encoded to IP format and delivered to TV through a Set Top Box (STB)

IPTV Slides contributed by: WAN AHMAD GHAZLY BIN MD GHAUZ, MUHAMMAD FARHAN BIN SHAHROM

Page 48: Learning Outcome

IPTV

• How IPTV works– IPTV converts television signal into small

packets of computer data–The packets is the same like any other

form of online traffic such as webpages or emails.

– IPTV was first used in 1994• ABC’s World News Now was the first television

show to be broadcast over the internet, using the CU-SeeMe video conferencing software

Page 49: Learning Outcome

IPTV

• Three main components:–TV and content head end

• where the TV channels are received and encoded

–Delivery network• Consists of broadband and landline

network provided by telecom operator

Page 50: Learning Outcome

IPTV

• Three main components (cont):–Set Top Box (STB)

• Required at customer location• STB reassembles data packets into TV

programs• Connected between internet modem and

the customer’s TV

Page 51: Learning Outcome

IPTV

• Protocols:–For live TV programs

• IGMP version 2 or IGMP version 3 for IPv4 for connecting to a multicast stream (TV channel) and for changing from one multicast stream to another (TV channel change).

–For video-on-demand (VOD)• Real Time Streaming Protocol (RTSP)

Page 52: Learning Outcome

IPTV

• Codecs:–Video contents typically compressed with

MPEG-2 or MPEG-4 codec and sent in an MPEG transport stream delivered…• Via IP Multicast for Live TV and• Via IP Unicast for VOD

*IP Multicast is a method in which information can be sent to multiple computers at the same time

–H.264 (MPEG-4) is increasingly used to replace MPEG-2.

Page 53: Learning Outcome

IPTV

• Advantages of IPTV:–Quality of digital video and audio is

better than traditional analogue TV–More interactive features & contents–Schedule of recording of favorite TV

programs is possible–With video-on-demand (VOD), users

can browse an online movie catalog and watch it instantly

Page 54: Learning Outcome

IPTV

• Advantages of IPTV (cont):–Lower cost for operator and user–Ability to integrate a TV with other IP-

based services like high speed Internet access and VoIP

Page 55: Learning Outcome

Video Streaming• Streaming media are multimedia that are

constantly received by, and normally presented to, an end-user while being delivered by a streaming provider.

• The process involves a camera for the video, an encoder to digitize the content, a video publisher where the streams are pushed to and a Content delivery Network to distribute and deliver the content.

• True streaming is media content that is delivered to the viewer’s media player in real-time.

Video Streaming Slides contributed by: MUHAMMAD AKMAL SAPON, MOHD ESKANDAR MIRZA MOHD YUSOF

Page 56: Learning Outcome

Video Streaming

• File formats:

1- Windows Media video (.wmv)

2- RealMedia (.rm)3- Quicktime4- MPEG (.mpg)5- Adobe Flash

6- Flash Live Video (FLV)

7- Audio Video Interleave (.avi)

8- Apple Quick Time Movie (.mov)

9- DVD Video Object (.vob)

Page 57: Learning Outcome

Video Streaming

• Protocols– HTTP

• Sending data from web server to web browser.– MMS (MICROSOFT MEDIA SERVICES)

• NetShow services.– RTSP (REAL TIME STREAMING

PROTOCOL)• Developed by IETF & published in 1998.• Allows client remotely control streaming media

server.

Page 58: Learning Outcome

Video Streaming• HTML Tags:

– ADOBE FLASH PLAYER• Runs SWF files• Created by Adobe Flash authoring tools• ActionScript (AS)• Available as plugin

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,16,0" width="320" height="400" ><param name="movie" value="video-filename.swf"><param name="quality" value="high"><param name="play" value="true"><param name="LOOP" value="false"><embed src="video-filename.swf" width="320" height="400" play="true" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object>

Page 59: Learning Outcome

Video Streaming

• HTML Tags :– HTML5 VIDEO

• Element introduced in the HTML5• Example:

<video src="pr6.webm" width="320" height="240"></video>

Page 60: Learning Outcome

Video Streaming

• Screen shot:

Page 61: Learning Outcome

Compression of Multimedia Data

Page 62: Learning Outcome

Data Compression

• Data compression is a process of encoding data in less than the normally required no. bits

• Symbols may be encoded in variable no. bits

• Redundancy of the used bits in normal encoding will be reduced

Page 63: Learning Outcome

Compression Models

• There are 2 main models in data compression scheme:– Statistical based– Dictionary based

• Statistical based:– Based on statistical content of the file– E.g. Huffman coding, Arithmetic coding

• Dictionary based– Based on repeated data replacement– E.g. Ziv-Lempel

Page 64: Learning Outcome

Compression Types

• There are 2 types of data compression:– Lossless– Lossy

• Lossless (Huffman & Arithmetic):– Binary content doesn’t change after

compression-decompression– Use: to compress binary / text file

• Lossy:– Binary content changes after compression-

decompression, but not the semantic content– Use: voice, image, video file

Page 65: Learning Outcome

Multimedia Compression

• Multimedia data has little dictionary and statistical feature that can contribute to compression

• Hence lossless compression is of little use• The amount of semantic content loss in

lossy compression can be set to some acceptable level

• E.g. JPEG, GIF (image), AU, RM (audio), MPEG (video)

Page 66: Learning Outcome

Huffman Coding

• This might be the oldest compressing technique that was invented by a PhD student in MIT (Huffman)

• Requires prior knowledge of the file (statistical frequency) – table of symbols and their frequency

• It is a lossless scheme

Page 67: Learning Outcome

Huffman Coding

Algorithm:1. Sort the frequencies from largest to smallest2. Give the 2 least frequent symbols a bit value

of 1 and 0 each (any order)3. Then Combine them to form an unnamed

symbol with a combined frequency4. Repeat (1) – (3) until there is no more

symbol in list – Huffman tree is formed5. The Huffman code for a particular symbol in

the tree is the sequence of bits read from the root until the symbol is reached at the leaf

Page 68: Learning Outcome

Huffman Coding

Example:Compute a possible Huffman code for the following symbol-frequency table:

f 69 18 15 12 6 3symbol A D T M Q X

Page 69: Learning Outcome

Huffman Coding

A: 69 D: 18 T: 15 M: 12 Q: 6 X: 3

Initial:

Combine the last 2 (no re-arrange needed):

A: 69 D: 18 T: 15 M: 12

Q: 6 X: 3

: 9

0 1

Page 70: Learning Outcome

Huffman Coding

Combine the last 2 again:

A: 69 D: 18 T: 15

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1

Page 71: Learning Outcome

Huffman Coding

Re-arrange:

A: 69 D: 18 T: 15

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1

Page 72: Learning Outcome

Huffman Coding

Combine:

A: 69

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1D: 18 T: 15

: 33

0 1

Page 73: Learning Outcome

Huffman Coding

Re-arrange:

A: 69

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1D: 18 T: 15

: 33

0 1

Page 74: Learning Outcome

Huffman Coding

Combine:

A: 69

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1D: 18 T: 15

: 33

0 1

: 54

0 1

Page 75: Learning Outcome

Huffman CodingFinal combination:

A: 69

M: 12

Q: 6 X: 3

: 9

0 1

: 21

0 1D: 18 T: 15

: 33

0 1

: 54

0 1

: 123

0 1

Page 76: Learning Outcome

Huffman CodingA: 0 1 bitD: 100 3 bitsT: 101 3 bitsM: 110 3 bitsQ: 1110 4 bitsX: 1111 4 bits

The Huffman code:

The compressed file size:Total of [(no. symbol’s bits) × (symbol’s frequency)]

A: 1×69 = 69 bits D: 3×18 = 54 bitsT: 3×15 = 45 bitsM: 3×12 = 36 bitsQ: 4×6 = 24 bitsX: 4×3 = 12 bits

Total = 240 bits = Round-up(240/8) = 30 bytes

Page 77: Learning Outcome

Huffman CodingCompression ratio:

Assume that the symbols were originally encoded by normal binary coding, the required bits per symbol is:

= Round-up(Log2(No. symbols)) = 3

Total uncompressed file size = 3×123 = 369 bits = 47 bytes

Compression ratio= (47−30) / 47 = 17 / 47 = 0.362 = 36.2%

Page 78: Learning Outcome

MPEG• MPEG stands for Moving Picture Experts Group• Used for coding audio-visual information (e.g.,

movies, video, music) in a digital compressed format.

• Compared to other format such as WMF (Window Media Format) and RM (Real Media) , MPEG files are much smaller for the same quality. This is because MPEG uses very sophisticated compression techniques.

MPEG Slides contributed by: MOHAMAD FUAD BIN ABDULLAH, MOHD FAIZUL BIN CHE HASHIM

Page 79: Learning Outcome

MPEG1

• It is designed to compress VHS-quality raw digital video and CD audio down to 1.5 Mbit/s (26:1 & 6:1 compression ratios respectively) without excessive quality loss.

• Making video CD, some digital cable / satellite TV and digital audio broadcasting (DAB) possible.

Page 80: Learning Outcome

MPEG2

• MPEG-2 is directed at broadcast formats at higher data rates

• It provides extra algorithmic 'tools' for efficiently coding interlaced video.

• MPEG-2 is the core of most digital television including satellite TV and DVD formats

Page 81: Learning Outcome

MPEG4

• These standards made interactive video on CD-ROM, DVD, mobile web and Digital Television possible.

• MPEG-4 builds on the proven success of three fields: – Digital television– Interactive graphics applications– Interactive multimedia

Page 82: Learning Outcome

Parts of MPEG Standard

• MPEG1:– Systems– Video– Audio– Conformance

testing– Reference

software

• MPEG2:– Systems– Video– Audio– testing compliance– Software simulation.– DSM-CC– AAC– Extension for real

time interfaces– Conformance

extensions for DSM-CC

– IPMP

Page 83: Learning Outcome

Parts of MPEG Standard• MPEG4:

– Systems– Visual– Audio– Conformance testing – Reference Software– Optimized reference

software– DMIF– AVC– AFX– Extension for real time

interfaces– Conformance extensions for

DSM-CC– IPMP– 3D Graphics Compression

Model

– Audio Conformance– 3D Graphics conformance– Carriage of ISO/IEC 14496 contents

over IP networks– Reference hardware description– Scene description & application

engine– ISO base media file format– IPMP– MP 4 file format– Streaming file format– Synthesized texture stream– SAF & LASeR– MPEG-J GFX– Open Font format – SMR– Audio and systems interaction

Page 84: Learning Outcome

MPEG Streaming Format

MPEG-1– Lower quality than

MPEG-2– Doesn’t need as much

bandwidth as MPEG-2 – A less efficient audio

compression system

MPEG-2– High Quality– High Bandwidth– Streamed from high-

output servers or network appliances.

MPEG-4 • Absorbs many of the features of MPEG-1 & MPEG-2, adding some new features.

•Aimed primarily at low bit-rate video communications.

Page 85: Learning Outcome

MPEG Streaming Format