# rff-codec-webp
[](https://github.com/remade-with-rust)
[](https://www.mata.network)
[](https://github.com/Remade-With-Rust/remade_ffmpeg_rs/blob/main/LICENSE)
The **WebP** still-image codec adapter for **remade_ffmpeg_rs**, backed by the
pure-Rust [`image-webp`](https://crates.io/crates/image-webp) crate.
- **Decode** both VP8 (lossy) and VP8L (lossless).
- **Encode** lossless (VP8L).
- MIT/Apache-2.0 backing crate; WebP is royalty-free.
## Usage
```rust
use rff_codec::CodecRegistry;
use rff_core::{CodecId, Error};
fn main() -> Result<(), Error> {
let mut codecs = CodecRegistry::new();
rff_codec_webp::register(&mut codecs);
// Now reachable by id or by FFmpeg-style name.
let _decoder = codecs.find_decoder(CodecId::Webp)?;
let codec = codecs.by_id(CodecId::Webp).expect("just registered");
println!("{} — decode: {}, encode: {}", codec.long_name, codec.can_decode(), codec.can_encode());
Ok(())
}
```
## Part of Remade With Rust
This crate is one layer of
**[remade_ffmpeg_rs](https://github.com/Remade-With-Rust/remade_ffmpeg_rs)** — a
ground-up, permissively-licensed Rust rebuild of FFmpeg: a drop-in
`ffmpeg`/`ffprobe` CLI on pure-Rust codecs, with no copyleft. Most users want
the [`rff`](https://crates.io/crates/rff) engine facade or the
[`rff-cli`](https://crates.io/crates/rff-cli) binaries rather than this crate
directly.
Also check out our sister project
**[FFAI](https://github.com/Remade-With-Rust/FFAI)** — media for an AI-first
world — and the rest of
**[github.com/remade-with-rust](https://github.com/remade-with-rust)**, including
the standalone codec crates
[`rusty_h264`](https://crates.io/crates/rusty_h264),
[`rusty_vp9`](https://crates.io/crates/rusty_vp9),
[`rusty_mp3`](https://crates.io/crates/rusty_mp3),
[`rusty_aac`](https://crates.io/crates/rusty_aac),
[`rusty-opus`](https://crates.io/crates/rusty-opus),
[`rusty_vorbis`](https://crates.io/crates/rusty_vorbis), and the
[rusty-av1-toolkit](https://github.com/Remade-With-Rust/rusty-av1-toolkit) forks.
## About Mata Network
[Mata Network](https://www.mata.network) builds sovereign, self-hostable
infrastructure. **Remade With Rust** is our open-source home for the
permissively-licensed building blocks that work depends on.
## License
Apache-2.0. See the workspace
[LICENSE](https://github.com/Remade-With-Rust/remade_ffmpeg_rs/blob/main/LICENSE).