© 2006 the University of Greenwich

314 views
293 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
314
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

© 2006 the University of Greenwich

  1. 1. Streaming Media Kevin McManus
  2. 2. (multi) Media <ul><li>Media ( n pl ) means by which something is communicated </li></ul><ul><ul><li>in the context of the web </li></ul></ul><ul><ul><ul><li>text </li></ul></ul></ul><ul><ul><ul><li>image </li></ul></ul></ul><ul><ul><ul><li>audio </li></ul></ul></ul><ul><ul><ul><li>video </li></ul></ul></ul><ul><li>Multi-media </li></ul><ul><ul><li>communication, entertainment, education, edutainment </li></ul></ul>
  3. 3. Image Encoding <ul><li>Images may be: </li></ul><ul><ul><li>Vector drawings </li></ul></ul><ul><ul><ul><li>composed of graphic primitives </li></ul></ul></ul><ul><ul><ul><ul><li>lines, curves, filled shapes, polylines, etc. </li></ul></ul></ul></ul><ul><ul><ul><li>cartoon like </li></ul></ul></ul><ul><ul><ul><li>potentially very small file sizes </li></ul></ul></ul><ul><ul><li>Bitmaps </li></ul></ul><ul><ul><ul><li>composed of pixels </li></ul></ul></ul><ul><ul><ul><ul><li>matrix of coloured dots </li></ul></ul></ul></ul><ul><ul><ul><li>photographic or cartoon like </li></ul></ul></ul><ul><ul><ul><li>potentially big file sizes </li></ul></ul></ul>
  4. 4. Image Encoding <ul><li>Compression is used to reduce the file size of bitmap images </li></ul><ul><ul><li>lossless – gif, png </li></ul></ul><ul><ul><li>lossy – jpeg </li></ul></ul><ul><ul><ul><li>variable compression rate, variable image quality </li></ul></ul></ul><ul><li>Lossy compression introduces noise and blurs detail </li></ul><ul><ul><li>not suitable for cartoon images where the noise can be apparent </li></ul></ul><ul><ul><li>more effective on photographs where the losses may not be visible at compression rate of about 3:1 </li></ul></ul><ul><li>Cartoon images compress better than photographs </li></ul><ul><ul><li>lossless compression greater than 10:1 </li></ul></ul><ul><li>Other file formats exist but are not supported by web browsers </li></ul><ul><ul><li>apart from windows bitmap (.bmp) which is only supported by IE and not a compressed format and so should never be used </li></ul></ul>
  5. 5. Image Encoding <ul><li>Bitmap images may be: </li></ul><ul><ul><li>colour mapped – 8 bits per pixel </li></ul></ul><ul><ul><ul><li>each pixel is one of a 256 colour palette </li></ul></ul></ul><ul><ul><ul><li>dithering can be used to obtain more colours </li></ul></ul></ul><ul><ul><ul><ul><li>but doesn’t look good </li></ul></ul></ul></ul><ul><ul><ul><li>not suitable for photographs </li></ul></ul></ul><ul><ul><li>full colour – 24 bits per pixel </li></ul></ul><ul><ul><ul><li>8 bits each of red, green and blue </li></ul></ul></ul><ul><ul><ul><li>256 × 256 × 256 = 16.8 million colours </li></ul></ul></ul><ul><ul><ul><li>unnecessary for cartoon images </li></ul></ul></ul>
  6. 6. Audio Encoding <ul><li>Audio files are (usually) samples of an analogue waveform </li></ul><ul><ul><li>high sample rate for fidelity </li></ul></ul><ul><ul><ul><li>44kHz @ 16 bits (x2 for stereo) for CD quality </li></ul></ul></ul><ul><li>Large file sizes for even short soundtracks </li></ul><ul><ul><li>44k * 2 bytes for each second </li></ul></ul><ul><ul><li>about 6 seconds per Mbyte </li></ul></ul><ul><li>Reduce the bit rate to reduce the filesize </li></ul><ul><ul><li>loss of fidelity </li></ul></ul><ul><li>Use compression to reduce the filesize </li></ul><ul><ul><li>lossless – wma, ape, Real Audio, flac, etc. </li></ul></ul><ul><ul><ul><li>achieve about 2:1 compression </li></ul></ul></ul><ul><ul><li>lossy – MPEG (3 & 4), AAC, Ogg Vorbis, Real Audio, wma, etc. </li></ul></ul><ul><ul><ul><li>variable compression – generally over 10:1 </li></ul></ul></ul><ul><li>MIDI – the audio equivalent of vector graphics </li></ul><ul><ul><li>small filesizes but cartoon sound </li></ul></ul>
  7. 7. Video Encoding <ul><li>Video is a set of still images </li></ul><ul><ul><li>20 - 30 frames per second </li></ul></ul><ul><ul><li>approx 400 * 300 pixel resolution for TV </li></ul></ul><ul><ul><ul><li>more for DV, DVCam, ProDV, DVD, HDTV </li></ul></ul></ul><ul><ul><li>lots of data – over 9 Mbytes per second </li></ul></ul><ul><li>May also have a soundtrack </li></ul><ul><ul><li>immense filesizes </li></ul></ul><ul><li>Video achieves high compression ratios </li></ul><ul><ul><li>only need to store changes between frames </li></ul></ul><ul><ul><li>then apply aggressive lossy encoding </li></ul></ul><ul><ul><ul><li>MPEG, QuickTime, RealVideo, wmv, XviD, DivX, etc. </li></ul></ul></ul><ul><ul><li>codec wars – the battle for broadcast supremacy </li></ul></ul>
  8. 8. Video Media and the WWW <ul><li>Entertainment has become a powerful motivator for web development </li></ul><ul><li>In 2006 the UK teen and young adult demograph will spend more time online than watching TV </li></ul><ul><ul><li>UK had only 13.5 broadband connections per 100 citizens (Oct 2005) </li></ul></ul><ul><ul><ul><li>puts UK 13 th in the world - ahead of the USA </li></ul></ul></ul><ul><ul><li>Swindon has 51% broadband uptake (Aug 2006) </li></ul></ul><ul><li>Broadcast TV companies are only beginning to provide video over the Web </li></ul><ul><li>BT are planning to transmit television programmes and movies across its broadband network </li></ul><ul><ul><li>using Microsoft IPTV </li></ul></ul><ul><li>BBC remit is to make their entire library available </li></ul>
  9. 9. Video Media and the WWW <ul><li>Network bandwidth is finite </li></ul><ul><li>There is a tension between video quality (picture and soundtrack) and download time </li></ul><ul><ul><li>a DVD stores about 2 hours of video in 8 Gbytes </li></ul></ul><ul><ul><ul><li>this is a data rate of about 1 Mbyte per second </li></ul></ul></ul><ul><ul><li>XviD/DivX stores about 90 minutes of video in 700Mbytes </li></ul></ul><ul><ul><ul><li>or about 130 kbytes per second </li></ul></ul></ul><ul><li>Use streaming to overlap download time with viewing/listening time </li></ul><ul><ul><li>the media is not necessarily saved for future playback </li></ul></ul>
  10. 10. Streaming <ul><li>With downloading playback has to wait for the download to complete </li></ul><ul><li>With streaming media are transmitted piecemeal and playback can commence before the transfer is complete </li></ul><ul><ul><li>as soon as there is a reasonable buffer </li></ul></ul>
  11. 11. Streaming <ul><li>Streaming is a real time process </li></ul><ul><li>If a packet is lost in transmission there is no point in resubmitting the packet </li></ul><ul><ul><li>as with TCP which seeks to guarantee transmission </li></ul></ul><ul><li>User Datagram Protocol (UDP) is a lightweight IP protocol that does not guarantee delivery </li></ul><ul><ul><li>suitable for streaming </li></ul></ul><ul><li>Require a media encoding technique that can tolerate lost packets </li></ul><ul><ul><li>divide the media into many small packets so that lost packets are not noticed </li></ul></ul>
  12. 12. Streaming Protocols <ul><li>Real Time Streaming Protocol </li></ul><ul><ul><li>RealMedia, QuickTime, mp3, MPEG-4 </li></ul></ul><ul><ul><li>open standards based </li></ul></ul><ul><ul><ul><li>Built on UDP/IP </li></ul></ul></ul><ul><ul><li>widely supported </li></ul></ul><ul><ul><li>rtsp://cms-stu-iis.gre.ac.uk/student/mk05/x.rm </li></ul></ul><ul><li>Microsoft Media Server </li></ul><ul><ul><li>proprietary </li></ul></ul><ul><ul><li>windoze media only </li></ul></ul><ul><ul><li>mms://cms-stu-iis.gre.ac.uk/mk05/x.wmv </li></ul></ul>
  13. 13. Streaming Protocols <ul><li>Most streaming media will stream over HTTP </li></ul><ul><ul><li>no reason why streaming media should not commence playback before download completes </li></ul></ul><ul><li>But HTTP is a TCP/IP protocol </li></ul><ul><ul><li>bandwidth and hence time may be wasted attempting to re-submit missed packets after they were needed </li></ul></ul><ul><li>May clog up your client web cache as the downloads will be retained </li></ul><ul><li>Shockwave is rather different as it can control downloads using action script within a shockwave movie </li></ul>
  14. 14. Encoding for Streaming <ul><li>Need to decide how the media is to be encoded </li></ul><ul><ul><li>select frame size and frame rates </li></ul></ul><ul><ul><ul><li>640 × 480 pixels, 25 fps </li></ul></ul></ul><ul><ul><li>select compression loss level </li></ul></ul><ul><ul><ul><li>best quality / smallest file size </li></ul></ul></ul><ul><ul><li>select audio sample rate </li></ul></ul><ul><ul><ul><li>44kHz hi-fi, 22kHz lo-fi, 11kHz, speech </li></ul></ul></ul><ul><ul><li>all of the above could be simplified as a selection of bandwidth </li></ul></ul><ul><ul><ul><li>10 Mbit, 1Mbit, 500kbit, etc. </li></ul></ul></ul>
  15. 15. Encoding for Streaming <ul><li>Multiple rate encoding allows run-time selection of the appropriate playback rate </li></ul><ul><li>If the client buffer begins to empty then the server can dynamically fall back to a lower quality transmission </li></ul><ul><ul><li>as opposed to running out of buffer and stalling </li></ul></ul><ul><li>Supported by Real Media and Windows Media </li></ul><ul><ul><li>Real Media requires the Real Networks Helio Media Server to make this work </li></ul></ul>
  16. 16. Encoding for Streaming <ul><li>Adobe Premiere </li></ul><ul><ul><li>lots of options including RealMedia and QuickTime </li></ul></ul><ul><ul><li>expensive </li></ul></ul><ul><li>Real Producer </li></ul><ul><ul><li>the basic model is free and does an awful lot of clever things </li></ul></ul><ul><li>Windows media encoder </li></ul><ul><ul><li>free! </li></ul></ul>
  17. 17. Broadcast <ul><li>Broadcasting of streamed media remains in it’s nascency </li></ul><ul><ul><li>many internet radio stations but few TV stations </li></ul></ul><ul><ul><ul><li>systems such as the popular SHOUTcast or Icecast simply provide multiple RTSP feeds </li></ul></ul></ul><ul><li>Webcasts are being attempted experimentally (Live8) </li></ul><ul><ul><li>scalability is an issue </li></ul></ul><ul><ul><li>require a multicast technology in which the available bandwidth increases as more clients attach </li></ul></ul><ul><li>IP Multicast such as the experimental Mbone (Multicast backbone) is finding use for videoconferencing </li></ul><ul><ul><li>security is an issue as anyone could spoof as sender </li></ul></ul><ul><li>IPV6 will hopefully provide solutions </li></ul>
  18. 18. Streaming Media Clients <ul><li>Most web clients can play streaming media by using a plug-in or helper </li></ul><ul><li>Real Player is a full featured web browser and media player </li></ul><ul><ul><li>Real do a good job of hiding the free download version but it is worth getting </li></ul></ul><ul><li>QuickTime player integrates iTunes to provide a seamless interface with the ubiquitous iPod </li></ul><ul><li>Winamp is clearly the nicest audio tool </li></ul><ul><ul><li>first cousin to SHOUTcast </li></ul></ul><ul><li>Windows Media Player if you really must </li></ul>
  19. 19. Conclusions <ul><li>Codec technologies are well advanced </li></ul><ul><ul><li>unlikely to see any great advances in compression </li></ul></ul><ul><ul><li>still a lot of fighting over licensing </li></ul></ul><ul><li>Although broadband uptake is accelerating rapidly bandwidth remains a scarce commodity </li></ul><ul><ul><li>still waiting for the infrastructure to be installed – largely down to BT and NTL </li></ul></ul><ul><ul><li>unlikely to get much more bandwidth out of copper telephone cables </li></ul></ul><ul><li>Current bandwidth can barely sustain DVD quality </li></ul><ul><ul><li>what about HDTV? </li></ul></ul><ul><li>Broadcasting has not been resolved over IP </li></ul><ul><li>Video on demand is arriving on satellite </li></ul><ul><ul><li>BBC are thinking about peer-peer systems to provide access to their library </li></ul></ul>

×