y4mscaler - a video scaler

y4mscaler is a video scaler which operates on YUV4MPEG2 streams, as used by the tools in the MJPEGtools project. It essentially takes some region of an input stream, and scales it into some region of the output stream.

For example, it allows you to turn this:

before

into this:

after

(but in stream form, of course). You'll note that y4mscaler is doing matting, scaling, and translation.

The command lines used to create the above example were:

   ~> y4mcolorbars -W 352 -H 240 > bars-352.yuv

   ~> y4mtoppm < bars-352.yuv > bars-352.ppm

   ~> y4mscaler -I bg=rgb:100,200,0 -I active=400x300+0+0cc \
                -O size=400x200 -O sar=1:1 -O bg=rgb:0,0,200 \
                -O active=200x100+16-16bl -O align=bl  < bars-352.yuv \
                | y4mtoppm > bars-352s.ppm

A simpler operation, such as creating a stream ready to encode and slap on an SVCD, requires a simpler command line, such as:

   ~> y4mscaler -O preset=svcd

Features


Documentation

For more information, please refer to the man page, y4mscaler(1). (Not the best man-to-html translation, but certainly the easiest.)

You may also want to check out:

More info will be forthcoming on this page eventually.


Download

y4mscaler is distributed under the GNU General Public License (GPL).

NewsFlash:

Version 9.0 is now available, with added output presets for ATSC HDTV resolutions.

You can download the source code: y4mscaler-9.0-src.tgz. It requires the MJPEGtools headers and libraries, i.e. libmjpegutils.a. And a C++ compiler. This is the ninth release, still without much auto-configuration. "make all" should build fine; "make arches" will show some arch-specific targets, but you may have to adjust Makefile by hand for CPU-specific tuning. If you have already have MJPEGtools (v1.8.0+) compiled from source and installed on your machine, you should be good to go.

You can also download a binary compiled for x86 architectures: y4mscaler-9.0-bin-x86.tgz. This is statically compiled for x86 architectures using gcc-4.0.

This is the ninth release, v9.0. See the ChangeLog for details. Overall, y4mscaler is quite stable by now. Please report any bugs to dmg @ mir . com, but please don't be distraught if you don't hear a reply for a week or so.

Older Versions


return to the video library

maximum impact research
Digital Media Group
<dmg at mir.com>
Last modified: Sun Dec 11 15:31:33 EST 2005

©2005 Matthew Marjanovic.
This material may not be republished in any form without express written consent of the author.