yuvscaler(1)
π yuvscaler(1) β the MJPEG tools manual, but make it make sense π
okay bestie, so this is the page for yuvscaler, part of the MJPEG tools manual, and honestly? she's a main character. Let's get into it. π¦
β¨ NAME β¨
yuvscaler β UPscales or DOWNscales a YUV4MPEG2 stream to a specified format
so basically she takes your stream and resizes it. up. down. whatever you need. iconic behavior honestly. π
πΈ SYNOPSIS πΈ
yuvscaler [-I input_keyword] [-M mode_keyword] [-O output_keyword]
[-n p|s|n] [-v 0-2] [-h]
π DESCRIPTION π
yuvscaler is a general (UP or DOWN) scaling utility that is provided to allow conversion between different video formats. she reads in a YUV4MPEG2 format stream from stdin (like, the kind of thing lav2yuv hands you) and outputs that same kind of stream to stdout β so like, for example, something else can eat it, like mpeg2enc. π
ngl the most common glow-up people use yuvscaler for is making input that's suitable for MPEG encoding to VCD or SVCD formats using mpeg2enc(1). that's the whole vibe.
and she's smart about it, fr fr β yuvscaler will automatically take into account PAL/SECAM and NTSC format, plus widescreen (16:9) format and interlacing. Use of yuvscaler was designed to be straightforward. no cap. π«Ά
π₯ EXAMPLES π₯
VCD encoding:
lav2yuv my-file.avi | yuvscaler -O VCD | mpeg2enc -f 1 -o vcd.%d.m1v
SVCD encoding:
lav2yuv my-file.qt | yuvscaler -O SVCD | mpeg2enc -f 4 -o svcd.%d.m2v
Encoding anamorphic 16:9 as letterboxed VCD:
lav2yuv my-ana16-9.eli | yuvscaler -M WIDE2VCD | mpeg2enc -f 1 -o
letterbox_vcd.%d.m1v
Encoding anamorphic 16:9 as letterboxed SVCD:
lav2yuv my-ana16-9.eli | yuvscaler -M WIDE2STD -O SVCD | mpeg2enc -f 4
-o letterbox_svcd.%d.m2v
Encoding anamorphic 16:9 as letterboxed DVD:
lav2yuv my-ana16-9.eli | yuvscaler -M WIDE2STD -O DVD | mpeg2enc -f 8 -o
letterbox_dvd.%d.m2v
literally pipe it in, pipe it out, slay. β¨
π OPTIONS π
-I input_keywordβ specifies input processing options. Input options may be combined by using multiple-Iflags. Possible input_keywords are:USE_WidthxHeight+WidthOffset+HeightOffsetβ to select a useful area of the input frame (all multiple of 2, Height and HeightOffset multiple of 4 if interlaced), the rest of the image being discarded. like, bye to the extra bits. πACTIVE_WidthxHeight+WidthOffset+HeightOffsetβ to select an active area of the input frame (all multiple of 2, Height and HeightOffset multiple of 4 if interlaced), the rest of the image being made black. not discarded β just dressed in black. π€
-M mode_keywordβ sets the scaling mode options. Scaling mode options can be combined by giving several-Mflags. Possible are:BICUBICβ to use the (Mitchell-Netravalli) high-quality bicubic upsacling and/or downscaling algorithm. fancy algorithm, fancy results. πRESAMPLEβ to use a classical resampling algorithm -only for downscaling- that goes much faster than bicubic. For coherence reason,yuvscalerwill useRESAMPLEif only downscaling is necessary,BICUBICif not. she picks for you, that's the service. π«ΆWIDE2STDβ convert widescreen anamorphic (16:9) input video into letterboxed (4:3), generating necessary black lines. Note that for MPEG applications if your player can properly decode anamorphic video you may wish to leave the video unscaled and simply specify the approprate format during MPEG encoding (seempeg2enc(1)).RATIO_WidthIn_WidthOut_HeightIn_HeightOutβ to specified scaling ratios of WidthIn/WidthOut for width and HeightIN/HeightOut for height to be applied to the useful area. The output frames that result from scaling can have a different format than the output format specified using-Ooptions(s). In this case,yuvscalerautomatically generate necessary black lines and columns and/or skips necessary lines and columns to center the scaled image in the output frame.WIDE2VCDβ to scale anamorphic widescreen (16:9) frames into letterboxed VCD format (equivalent to-M WIDE2STD -O VCD).FASTVCDβ to transcode full sized frames to VCD (equivalent to-M RATIO_2_1_2_1 -O VCD, see below).FAST_WIDE2VCDβ to transcode full-sized anamorphic (16:9) frames to letter-boxed VCD (equivalent to-M WIDE2STD -M RATIO_2_1_2_1 -O VCD, see below).NO_HEADERβ to suppress stream header generation on output.MMXβ to use MMX functions forBICUBICscaling (experimental feature!!). β οΈ experimental, bestie, you've been warned.
-O output_keywordβ sets the output frame format options. Output format options can be combined by giving several-Oflags. By default, output frames size will be the same as input frame sizes, as well as output frames interlacing if coherent with output keyword specification which prevails,top_firstif not.MONOCHROMEβ to generate monochrome frames on output. Chrominance information for the scaled pixels is set neutral (white). MPEG encoding of black and white video will be both inefficient and show annonying chrominance artifacts unless this is done. so like, do it. πVCDβ to generate VCD compliant frames on output (taking care of PAL and NTSC standards). Non-interlaced output.SVCDβ to generate SVCD compliant frames on output (taking care of PAL and NTSC standards). Top-field-first interlaced frames.DVDβ to generate DVD compliant frames on output (taking care of PAL and NTSC standards). Top-field-first interlaced frames.SIZE_WidthxHeightβ to generate frames of size WidthxHeight on output (multiple of 4).
If VCD, SVCD or DVD keywords are not used, output interlacing is taken of the same type as input. By default, output frames size will be the same as input frame size.
-n p|s|nβ (usually not necessary) if norm could not be determined from data flux, specifies the OUTPUT norm for VCD/SVCD (p=pal,s=secam,n=ntsc).-v 0|1|2β Specifies the degree of verbosity: 0=quiet, 1=normal, 2=verbose/debug.-hβ Prints a summary of command line syntax.
Note: The most useful downscaling ratios are handled using dedicated optimised scaling routines. They are:
RATIO_WidthIn_WidthOut_2_1=> Full-sized frame to VCD downscalingRATIO_3_2_1_1=> Full-sized frame to SVCD downscalingRATIO_1_1_4_3=> WIDE2STD downscaling modeRATIO_WidthIn_WidthOut_1_1=> downscaling only concerns width, not heightRATIO_1_1_HeightIn_HeightOut=> downscaling only concerns height, not widthRATIO_2_1_2_1=> FASTVCD, slightly width distorted (real ratio 45 to 22) but faster full-sized frame to VCD downscaling (-M RATIO_2_1_2_1 -O VCD)RATIO_WidthIn_WidthOut_8_3=> specific to WIDE2VCD downscaling (-M WIDE2STD -O VCD)RATIO_2_1_8_3=> specific to (slighly distorted) FAST_WIDE2VCD downscaling (-M WIDE2STD -M RATIO_2_1_2_1 -O VCD)RATIO_1_1_1_1=> copy useful input part of possible several files into output frames
π AUTHOR π
This man page was written by Xavier Biquard et al. π«Ά
If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is:
mjpeg-users@lists.sourceforge.net
For more info, see our website at
http://mjpeg.sourceforge.net/
π SEE ALSO π
mjpegtools(1), lavpipe(1), lav2yuv(1) mpeg2enc(1)
and that's the whole page bestie, we ate and left no crumbs. π
β¨ MJPEG Tools Team wrote this one, dated 26 Septembre 2001, for yuvscaler(1) β the version vibes are immaculate, the date is giving retro, and you're officially informed. mwah. ππ¦
π¦ where this page comes from
- arch rolling: mjpegtools 2.2.1-4 Β· GPL-2.0-or-later
- debian bookworm: mjpegtools 1:2.1.0+debian-7
- debian trixie: mjpegtools 1:2.1.0+debian-8.1+b1
- fedora 43: mjpegtools 2.2.1-11.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-or-later
- fedora 44: mjpegtools 2.2.1-12.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-or-later
- nixos 26.05: mjpegtools 2.2.1
- nixpkgs unstable: mjpegtools 2.2.1
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- opensuse-leap 16.0: mjpegtools 2.2.1-160000.2.2 Β· GPL-2.0-only
- ubuntu jammy: mjpegtools 1:2.1.0+debian-6build1
- ubuntu noble: mjpegtools 1:2.1.0+debian-8.1build1
- ubuntu questing: mjpegtools 1:2.1.0+debian-8.1build1
- ubuntu resolute: mjpegtools 1:2.2.1-3
- ubuntu stonking: mjpegtools 1:2.2.1-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms