# Cros-codecs
[](https://crates.io/crates/cros-codecs)
[](https://docs.rs/cros-codecs/latest/cros_codecs/)
A lightweight, simple, low-dependency, and hopefully safe crate for
hardware-accelerated video decoding and encoding on Linux.
It is developed for use in ChromeOS (particularly
[crosvm](https://github.com/google/crosvm)), but has no dependency to ChromeOS
and should be usable anywhere.
## Current features
- Simple decoder API,
- VAAPI decoder support (using
[cros-libva](https://github.com/chromeos/cros-libva)) for H.264, H.265, VP8,
VP9 and AV1,
- VAAPI encoder support for H.264, VP9 and AV1,
- Stateful V4L2 encoder support.
## Planned features
- Stateful V4L2 decoder support,
- Stateless V4L2 decoder support,
- Support for more encoder codecs,
- C API to be used in non-Rust projects.
## Non-goals
- Support for systems other than Linux.
## Example programs
The `ccdec` example program can decode an encoded stream and write the decoded
frames to a file. As such it can be used for testing purposes.
```shell
$ cargo build --examples
$ ./target/debug/examples/ccdec --help
Usage: ccdec [--output