COMPRESSION Why do we compress?

COMPRESSION Why do we compress? First! …. How do video and audio exists without being compressed in our world? In real world, light and sound exists a...
Author: Shannon Murphy
0 downloads 0 Views 600KB Size
COMPRESSION Why do we compress? First! …. How do video and audio exists without being compressed in our world? In real world, light and sound exists as continues analog values. Those values in visual terms make up an effective infinite number of colors and detail; in audio terms, they represent an effective infinite range of loudness (amplitude) and frequency. Digital doesn’t do finite. When analog signals are converted to digital, that is digitized, the infinite continuous scales of analog signals must be reduced to a finite range of discrete units and bytes. This conversion is part of what we call compression! But why do we compress video? We compress video because it makes efficient the use of available media storage and the different ways to transfer it from one place to another. Video Compression takes that huge video/audio file or stream of data and squeezes out any information that is redundant or absolutely not required to produce a finished compressed video/audio stream that meets your size restrictions based on a defined target audience. By using compression, we use coding techniques to reduce the amount of data used to convey information. Compression is based on the facts that information has order and patters, without explicitly transmitting all the bits required to reconstruct a series of motion moving pictures. Generic Production Workflow & Media Distribution Options

Working with Compressor Compressor is a compression and transcoding software application that converts media Into multiple media formats such as MPEG-1, MPEG-2 and MPEG-4. Compressor is integrated into other applications, such as Final Cut Pro, and generates high-quality assets for use in DVD Studio Pro or online.

Video and Audio Quality Factors for Compression Four factors determine video quality and file size when we compress: 1. 2. 3. 4.

Frame size Frame rate (frames per second) Image quality Audio quality

How Compressors Work Compressors perform their job in two basic ways: 1. Through spatial compression or Quality in the Frame - Intra-Frame: Spatial (space) compression compacts the description of the visual area of a video frame by looking for patterns and repetition among pixels. The compressor essentially throws out redundant data from individual frames. 2. Through temporal compression or Frame Rate - Inter-Frame: The compressor discards information that is repeated from one frame to the next. This process saves a single frame in its entirely, but in subsequent frames, it only saves those parts of the picture that have changed. The first frame is called a key-frame, and the subsequent frames are called predictive (delta) frames or bi-directional frames.

Spatial compression reduces redundancy within a frame (adjusting the quality). Temporal compression reduces redundancy between frames (using key frames). Temporal Compression Settings: - Frame Rate - Key Framing (I-Frame) 6 frames compressed using temporal compression:

A group of pictures composed by 2 key frames, 4 predictive frames Spatial Compression Settings: - Frame Rate - Quality- this is an actual threshold that sets a minimum quality value One frame compressed using spatial compression.

Original Frame

Compressed Frame

Compressors are installed on computers in programs called Codecs. “ I can’t play this movie on my power book! I got it from my friend who has a PC … why it does not play back? I can’t open it up! Someone told me that I need to install the right codec or plug-in… or something like that … “ The key to the compression (encoding) process is the software known as a codec. Codec is an acronym for compressor/decompressor. As its name suggests, codecs are used to compress (encode) digital media files for efficient storage and transmission, and then decompress (decode) the files upon playback. A codec mathematically describes how a video signal can be squeezed down into less space. Codecs are software programs installed on your computer that enables it to understand the different types of media file formats and open them in applications such as

Final Cut Pro, Avid, QuickTime , etc. In order for your computer to play back video or audio files, you need to have installed the needed codecs. Technically speaking, compression algorithms (also called codecs) reduce data by: - Using fewer bits to represent each color - Reducing the number of pixels in the image - Reducing the amount of value a pixel can change compared to its nearest neighbors - Reducing frames per second

Options in Compressor: Compressor -Select a codec to compress the video: DV, DVCAM, DVCPro, SORENSON, MPEG-4, etc Frame Rate & Frame Size (temporal compression) - You can dramatically reduce the file size of your movie by reducing the frame size and frame rate, also known as the frames per second, or fps. For best results, use a frame rate evenly divisible into your time base. For example, if you captured and edited your sequence at 29.97 fps, dividing that frame rate by two equals approximately 15, so you can output your compressed movie at 15 fps. The following are well-defined frame rates: 8, 10, 12, 15, 23.98, 24, 25, 29.97, 30, 59.94 and 60. Quality (spatial compression) - Adjust the slider for the level of spatial compression you want. Some codecs may not allow you to choose this setting. Key Framing (temporal compression)- If you selected a codec that uses temporal compression, you can select the rate. Increasing the number of frames between keyframes increases the amount of compression and makes the final file size smaller. Depending on the codec you use, the movie file’s quality, especially for clips and sequences with a lot of motion, may decrease based on the number of keyframes specified. Other codecs, such as Animation, are lossless, and there is no loss of quality. A setting of one keyframe every ten frames is a good starting point. Data Rate (Both temporal and spatial compression)- With some codecs, you can enter a target data rate for your compressed QuickTime file. The codec uses a combination of spatial and temporal compression to try to reach your target.

Apple’s Compressor Main Interface.

Descriptions of Settings (Presets) MPEG 1 MPEG-1 is an internationally accepted compression standard developed by the Motion Picture Experts Group (MPEG). MPEG-1 allows you to create VHS-quality video files and was designed to support SIF (Standard Interface Format) resolution non-interlaced (progressive) video using relatively low bit rates (Compressor supports 0.5 Mbps to 2 Mbps). It also allows you to create compressed 1-channel and 2-channel audio. MPEG – 2 MPEG-2 is an internationally accepted compression standard developed by the Motion Picture Experts Group (MPEG). MPEG-2 allows you to create broadcast-quality video files and was designed to support high-resolution, high bit-rate video. It is the video compression format used for high-quality video titles on DVD and home satellite dish systems. All DVD players contain the hardware required for MPEG-2 playback. MPEG-4 & H.264 DVD Files Compressor can output H-264, also known as MPEG-4 Part10 files. Not only H.264 is very efficient, providing extremely high quality in smaller files, but H.264 is also scalable, producing video for everything from 3G for mobile phones to High Definition (HD). H.264 is currently mandatory in both new high definition DVD specifications (HD DVD and Blu-Ray) and functionally included in hundreds of new electronics products. At DVD data rates, H.264 is twice as efficient as MPEG-2. That means you can count on a lower bit rate to get the same quality, or higher quality at the same bit rate.

Quick Time Platform for Video Compression QuickTime is an extensible, track based container format for multimedia files. Each track delivers a different element of content, such as video, audio, interactivity (such as Flash), and HTML behavior. QuickTime includes a player, which runs on both the Apple Macintosh and the Microsoft Windows Operating system. The QuickTime container is a codec-agnostic, so several compressors formats are supported by the Player such as Sorenson and MPEG-4 codecs. QuickTime also supports key standards fir Web streaming including HTTP, RTP and RTSP, and major file formats such as JPEG, BMP, PICT, PNG and GIF. In addition, the QuickTime platform offers a remarkable integration and interoperability between Final Cut Pro, QuickTime Pro, and the QuickTime Broadcaster. To encode media for QuickTime format distribution you can use: FinalCut Pro QuickTime Pro MakeRefMovie (Multiple streams delivery ) QuickTime Broadcaster Compressing Audio Reduce the sample rate and apply compression. Reducing the sample rate significantly lowers the quality of your audio and should be used when you have to shrink your file size, such as for streaming on the web. You don’t need to change the bit rate. A good way to compress audio is to use an audio compressor such as IMA, Law, QDesign Music, or Qualcomm Purevoice. It is a good idea to use an “Audio Compressor” to enhance the sound properties before we “compress” it. Some of the Most Popular Compression Techniques Video Production: DV25 (MiniDV, DVCAM and DVCPro) Digital BETACAM Physical Distribution: Cinepak and MPEG-1 (CD), MPEG-2 (DVD) & MPEG-4 and uncompressed video. Streaming Media Delivery: Microsoft Media Services (Microsoft Co) Real System Helix 10 (RealNetworks) Apple QuickTime (Apple Co & Sorenson Broadcast) MPEG-4

Streaming Video - The Big Picture

Acquisition & Post/Production--> Encoding & Publishing -->Play Back Cameras Final Cut Pro Compressor Quick Time Player Avid QuickTime Pro Real Player Real Video Windows Media Player Windows Media Commonly targeted audiences (bandwidth allocation) TARGET BANDWIDTHSDATA RATE / FRAME SIZE

MEDIA

56 K dial-up modem

53 Kbits/Sec

QUICKTIME, WINDOWS, REAL VIDEO, MPEG4

DSL/cable (low end)

256 Kbits/Sec

QUICKTIME, WINDOWS, REAL VIDEO, MPEG4

DSL/cable (high end)

768 Kbits/Sec

QUICKTIME, WINDOWS, REAL VIDEO, MPEG4

1.6 Mbps (LAN/Intranet)

1500 Kbits/Sec

QUICKTIME, WINDOWS, REAL VIDEO, MPEG-1,4

2x CD-ROM (old drives) 4x CD-ROM

2400 Kbits/Sec 4800 Kbits/Sec

MPEG-1 , MPEG-4

DVD Distribution

> 10 Mbps

MPEG-2

General Guides for Preparing Media for Compression and Delivery 1. Define a target audience and media distribution 2. Decide the encoding technique: RealVideo, MPEG-4, QuickTime, Windows Media, etc … 3. Define the data rate and codec settings to be used for compression 4. Define the frame size settings (320 by 240, 720 by 480, etc ) 5. Prepare for Internet Streaming if this is the case 6. Compress the video 7. Publish the final video (DVD, CDROM, Streaming media, etc ).

Typical CODECs Available: Web Codecs: Sorenson Video - high-quality WWW video, requires fast computer for CD-ROM playback RealVideo (Standard) - main video codec for RealVideo/RealMedia RealVideo (Fractal) - ClearVideo codec for RealVideo H261 - low-quality videoconferencing H263 - medium-quality videoconferencing MPEG-4 - high-quality WWW video Photo-JPEG - photographic images ClearVideo - medium-quality WWW video, requires fast computer VDOLive - Server-based streaming video; scalable Lite VDO - Serverless streaming video CD-ROM/DVD-ROM/Kiosk/Presentation Codecs: Cinepak - medium-quality CD-ROM video, works on older computers Sorenson Video - high-quality CD-ROM video; requires fast computer Eidos Escape - high-quality CD-ROM video; requires high data rates Power!Video - high-quality CD-ROM video; requires very high data rates Indeo 3 - medium-quality CD-ROM video, works on older computers Indeo Video Interactive (4, 5) - high-quality CD-ROM video; requires fast computer Apple Video - very fast, but low-quality (usually for testing) MPEG-1 - high-quality CD-ROM video; requires special hardware or fast computer MPEG-2 - high-quality DVD-ROM video; requires special hardware Apple Animation - from HD, allows lossless full-screen playback on very high-end systems

RealVideo - Helix Platform Real Networks is the pioneer of the streaming media industry in 1995. In its simplest form, the RealNetworks Solution has all the same major components as the Microsoft Windows Media Technologies offering. Its open architecture promotes the Development of mass production of multimedia content and publishing, flexible automation, and excellent integration with other interactive content such as Flash. Scales well in terms of mass media publishing at an affordable license cost. As with QuickTime, QuickTime, it also supports key standards for Web streaming including HTTP, RTP and RTSP, and major file formats such as JPEG, BMP, PICT, PNG, and GIF. Video is encoded using the Real Producer Encoder, which runs on Linux, Windows, MAC OS, and other operating systems. Multiple streams are supported using “SureStream.” http://www.realnetworks.com/ Microsoft Media Services Scales well in terms of mass media publishing at an affordable license cost as RealVideo. It also supports key standards for Web streaming including HTTP, RTP and RTSP, and major file formats such as JPEG, BMP, PICT, PNG, and GIF. Video is encoded using the Windows Media Encoder Series, which is a free download. More difficult to automate that the RealSystem Platform. Offers a great diversity of tools to create multimedia content.