From y4msclaer(1): y4mscaler is a general-purpose video scaler which operates on YUV4MPEG2 streams, as produced and consumed by the MJPEGtools such as lav2yuv and mpeg2enc(1). y4mscaler is meant to be used in a pipeline. Thus, input is from stdin, and output is to stdout. The essential function of y4mscaler is to scale a specified "active" region of the input stream (the source) into a specified active region of the output stream (the target). Pixels outside of the active region of the source are ignored; pixels outside of the active region of the target are filled with a background color. The source may additionally have a matte applied to it; pixels outside the source matte are set to a separately specified background color. y4mscaler correctly handles chroma sampling, and thus it can also perform chroma subsampling conversions. The YUV4MPEG2 stream format currently only supports 4:2:0 subsampling, although y4mscaler can process 4:1:1, 4:2:2, and 4:4:4 modes by abusing the YUV4MPEG2 format a bit. Includes preset parameters for popular output streams: DVD, SVCD, VCD, DV, CVD, and SVCD/VCD still images. WWW: http://www.mir.com/DMG/Software/y4mscaler.html