4ded2b0dc133d5027c7bd5438d49f100.ppt
- Количество слайдов: 85
EEC 4113 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 – Application Layer Protocols – Formats and Compression schemes of Multimedia Data – Some available multimedia techniques for the internet
Chapter Content • Application Layer Protocols – HTTP, FTP, SMTP, POP(3) • Multimedia Transfer Techniques • Multimedia Transfer in Practice – Vo. IP, IPTV, Video & Audio Streaming • Compression of Multimedia Data
Application Layer Protocols
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)
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 Base 64
Application Layer Protocols • The protocols are also called process-toprocess 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
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
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
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 connectdisconnect sessions of HTTP to download the 3 images
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
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
HTTP Request • GET Request examples: – GET /images/logo. png HTTP/1. 0 User-Agent: Mozilla/5. 0 (Linux; X 11) Accept-Language: en Request Header Blank line – GET /images/logo. png HTTP/1. 1 Specific domain name Host: www. muhazam. com User-Agent: Mozilla/4. 0 (compatible; MSIE 7. 0 b; Windows NT 6. 0 Accept-Language: en Query string – GET /script/student. asp? name=ain HTTP/1. 0 User-Agent: Mozilla/5. 0 (Linux; X 11) Accept-Language: en
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
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: "3 f 80 f-1 b 6 -3 e 1 cb 03 b" Accept-Ranges: bytes Content-Length: 438 Connection: close Content-Type: text/html; charset=UTF-8
. . . Response Header Blank line ContentFTP • 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, Cute. FTP, etc • Nowadays browsers are already equipped with some FTP capabilities
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
FTP • Specifying URL: ftp: //[
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
SMTP • Example: S: 220 smtp. example. com ESMTP Postfix C: HELO relay. example. org S: 250 Hello relay. example. org, I am glad to meet you C: MAIL FROM:
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
Multimedia Transfer Techniques
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
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
Web Server Technique Browser Request Web Server Delegation Streaming Media Player
Web Server Technique • Advantage: Easiest to implement and least costly • Disadvantage: Still rely on normally slow web servers
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
Streaming Server Technique Browser Request Web Server Delegation Media Player Streaming Server
Streaming Server Technique • Advantage: Speedier and more reliable, even though still as HTTP transfer • Disadvantage: Requires an extra and more expensive server
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
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 rearranged back to the original sequence • If any group lost, it only causes small distributed jittering instead of a long wait for that lost group
Reducing Delay Interleave Streaming LOST Re-arrange Small less annoying but distributed jitters
Multimedia Transfer in Practice
Radio over Internet Protocol(Ro. IP) • Ro. IP takes Internet Protocol (IP) input that convert communications stream to IP • Ro. IP 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 Ro. IP Slides contributed by: ABDUL MUIZ BIN SHAHIDAN, MUHAMMAD ATIQ B CHE MOHD ROSLI
Radio over Internet Protocol(Ro. IP) • Session Initiation Protocol - SIP System Diagram Ro. IP is not just about linking radios
Radio over Internet Protocol(Ro. IP) • HTML code for hot FM radios: •
Radio over Internet Protocol(Ro. IP) • List of stations:
Radio over Internet Protocol(Ro. IP) • Malaysia Listing: • Radio MMU (Multimedia University) • i. Radio 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
Radio over Internet Protocol(Ro. IP) • 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.
Voice over IP (Vo. IP) • Voice over Internet Protocol (Vo. IP)-technology that allows you to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line. • Some Vo. IP 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 Vo. IP services only work over your computer or a special Vo. IP phone, other services allow you to use a traditional phone connected to a Vo. IP adapter. Vo. IP Slides contributed by: NURUL MARLIANA BT MUSA, SUHANA BINTI MOHD TAHIR
Voice over IP (Vo. IP) • Providers: – Skype (peer to peer program – both side must have Skype installed) – Zamir Telecom Limited – Google Voice
Voice over IP (Vo. IP) • Protocols: – MEGACO (H. 248) – MGCP – MIME – RVP ( Remote Voice protocol ) – SDP – SIP – SGCP – SKINNY
Voice over IP (Vo. IP) • 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.
Voice over IP (Vo. IP) • Advantages (continued): – Location independence • Only a sufficiently fast and stable Internet connection is needed to get a connection from anywhere to a Vo. IP provider
Voice over IP (Vo. IP) • The operation: • Vo. IP 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. • Vo. IP can allow you to make a call directly from a computer, a special Vo. IP 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 Vo. IP service wirelessly.
Voice over IP (Vo. IP) • Example of residential network including Vo. IP:
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
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-See. Me video conferencing software
IPTV • Three main components: – TV and content head end • where the TV channels are received and encoded – Delivery network • Consists of broadband landline network provided by telecom operator
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
IPTV • Protocols: – For live TV programs • IGMP version 2 or IGMP version 3 for IPv 4 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)
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.
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
IPTV • Advantages of IPTV (cont): – Lower cost for operator and user – Ability to integrate a TV with other IPbased services like high speed Internet access and Vo. IP
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
Video Streaming • File formats: 1 - Windows Media video 6 - Flash Live Video (. wmv) (FLV) 2 - Real. Media (. rm) 7 - Audio Video Interleave (. avi) 3 - Quicktime 8 - Apple Quick Time 4 - MPEG (. mpg) Movie (. mov) 5 - Adobe Flash 9 - DVD Video Object (. vob)
Video Streaming • Protocols – HTTP • Sending data from web server to web browser. – MMS (MICROSOFT MEDIA SERVICES) • Net. Show services. – RTSP (REAL TIME STREAMING PROTOCOL) • Developed by IETF & published in 1998. • Allows client remotely control streaming media server.
Video Streaming • HTML Tags: – ADOBE FLASH PLAYER • • Runs SWF files Created by Adobe Flash authoring tools Action. Script (AS) Available as plugin
Video Streaming • HTML Tags : – HTML 5 VIDEO • Element introduced in the HTML 5 • Example:
Video Streaming • Screen shot:
Compression of Multimedia Data
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
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
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 compressiondecompression, but not the semantic content – Use: voice, image, video file
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)
Huffman Coding • This might be the oldest compressing technique that was invented by a Ph. D student in MIT (Huffman) • Requires prior knowledge of the file (statistical frequency) – table of symbols and their frequency • It is a lossless scheme
Huffman Coding Algorithm: 1. Sort the frequencies from largest to smallest 2. 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 frequency 4. Repeat (1) – (3) until there is no more symbol in list – Huffman tree is formed 5. 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
Huffman Coding Example: Compute a possible Huffman code for the following symbol-frequency table: f symbol 69 A 18 D 15 T 12 M 6 Q 3 X
Huffman Coding Initial: A: 69 D: 18 T: 15 M: 12 Q: 6 X: 3 Combine the last 2 (no re-arrange needed): A: 69 D: 18 T: 15 M: 12 : 9 Q: 6 0 X: 3 1
Huffman Coding Combine the last 2 again: A: 69 D: 18 T: 15 : 21 M: 12 : 9 1 0 Q: 6 0 X: 3 1
Huffman Coding Re-arrange: A: 69 : 21 M: 12 D: 18 : 9 1 0 Q: 6 0 X: 3 1 T: 15
Huffman Coding Combine: A: 69 : 21 M: 12 : 33 : 9 D: 18 1 0 Q: 6 0 0 X: 3 1 T: 15 1
Huffman Coding Re-arrange: A: 69 D: 18 0 : 33 : 21 T: 15 M: 12 1 : 9 1 0 Q: 6 0 X: 3 1
Huffman Coding Combine: A: 69 : 54 0 D: 18 0 : 33 : 21 T: 15 M: 12 1 1 : 9 1 0 Q: 6 0 X: 3 1
Huffman Coding Final combination: : 123 0 A: 69 : 54 0 D: 18 0 1 : 33 : 21 T: 15 M: 12 1 1 : 9 1 0 Q: 6 0 X: 3 1
Huffman Coding The Huffman code: A: 0 D: 100 T: 101 M: 110 Q: 1110 X: 1111 1 bit 3 bits 4 bits The compressed file size: Total of [(no. symbol’s bits) × (symbol’s frequency)] A: 1× 69 D: 3× 18 T: 3× 15 M: 3× 12 Q: 4× 6 X: 4× 3 = 69 bits = 54 bits = 45 bits = 36 bits = 24 bits = 12 bits Total = 240 bits = Round-up(240/8) = 30 bytes
Huffman Coding Compression ratio: Assume that the symbols were originally encoded by normal binary coding, the required bits per symbol is: = Round-up(Log 2(No. symbols)) = 3 Total uncompressed file size = 3× 123 = 369 bits = 47 bytes Compression ratio= (47− 30) / 47 = 17 / 47 = 0. 362 = 36. 2%
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
MPEG 1 • 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.
MPEG 2 • 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
MPEG 4 • 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
Parts of MPEG Standard • MPEG 1: – Systems – Video – Audio – Conformance testing – Reference software • MPEG 2: – – – – Systems Video Audio testing compliance Software simulation. DSM-CC AAC Extension for real time interfaces – Conformance extensions for DSMCC – IPMP
Parts of MPEG Standard • MPEG 4: – – – – Systems Visual Audio Conformance testing Reference Software Optimized reference software DMIF AVC AFX Extension for real time interfaces Conformance extensions for DSM-CC IPMP 3 D Graphics Compression Model – Audio Conformance – 3 D 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 & LASe. R – MPEG-J GFX – Open Font format – SMR – Audio and systems interaction
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 highoutput 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.
MPEG Streaming Format