Your SlideShare is downloading. ×

© 2006 the University of Greenwich


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


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