---
title: "VideoStream"
---
<!-- 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.**
Video stream consisting of raw video chunks.

For logging video containers like mp4, refer to [`archetypes.AssetVideo`](https://rerun.io/docs/reference/types/archetypes/asset_video) and [`archetypes.VideoFrameReference`](https://rerun.io/docs/reference/types/archetypes/video_frame_reference).
To learn more about video support in Rerun, check the [video reference](https://rerun.io/docs/reference/video).

All components except `sample` are typically logged statically once per entity.
`sample` is then logged repeatedly for each frame on the timeline.

TODO(#10422): [`archetypes.VideoFrameReference`](https://rerun.io/docs/reference/types/archetypes/video_frame_reference) does not yet work with [`archetypes.VideoStream`](https://rerun.io/docs/reference/types/archetypes/video_stream).

## Fields
### Required
* `codec`: [`VideoCodec`](../components/video_codec.md)

### Recommended
* `sample`: [`VideoSample`](../components/video_sample.md)

### Optional
* `is_keyframe`: [`IsKeyframe`](../components/is_keyframe.md)
* `opacity`: [`Opacity`](../components/opacity.md)
* `draw_order`: [`DrawOrder`](../components/draw_order.md)


## Can be shown in
* [Spatial2DView](../views/spatial2d_view.md)
* [Spatial3DView](../views/spatial3d_view.md) (if logged under a projection)
* [DataframeView](../views/dataframe_view.md)

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

## Example

### Live streaming of on-the-fly encoded video

snippet: archetypes/video_stream_synthetic

<picture data-inline-viewer="snippets/archetypes/video_stream_synthetic">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/video_stream_synthetic/4dd34da01980afa5604994fa4cce34d7573b0763/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/video_stream_synthetic/4dd34da01980afa5604994fa4cce34d7573b0763/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/video_stream_synthetic/4dd34da01980afa5604994fa4cce34d7573b0763/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/video_stream_synthetic/4dd34da01980afa5604994fa4cce34d7573b0763/1200w.png">
  <img src="https://static.rerun.io/video_stream_synthetic/4dd34da01980afa5604994fa4cce34d7573b0763/full.png">
</picture>

