LinuxCommandLibrary

eyuvtoppm

Convert EYUV format to PPM image

TLDR

Read a Berkeley YUV file from the specified input file, convert it to a PPM image, and store it in the specified output file

$ eyuvtoppm --width [width] --height [height] [path/to/input_file.eyuv] > [path/to/output_file.ppm]
copy

SYNOPSIS

eyuvtoppm [-image2] [eyuvfile]

PARAMETERS

-image2
    Interpret input as IMAGE2 EYUV variant (default: original Stuttgart EYUV)

DESCRIPTION

eyuvtoppm is a utility from the Netpbm graphics package that converts Extended YUV (EYUV) files to Portable Pixmap (PPM) format. EYUV is a raw YUV planar format developed at the University of Stuttgart's Institute for Communication (IKTD) for video processing applications. It includes a binary header specifying image width, height, number of components, chroma subsampling (e.g., 4:2:0, 4:2:2), and frame details.

The tool parses the header to determine parameters, then transforms YUV data to RGB pixels for PPM output. PPM is a simple text or binary RGB format widely supported in image processing.

Primarily used in legacy video workflows, research, or conversion pipelines. Input comes from a file or stdin; output goes to stdout. It handles one frame per invocation, making it suitable for batch processing with tools like ffmpeg or other Netpbm converters. Supports both original Stuttgart EYUV and the IMAGE2 variant via option.

CAVEATS

Reads only the first frame; supports specific YUV subsamplings per EYUV spec (e.g., 4:1:1, 4:2:0). No error checking for invalid headers; output assumes standard RGB conversion matrix.

EXAMPLE

eyuvtoppm image.eyuv > image.ppm

cat data.eyuv | eyuvtoppm -image2 | pnmtopng > out.png

EYUV HEADER

Magic: EYUV (4 bytes), width/height (uint16), components (uint8), chroma (uint8), etc. See Netpbm docs for full spec.

HISTORY

Added to Netpbm suite in early 1990s for Stuttgart video tools support. Netpbm originated 1988 by Jef Poskanzer; EYUV converters enable interoperability with academic video research.

SEE ALSO

ppmtoeyuv(1), yuvtoppm(1), ppmyuv(1), ppm(5)

Copied to clipboard