---
title: "VideoCodec"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
The codec used to encode video stored in [`components.VideoSample`](https://rerun.io/docs/reference/types/components/video_sample).

Support of these codecs by the Rerun Viewer is platform dependent.
For more details see check the [video reference](https://rerun.io/docs/reference/video).

## Variants
#### `AV1` = 0x61763031
AOMedia Video 1 (AV1)

See <https://en.wikipedia.org/wiki/AV1>

[`components.VideoSample`](https://rerun.io/docs/reference/types/components/video_sample)s using this codec should be formatted according the "Low overhead bitstream format",
as specified in Section 5.2 of the [AV1 specification](https://aomediacodec.github.io/av1-spec/#low-overhead-bitstream-format).
Each sample should be formatted as a sequence of OBUs (Open Bitstream Units) long enough to decode at least one video frame.
Samples containing keyframes must include a sequence header OBU before the `KEY_FRAME` OBU to enable
extraction of frame dimensions, bit depth, and color information. `INTRA_ONLY` frames are not treated
as keyframes since they may reference existing decoder state.

Enum value is the fourcc for 'av01' (the WebCodec string assigned to this codec) in big endian.

#### `H264` = 0x61766331
Advanced Video Coding (AVC/H.264)

See <https://en.wikipedia.org/wiki/Advanced_Video_Coding>

[`components.VideoSample`](https://rerun.io/docs/reference/types/components/video_sample)s using this codec should be formatted according to Annex B specification.
(Note that this is different from AVCC format found in MP4 files.
To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
Key frames (IDR) require inclusion of a SPS (Sequence Parameter Set)

Enum value is the fourcc for 'avc1' (the WebCodec string assigned to this codec) in big endian.

#### `H265` = 0x68657631
High Efficiency Video Coding (HEVC/H.265)

See <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>

[`components.VideoSample`](https://rerun.io/docs/reference/types/components/video_sample)s using this codec should be formatted according to Annex B specification.
(Note that this is different from AVCC format found in MP4 files.
To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
Key frames (IRAP) require inclusion of a SPS (Sequence Parameter Set)

Enum value is the fourcc for 'hev1' (the WebCodec string assigned to this codec) in big endian.

#### `VP8` = 0x76703038
VP8

See <https://en.wikipedia.org/wiki/VP8>

Enum value is the fourcc for 'vp08' (the WebCodec string assigned to this codec) in big endian.

#### `VP9` = 0x76703039
VP9

See <https://en.wikipedia.org/wiki/VP9>

Enum value is the fourcc for 'vp09' (the WebCodec string assigned to this codec) in big endian.


## Arrow datatype
```
UInt32
```

## API reference links
 * 🌊 [C++ API docs for `VideoCodec`](https://ref.rerun.io/docs/cpp/stable/namespacererun_1_1components.html)
 * 🐍 [Python API docs for `VideoCodec`](https://ref.rerun.io/docs/python/stable/common/components#rerun.components.VideoCodec)
 * 🦀 [Rust API docs for `VideoCodec`](https://docs.rs/rerun/latest/rerun/components/enum.VideoCodec.html)


## Used by

* [`VideoStream`](../archetypes/video_stream.md)
