LinuxCommandLibrary

pnmtofiasco

Convert PNM images to Fiasco image format

TLDR

Convert a PNM image to a compressed FIASCO file

$ pnmtofiasco [path/to/file.pnm] > [path/to/file.fiasco]
copy

Specify the input files through a pattern
$ pnmtofiasco [[-i|--image-name]] "[img[01-09+1].pnm]" > [path/to/file.fiasco]
copy

Specify the compression quality
$ pnmtofiasco [[-q|--quality]] [quality_level] [path/to/file.pnm] > [path/to/file.fiasco]
copy

Load the options to be used from the specified configuration file
$ pnmtofiasco [[-f|--config]] [path/to/fiascorc] [path/to/file.pnm] > [path/to/file.fiasco]
copy

SYNOPSIS

pnmtofiasco [options] [pnmfile]

PARAMETERS

-debug
    Enable debugging output, providing more detailed information about the conversion process.

-verbose
    Enable verbose output, displaying progress and additional messages during encoding.

-quality <quality>
    Set the compression quality from 0 to 100 (default is 75). Higher values result in better image quality but larger file sizes, and vice-versa.

-frames <n>
    Limit the number of frames to encode, processing only the first n frames from the input stream.

-fps <n>
    Set the target frame rate for the output Fiasco stream in frames per second.

-start <n>
    Begin encoding from frame number n, skipping earlier frames.

-end <n>
    End encoding at frame number n, stopping before subsequent frames.

-no_interlace
    Disable interlaced encoding, producing a progressive scan output.

-gray
    Force grayscale output, converting color images to grayscale before encoding.

-rgray
    Convert to grayscale by averaging only the red and green color components, specific to Fiasco's internal grayscale conversion.

-no_quant
    Disable quantization, which can result in larger files but potentially higher fidelity.

-no_dither
    Disable dithering, which can affect color representation, especially for limited palettes.

-palette <file>
    Use a predefined color palette loaded from the specified file for encoding.

-dump_palette
    Dump the generated or used color palette to standard output.

-dump_quant
    Dump the quantization tables used during the encoding process.

-dump_dither
    Dump the dithering tables used.

-dump_frames
    Dump raw frame data to standard output, bypassing Fiasco encoding.

-dump_stats
    Dump encoding statistics, such as compression ratio and frame information.

-dump_raw
    Dump raw output data from the encoder.

-dump_fiasco
    Dump the Fiasco stream data directly to standard output, useful for debugging the format.

-dump_huff
    Dump Huffman tables used for entropy coding.

-dump_g721
    Dump G.721 audio data, though pnmtofiasco primarily handles video.

-dump_jpeg
    Dump JPEG-like internal representation data of frames.

-dump_motion
    Dump motion vector data used for inter-frame compression.

-dump_key
    Dump key frame (intra-coded) information.

-dump_delta
    Dump delta frame (inter-coded) information.

-version
    Display version information for the pnmtofiasco command.

pnmfile
    Optional input PNM file. If not specified, pnmtofiasco reads a sequence of PNM images from standard input.

DESCRIPTION

pnmtofiasco is a command-line utility that reads a sequence of Portable Anymap (PNM) images from standard input (or a specified file) and converts them into a Fiasco video stream. The Fiasco codec is a low-bandwidth, high-compression video codec developed by Bell Labs, optimized for network transmission. This tool enables users to encode image sequences into the Fiasco format, which can then be played by a Fiasco player or integrated into other applications requiring this specific video format. It offers various options to control compression quality, frame rate, frame range, and internal encoding processes like quantization and dithering, providing granular control over the encoding process.

CAVEATS

While the man page states 'No known bugs,' pnmtofiasco converts to the Fiasco codec, which is a specialized and historically significant format developed by Bell Labs. As such, its output might not be directly compatible with modern, widely used video players or streaming platforms without further conversion. Its primary utility lies in contexts where the Fiasco format is specifically required or for historical analysis of early network video technologies.

INPUT/OUTPUT

The command reads a sequence of PNM images from standard input by default, enabling it to be easily chained with other Netpbm tools or image processing pipelines. Alternatively, a specific pnmfile can be provided as an argument. The resulting Fiasco stream is written to standard output, allowing for direct piping to a Fiasco player or redirection to a file.

HISTORY

The pnmtofiasco command is intrinsically linked to the Fiasco codec, a low-bandwidth, high-compression video codec developed by Bell Labs. This codec was designed for efficient video transmission over networks, reflecting early efforts in digital video streaming during the 1990s. The command likely emerged as part of a suite of tools for processing and converting media streams for this specific ecosystem, demonstrating an important phase in the evolution of video compression technology. It is often found as part of the Netpbm suite of graphics utilities, known for its extensive support for various image formats and conversions.

SEE ALSO

fiasco(1), ppm(5), pgm(5), pbm(5), pnm(5)

Copied to clipboard