splotView source

Pre-alpha · AV2 spec v1.0.0

splot

AV2. Encode it. Decode it. Trust it.

An encoder, a decoder and a validator for the next-generation video codec. One binary. Safe Rust. Built from the spec.

Install from sourceView source

Three commands. Your first AV2 video.

Terminal
  1. Encode make itsplot encode clip.y4m -o clip.ivf
  2. Validate prove itsplot validate clip.ivf
  3. Decode watch itsplot decode clip.ivf -o - | ffplay -

That is the whole loop: from raw video to a conformant AV2 stream and back to your screen.

Encode. Decode. Validate. One binary.

Encode

Encode. Beautifully.

Give it a Y4M file, or - for standard input. Get an AV2 IVF file. 8-bit and 10-bit input, 4:2:0, 4:2:2, 4:4:4 and monochrome. The encoder reads the format from the Y4M header.

ffmpeg -i camera.mov -f yuv4mpegpipe - | splot encode - --crf 28 -o camera.ivf
Constant quality
--crf 30
A target bitrate
--bitrate 2000
More speed
--preset 10
Low latency
--low-delay
Natural film look
--film-grain
More cores in parallel
--tiles 2x2 --threads 8

Decode

Decode. Every frame.

Decode to Y4M on standard output and pipe it into any player that reads Y4M. No temporary files. The decoder uses every core by default. It reads IVF files and raw Annex B streams.

splot decode -o - movie.ivf | mpv -
splot decode movie.ivf -o movie.y4m

Validate

Validate. With proof.

Find out if a stream is correct, and if not, exactly where and why. Each finding has a stable rule id, a severity, the AV2 spec section and a byte offset. Exit codes are stable too.

splot validate movie.ivf --json
splot explain obu-header/global-xlayer-required

Embed

Embed. In a few lines.

Use the Rust crates splot_encode and splot_decode to encode frames and decode them back. The decoder also has a stable C ABI with zero-copy pictures.

Read the Rust and C examples

  • splot_open
  • splot_send_data
  • splot_get_picture
  • splot_drain
  • splot_close
cargo build --release -p splot-capi

Install. From source.

You need rustup. The repository pins its Rust toolchain, and rustup installs it for you.

Terminal
  1. git clone https://github.com/splotlabs/splot && cd splot
  2. cargo install --path crates/splot-cli --locked
  3. splot --help

Release builds use AVX2 on x86. On a CPU older than Intel Haswell (2013) or AMD Excavator (2015), build with RUSTFLAGS="-C target-cpu=x86-64". Apple Silicon and ARM need nothing extra.

Where it stands.

Status

Pre-alpha. It moves fast.

The project reports that the encoder, decoder and validator work end to end today, and that their output is checked against the AV2 reference decoder (AVM). Expect sharp edges, and please report them.

Report a problem