• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Avlm 2009  Compression   Erik Luyten
 

Avlm 2009 Compression Erik Luyten

on

  • 1,187 views

 

Statistics

Views

Total Views
1,187
Views on SlideShare
1,183
Embed Views
4

Actions

Likes
0
Downloads
11
Comments
0

1 Embed 4

http://1350625223.nvmodules.netvibes.com 4

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Avlm 2009  Compression   Erik Luyten Avlm 2009 Compression Erik Luyten Presentation Transcript

    • compression from production format to distribution format
    • What's this ? René Margritte: La Trahison des Images (1928-29) 26/05/09 AVLM Training 2
    • Moving images !? 26/05/09 AVLM Training 3
    • Temporal resolution 2 images/second 5 images/second 12,5 images/second 25 images/second 26/05/09 AVLM Training 4
    • Spatial resolution 7 x 10 = 70 14 x 20 = 280 28 x 40 = 1120 56 x 80 = 4480 112 x 160 = 17920 224 x 320 = 71680 448 x 640 = 309120 26/05/09 AVLM Training 5
    • Color resolution 24 bit color pallet 8 bit color pallet 8 bit optimized pallet 4 bit color pallet 4 bit color pallet 244 KB file 28 KB file 28 KB file No “dithering” 16 KB file 26/05/09 AVLM Training 6
    • Video signal(uncompressed) 768 (720) pixels Each pixel has 3 values: (3 bytes) 25 images/second • Red: 256 steps (1 byte) • Green: 256 steps (1 byte) • Blue: 256 steps (1 byte) Datarate for the RGB video signal: 768(pix) x 576(lines) x 3(byte) x 25(images)=32 MByte/sec(256 Mbit/sec) Datarate for the component video signal: 720(pix) x 576(lines) x 2(byte) x 25(images)=20 MByte/sec(160 Mbit/sec) 26/05/09 AVLM Training 7
    • Audio signal Sampling Rate: 44,1 kHz (CD) Bit Depth: 16 bit (65.536 steps) Stereo: x 2 16 bit x 2 x 44.100 = 1.411.200 bps 1,4 Mbit/sec Production systems normally use a sampling rate of 48 kHz 16 bit x 2 x 48.000 = 1.536.000 bps 26/05/09 AVLM Training 8
    • Video distribution ?  1 second video: 32 Mbyte (256 Mbit/sec)  1 minute video: 1,9 GByte  1 hour video: 111 GByte Disk Network  floppy disk = 0,05 seconds  Ethernet 100 Mbit/sec (shared) LAN 1/2.5  CD-rom = 20 seconds  Ethernet 10 Mbit/sec (shared !) LAN 1/25  1 Gbyte hard disk = 32 seconds  ISDN lijn ( 2B + D) : 128Kbit/sec 1/2000  16 Gbyte array = 8 min 30 sec  Modem connection : 56 Kbit/sec 1/4600 26/05/09 AVLM Training 9
    • Compression techniques Lossless No information loss Lossy (Important) information is lost (f.i. medical applications) Intraframe (spatial compression) Compression within a single frame Interframe (temporal compression) Compression between successive frames Symmetric Coding and decoding equally processor intensive Asymmetric Coding is more processor intensive than decoding 26/05/09 AVLM Training 10
    • Intraframe compression (in one frame) Run Length Encoding •without compression: one line of 100 (white) pixels 100 x 3 bytes = 300 bytes 100 • RLE compression pixels 100 identical white pixels in a row 2 bytes: total amount of pixels involved 3 bytes for the colour information 2 + 3 = 5 bytes of info for 100 pixels •Compression factor of 60:1 without information loss 26/05/09 AVLM Training 11
    • Other Intraframe techniques Discrete Cosine Transformation •JPEG, MPEG, DV,… •Type of Fourier Transformation •Blocks of 8 x 8 pixels and/or 16 x 16 Wavelet Compression •MPEG-4 (still image), JPEG2000 •Improving image resolution as more data are received Vector Quantization Fractal Compression 26/05/09 AVLM Training 12
    • Interframe compression Image 124 Image 125 26/05/09 AVLM Training 13
    • Interframe: MPEG (Moving Picture Expert Group) GOP Group Of Pictures I-pictures:(Intra pictures) reference image with complete information for one frame (scene changes, ...) P-pictures:(Predicted pictures) images are “predicted” using the information in earlier I or P pictures. B-pictures:(Bi-directional predicted) pictures are recomposed from information in earlier or later I or P pictures. B-pictures are never used as reference for other images. I B B P B B P B B P B B I Group Of Pictures (GOP) 26/05/09 AVLM Training 14
    • Movie Formats File Format: Specifies how data are arranged in a file (interleaving video and audio) Codec: Specifies how (image) data is compressed Architecture: Synchronisation of different media components (video, audio, language tracks, text,…. tracks) Control for interactivity, alternate tracks,… 26/05/09 AVLM Training 15
    • Movie Architectures • QuickTime • AVI • Windows Media Player • Real Media • Flash ? • MPEG-4 26/05/09 AVLM Training 16
    • Media platform platform distribution cost alternates remarks RTSP alternates QTVR, text, midi, SMIL,.. Player = free production and Mac CD rom HTTP alternates QuickTim Windows Download (HTTP) Pro = €30 distribution Mixed alternates e (Linux) Streaming (RTSP) Server= open Skip prot.,instant - H.264 srce on Player = free RTSP alternates Windows Streaming (RTSP) Superpass=$13/ (Surestream only distribution and Real Mac Download (HTTP) m techn.) mainly for streaming Linux Server=payable Dynamic Windows Streaming ( ) Player=free Production anddistribution Windows (Mac) Download (HTTP) RTSP alternates Server= Version 9 on windows Media Dynamic (Linux) CD rom Windows2003 platform Flash Windows CD rom (Spark, Player=free Mac Download (HTTP) Server=€4759 ? H.264 On2, Linux Streaming h264) Player=QT, Industrie standaard Streaming (RTSP) Windows Real,… Download (HTTP) scalable (in the from handheld to HD MPEG-4 Mac Server=open future) 24/05/09 AVLM training CD rom srce 17 Linux DVD, GSM, …. H.264
    • File Formats • DV • MPEG-1 • MPEG-2 • MPEG-4 26/05/09 AVLM Training 18
    • Codec’s • Picture: • Cinepak • Indeo (Intel Indeo) • H.261, H.263, H.264 • Sorenson • M-JPEG • MPEG-1, MPEG-2, MPEG-4 • DV • Sound: • IMA • Qualcomm PureVoice, Qdesign Music,… • MP3 • AAC (Advanced Audio Coding) • WMA, RealAudio 26/05/09 AVLM Training 19
    • Codec’s and bitrate Web ? Distribution codec’s Production codec’s 56 kbit 200 kbit 1 Mbit 9 Mbit 25 Mbit 256 Mbit uncompr. MPEG-1 MPEG-2 H-261 H-263 Sorenson DV profile 0 profile 1 MPEG-4 MPEG-4 H.264 PIM, GSM, ... HD distribution Studio production 26/05/09 AVLM Training 20
    • MPEG-1, MPEG-2 MPEG-4 difference display and video scaling Decompression compression Composition subtitles Rendering display and transport and background scaling graphics MPEG-4 display Scaling, Rendering Decompression video Bitmap stream transport Composition Compression subtitles ASCI code transport display and background Bitmap image transport graphics Vector code transport 26/05/09 AVLM Training 21
    • Video to Computer • Video recording • Interlaced, 25 frames - 50 fields per second • Restricted to 576 effective lines (PAL) and 3x4 picture aspect ratio. • Computer image • Non-interlaced, 60 to 80 frames per second • No restrictions on picture format and aspect ratio • De-interlacing of video material is desirable. 26/05/09 AVLM Training 22
    • De-interlacing Field 1 313 Field 2 1 314 2 315 3 623 311 624 312 625 313 26/05/09 AVLM Training 23
    • Delivery methods • DVD, CD, USB stick,… • Internet • Progressive download (HTTP, FTP) • “file transport” type (TCP protocol) • No data loss: resent lost packages • No real-time events • Complete file must be downloaded to allow random access. • No special server needed (normal web service over http) • Streaming media (RTP) • RTSP transport (UDP protocol) • Lost data (probably) will not be recovered • Real-time events possible • “Random access” possibility (only needed fragments will be downloaded) • Needs one or more(worldwide proxy delivery) streaming servers 26/05/09 AVLM Training 24
    • IP distribution HTTP RTSP Streaming RTSP Streaming Progressive Download Unicast Multicast TCP (http) UDP (RTP) UDP (RTP) Protocol/Port Port 80 Port 554, 7070,... (80) Port 554, 7070,... Packet loss (quality) No (resent) Yes (discard) Yes (discard) 100 % 5-8 seconds 5-8 seconds Buffering complete file latency latency WWW server Servers Apache, NT,... Streaming Server RTP Streaming Server RTP Same as Web access UDP(RTP) access Only in multicast Firewall no problems Proxy server, http tunnel enabled segments Live broadcast No Ja (through relay server) Yes Recorded mat. Yes Yes Yes Yes Video on Demand (after complete download) Yes No Alternates Yes Yes Yes Copy protected Can be circumvented Can not be saved (easily) Can not be saved (easily) 26/05/09 AVLM Training 25
    • QuickTime ? • QuickTime is a container that allows other media to work in synchronization with video and audio. • QuickTime is more than video and provides functionality for: • QuickTime VR • Interactivity (Flash, JavaScript, Wired Sprites, Pop-up menu, chapter track, http track, ....) • Components (Zoomify, Pulse, Kaydara, ...) • FastStart download and/or RTSP streaming • Alternates for: • Network connection(datarates) • Language versions (audio track and/or subtitle track) • Processor speed, QT version, choke speed 26/05/09 AVLM Training 26
    • Compression settings ? The download data rate for progressive download can be higher than the network connection limit. The client application simply waits until enough data have been received before activating the play button. (no information is lost) With streaming the stream data rate has to be lower than the network connection limit. There will be no time to recover lost or late packages and the client application will only receive partial information resulting in frozen images and broken sound. download streaming small medium large 112 256 384 Image size 240x180 320x240 480x360 240x180 240x180 320x240 Images/sec 12,5 25 25 12,5 12,5 25 h.264 h.264 h.264 h.264 h.264 h.264 Codec VBR VBR VBR CBR CBR CBR Audiocodec MPEG-4 MPEG-4 MPEG-4 MPEG-4 MPEG-4 MPEG-4 sample rate 16000 32000 48000 22kMono 16000 16000 Target bitrate 168+32 436+64 896+128 64+16 176+32 276+32 V+A kbits/sec 200 500 1024 80 208 308 26/05/09 AVLM Training 27
    • Reference movie with alternates client Toledo server External web server QT Streaming server 26/05/09 AVLM Training 28
    • Tools windows mac OSX Adobe Premiere Final Cut Pro Digitalisation Sorenson Squeeze (499$) Sorenson Squeeze (499$) Movie Maker, AVID,... iMovie, AVID,.... Adobe Premiere Final Cut Pro Editing Movie Maker, Avid iMovie, AVID QT Pro (€40) QT Pro(€40) Episode ($495) Episode ($495) Compression Sorenson Squeeze Sorenson Squeeze Cleaner XL 1.5 ($595) Cleaner 6.5 ($595) Premiere, QT Pro,Super, Compressor (FCP), QT Pro, ffmpeg,.... VisualHub, ffmpegX, ... LiveStage, Flash CS4 LiveStage, CS4 Interaction Cleaner XL Cleaner 6 QT Pro QT Pro 26/05/09 AVLM Training 29
    • Books • Compression for Great Digital Video (© 2002) Ben Waggoner, CMP Books, ISBN 1-57820-111-X • Video Compression Demystified (© 2001) Peter Symes, McGraw-Hill, ISBN 0-07-136324-6 • Streaming Media (© 2003) Tobias Künkel,Wiley Computer Publishing, ISBN 0-470-84724-7 • QuickTime for the Web 3th ed. (© 2004) Apple,Morgan Kaufmann Publishers, ISBN 1-55860-904-0 26/05/09 AVLM Training 30