34

Spatial Preprocessing

34.1 Introduction

This stage of the preprocessing workflow is all about the content of the frame. Here we set the overall dimensions of the frames and move the content around in them so that it compresses effectively.

We want to clean up any noise around the edges and frame the interesting part of the video so that we don’t compress any more area than we have to. Scaling and cropping to clean up the edges is very worthwhile. There are some quality gains to be had if you can avoid stretching or shrinking the image. Pixels can be interpolated or averaged when this scaling happens, and that leads to loss of detail. A crop is always preferable to a scaling operation.

The same aliasing effects that we discussed in the audio ...

Get A Practical Guide to Video and Audio Compression now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.