ppmtoyuvsplit
Split PPM into YUV component files for MPEG encoding
TLDR
Split PPM into YUV component files
$ ppmtoyuvsplit [base] [input.ppm]
Read from stdin$ cat [input.ppm] | ppmtoyuvsplit [base]
SYNOPSIS
ppmtoyuvsplit basename [ppmfile]
DESCRIPTION
ppmtoyuvsplit reads a PPM image and produces three separate raw output files: basename.Y (luminance), basename.U, and basename.V (chrominance). The output is subsampled YUV as required by the Stanford MPEG codec, with YUV values scaled according to CCIR.601.The Y file contains one byte per pixel. The U and V files use 4:1 downsampling — each byte represents a 2x2 block of pixels (the arithmetic mean of those 4 pixels). As a result, the Y file is four times the size of the U or V file.Part of the Netpbm toolkit.
PARAMETERS
basename
Base name for output files. Produces basename.Y, basename.U, and basename.V.ppmfile
Input PPM image file. Reads from stdin if omitted.
INSTALL
sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm
SEE ALSO
yuvsplittoppm(1), ppmtoyuv(1), ppmtoeyuv(1), ppmtompeg(1)
