730 likes | 745 Views
Digital Video, Image Resolution, Compression, Bit Rate
E N D
Digital Video ClassSpring 2006 Internet2 Member Meeting Larry Amiot Northwestern University amiot@northwestern.edu And Dave Devereaux-Weber University of Wisconsin at Madison dave@doit.wisc.edu
Agenda • Analog/Digital Video • Digital Video ABCs • Digital Video Applications • Break • Digital Academic Television Network • Program Guide • Question and Answer • Demonstrations
Video – Analog and Digital • Analog • Original broadcast television was black & white • 262 ½ odd and 262 ½ even lines (fields) are interlaced to conserve bandwidth • 60 fields per second • 15,750 lines per second
National Television System Committee (NTSC) • A committee appointed by the Federal Communications Commission • Set standards for US television
Composite Video • Video and synchronizing pulses on the same wire • 1 volt peak-to-peak • 100 IRE (Institute of Radio Engineers)units of video • 40 IRE units of sync
NTSC does Color • Backwards compatible with B&W • Color information added with a subcarrier • Saturation represented by subcarrier amplitude • Hue represented by subcarrier phase
RGB • 3 connections: red, green & blue • Full bandwidth, full resolution, full detail
Digital Video • Over the air in the US, the standards body for digital is the Advanced Television Systems Committee http://www.atsc.org/ • One family of digital video encoders & decoders (codecs) is MPEG • Named from the Moving Pictures Experts Group • http://www.mpeg.org/
Digital Video • DVB is a standard for digital vide broadcasting • Originally European, now used around the world • http://www.dvb.org
Digital Video • DV • Standard used by Sony, Avid, Apple Microsoft, others • (Doesn’t use MPEG)
IP, Codecs & Business Model • Codecs include Intellectual Property (IP) • IP often protected by patents • Need to license patented IP
IP, Codecs & Business Model • Windows Media (Microsoft), user cost is free, subsidized by sale of Microsoft software • Quicktime (Apple Computer), user cost is free, subsidized by sale of Apple Computers • Real Media player is free, server is paid, no hardware or software to subsidize
IP, Codecs & Business Model • License for MPEG-2 Player is $2.50 each • MPEG-2 codec not included with Windows Media or Quicktime • MPEG-4 codec included in Windows Media & Quicktime
IP, Codecs & Business Model • VideoLAN http://videolan.org/ is free, open source • Has codecs with IP issues (MPEG-2) • Does not pay a license fee for IP • Use of VideoLAN may carry IP risk.
Understanding Digital Video Quality • Three important factors • Image resolution • Compression • Bit rate of the compressed video stream
Image Resolution • What is a pixel? • Tiny square or rectangular, colored picture elements on a LCD, plasma, DLP, or projection LCD monitor • Tiny round, color phosphor dots on a CRT • A value (e.g. 8 bit or 24 bit) defining color and luminescence
Image Resolution • What is resolution? • The number of pixels on an image or on a frame of a video • The more pixels, the better the resolution • Usually expressed as the horizontal pixels times the vertical resolution • E.g. 720x480
Image Resolution • Interlaced Scan • Draw odd lines first, then the even lines • Full motion video requires frames every 1/60 of a second • The way NTSC does it • Progressive scan • Drawn top to bottom • Full motion video is 30 frames per second
Image Resolution • Standard Definition Television (SDTV) • A set of digital television standards with 480 lines of resolution • At least as good if not better than NTSC • A subset of the Digital TeleVision standards (DTV) • All SDTV formats are interlaced
Image Resolution • DTV standards • ATCS is the standard in North America • All use MPEG2 compression • 18 digital formats covering: • Standard definition • Enhanced definition • High definition
High Definition TV 1. 1920 x 1080 16:9 24p Square 2. 1920 x 1080 16:9 30p Square 3. 1920 x 1080 16:9 30i* Square 4. 1280 x 720 16:9 24p Square 5. 1280 x 720 16:9 30p Square 6. 1280 x 720 16:9 60p* Square Enhanced Definition TV - 480p 7. 704 x 480 16:9 24p Rectangle 8. 704 x 480 16:9 30p Rectangle 9. 704 x 480 16:9 60p* Rectangle 10. 704 x 480 4:3 24p Rectangle 11. 704 x 480 4:3 30p Rectangle 12. 704 x 480 4:3 60p* Rectangle 13. 640 x 480 4:3 24p Square 14. 640 x 480 4:3 30p Square 15. 640 x 480 4:3 60p Square Standard Definition TV- 480i 16. 704 x 480 16:9 30i Rectangle 17. 704 x 480 4:3 30i*Rectangle 18. 640 x 480 4:3 30i Square * most popular formats DTV Formats
Image Resolution • CIF • A video format widely used in videoconferencing • Common Intermediate Format (CIF) QCIF - Quarter CIF (resolution 176x144) SQCIF - Sub quarter CIF (resolution 128x96) CIF- Full CIF (resolution (352x288) 4CIF - 4 x CIF (resolution 704x576) 16CIF - 16 x CIF (resolution 1408x1152)
Compression • Spatial Redundancy • Takes advantage of identical picture elements within a video frame • Temporal Redundancy • Takes advantage of identical picture elements between frames • Takes advantage of the movement of identical picture elements between frames (motion vector) • PsychovisualRedundancy • Takes advantage of human eyes limited response to fine spatial detail
Compression • Lossless compression • You can take the compressed data and uncompress it to obtain an identical copy of the original uncompressed data • E.g. TIFF image • Lossy compression • You can not get the original data by uncompressing • Allows much greater compression than lossless compression • E.g. MPEG
JPEG Compression • A standard of the Joint Photographic Experts Group • A lossy compression technique • Handles still images • The degree of lossiness can be varied by adjusting compression parameters- trade quality for file size • You can also trade off decoding speed against image quality
JPEG Compression • A 24 bit per pixel color scheme as compared to GIF which is 8 bit • Can easily provide 20:1 compression of full-color data (about four times better than GIF but slower to decode) • Motion JPEG (M-JPEG) provides a video stream • but it is not a standard • Does not use inter frame compression
MPEG Compression • MPEG is recognized standard for motion picture compression • Uses many of the same techniques as JPEG, but adds inter-frame compression • Compresses by about a factor of 3 better than M-JPEG except at very low frame rates • Takes more computation than JPEG to compress • Difficult to edit on a frame by frame basis
Intra Frame Encoding-I Frames • Every frame is encoded separately • Easy to edit • Fast to decode • Lost frame produces small artifact I I I I I I I I
Inter Frame Encoding-I and P Frames • Forward predicted from the last I-frame or P-frame • Better compression • A little harder to decode • More difficult to edit • More artifacts if a frame is lost • Buffering of previous frame required • Frames sent in order
Inter Frame Encoding-I, P, and B Frames • B-frames are both, forward predicted and backward predicted from the last/next I-frame or P-frame • Best compression • Hardest to decode • Most difficult to edit • More artifacts with lost frames • More buffering required • Frames not sent in order Sent IPBBBPBBB
So what’s a GOP? • A set of frames, typically between 4 and 20, is called a Group Of Pictures • At most one frame in the GOP can contain a reference to a frame in another GOP • Some GOPs do not reference any other GOP • E.g. IBBPBBP
MPEG Compression • Three defined standards • MPEG1 • MPEG2 • MPEG4
MPEG1 • Optimized to work at video resolutions of 352x240 pixels at 30 frames/sec and 1.5 Mbps • May go as high as 4095x4095 at 60 frames/sec • Progressive scan only
MPEG2 • Target bit-rate was raised to between 4 and 9 Mbps • Commonly used at 720x480 resolution video at 30 frames/sec, at bit-rates up to 15 Mbps • Also used for HDTV resolution of 1920x1080 pixels at 30 frame/sec, at a bit-rate of up to 80 Mbps • Can do interlaced
MPEG4 • Originally optimized for very low bit rate communication at rates less than 64 Kbps • Currently used in videoconferencing for HD at speeds up to 4 Mbps
H.323-based Videoconferencing • An International Telecommunications Union (ITU) umbrella standard for videoconferencing across IP networks • Includes protocols for: • Video (i.e. H.261, H.263, and H.264) • Audio (G711, G722, etc) • Control (H.245, etc)
H.261 Compression • Part of the H.323 videoconferencing set of standards • Originally for two way communication over ISDN lines- now over the Internet • Supports intra and inter frame compression • Resolutions supported • QCIF(144x176 pixels) • CIF(288x352)
H.263 Compression • Part of the H.323 videoconferencing set of standards • Based on H.261 but with enhancements to improve video quality • Resolutions supported • QCIF(144x176) • CIF(288x352) • SQCIF (128x96) • 4CIF (704x576) • 16CIF(1408x1152)
H.264 Compression • Part of the H.323 videoconferencing set of standards • H.264, MPEG4, & AVC (Advanced Video Coding) are related codecs for achieving very high compression • Adds B frames to compression • Ultra-efficient technology that gives you excellent results across a broad range of bandwidths, from 3G for mobile devices to iChat AV for video conferencing to HD for broadcast and DVD • Used in QuickTime 7
H.264 Compression • H.264 delivers the same quality as MPEG-2 at a third to half the data rate • H.264 Part 10 delivers up to four times the frame size of MPEG-4 Part 2 at the same data rate • Resolutions supported • SQCIF (128x96) • 720p HD (1280x720) • 1080 HD (1920x1088)
DV and MiniDV • A format developed by several manufacturers for recording on cassettes • 500 line horizontal resolution • Utilizes the IEEE 1394 digital interface (Firewire) • Bit rate of 25 Mbps • The sampled video is compressed using a Discrete Cosine Transform (DCT), the same sort of compression used in motion-JPEG • 5:1 intraframe compression only
Bit Rate • The quality of the video is directly related to the bit rate of the stream • Low compression streams require more bandwidth • Many codecs dynamically adjust the quality (compression) according to the amount of bits that are produced
Bit Rate • Variable bit rate • Number of bits produced by the codec and sent varies according to the redundancy and motion being compressed at any moment • Fixed bit rate • Bits to be transferred are buffered • If the codec starts producing information faster than the buffering can handle, feedback to the codec reduces the quality (compression) and thus the number of bits produced
Bit Rate • The quantization (Q) level of an MPEG stream is a measure of the amount of data the encoder throws away to bring the bit rate down • Higher Q values mean the encoder threw away a lot of data, implying a low bit rate, but also low visual quality • A low Q level implies a high bit rate, and high visual fidelity • You can keep a constant bit rate by varying the Q level • Alternatively, you can keep a constant Q level and allow the bit rate to vary
High Compression Less video quality More buffering required More latency Less bandwidth required More complex hardware Less storage required More susceptible to packet loss More difficult to edit Low Compression Better video quality Less buffering required Less latency More bandwidth required Less complex hardware More storage required Less susceptible to packet loss Less difficult to edit Compression Trade Offs