Skip to content

pcod commands

This page is made from the help of pcod 1.3.0, so it matches the binary. The pcod guide shows each command at work.

Probe, decode and encode with pito-codecs
Usage: pcod <COMMAND>
Commands:
probe Show what is in an MP4
decode Decode the whole video track and report the speed
encode Decode, encode and mux an MP4, copying the audio
frames Encode a folder of PNG frames and an optional WAV into an MP4
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Show what is in an MP4
Usage: pcod probe <FILE>
Arguments:
<FILE>
Options:
-h, --help Print help
Decode the whole video track and report the speed
Usage: pcod decode [OPTIONS] <FILE>
Arguments:
<FILE>
Options:
--route <ROUTE> [default: gpu] [possible values: cpu, gpu]
--threads <THREADS>
-h, --help Print help
Decode, encode and mux an MP4, copying the audio
Usage: pcod encode [OPTIONS] <INPUT> <OUTPUT>
Arguments:
<INPUT>
<OUTPUT>
Options:
--codec <CODEC> [default: h264] [possible values: h264, hevc]
--route <ROUTE> [default: gpu] [possible values: cpu, gpu]
--crf <CRF> [default: 23]
--threads <THREADS>
-h, --help Print help
Encode a folder of PNG frames and an optional WAV into an MP4
The frames are the folder's .png files in name order (000000.png, 000001.png, ...), all of one even size. The video is 8-bit 4:2:0 BT.709, the audio AAC at 48 kHz stereo, and the file is written with its index first (faststart). The audio is cut or padded with silence to the length of the video; without --audio the MP4 carries a silent stereo track.
Usage: pcod frames [OPTIONS] --fps <FPS> <DIR> <OUTPUT>
Arguments:
<DIR>
The folder of PNG frames
<OUTPUT>
The MP4 to write
Options:
--fps <FPS>
Frame rate: an integer, a ratio such as 30000/1001, or a decimal
--audio <AUDIO>
A PCM WAV to encode as the audio track
--codec <CODEC>
The video codec; HEVC falls back to H.264 without a GPU HEVC encoder
[default: h264]
[possible values: h264, hevc]
--route <ROUTE>
Encode on the GPU, falling back to the CPU, or on the CPU only
[default: gpu]
[possible values: cpu, gpu]
--crf <CRF>
Quality, 0 to 51, lower is better
[default: 18]
--threads <THREADS>
PNG decode threads [default: one per core, at most 16]
-h, --help
Print help (see a summary with '-h')
  • 0: the command did its job.
  • 1: it failed after the command line was read, such as a missing file or a stream it can’t decode. One line on stderr says what failed and why: pcod: <reason>.
  • 2: the command line could not be parsed, or no command was given. stderr carries clap’s error, a usage line and a pointer to --help.

pcod prints plain text, not JSON; see Formats.