# LiveView

> **Deprecation Notice**
> This page describes features that have been removed or replaced in Luxonis Hub. Functionality may be limited and only available
to Hub Original customers. Please refer to the up-to-date guides to provision devices, manage fleets, and deploy applications.

Stream live video to the Luxonis Hub or your frontend.

### Import robothub and create a new LiveView object

You can create up to ten Live Views per Robot.

```python
import robothub as rh

live_view = rh.DepthaiLiveView(name="live_view", unique_key="rgb", width=1920, height=1080)
```

### Add overlay data

Improve your Live View experience by incorporating rectangles, __line__s, and text to present essential data and neural network
outcomes.

```python
live_view.add_rectangle(rectangle=bbox, label=nn_config.labels[detection.label])
live_view.add_text(text="Cool and important text.", coords=[100, 150])
live_view.add_line(pt1=[x1, y1], pt2=[x2, y2])
```

### Publish frame

Publish frame with overlay data. The overlay data are cleared by this call. Make sure to have h264 encoderin your pipeline,
because only h264 encoded frames can be published. h264 encoded frames

```python
live_view.publish(h264_frame=h264_frame.getCvFrame())
```

### robothub.live_view.LiveView(abc.ABC)

Kind: Class

#### get(unique_key: str = None, name: str = None) -> Optional[LiveView]: Optional[LiveView]

Kind: Static Method

Gets a Live View by its unique key or name. Name takes precedence over unique key.

:param unique_key: Unique key of the Live View.
:param name: Name of the Live View.
:return: Live View with the given unique key or name.
:raises ValueError: If neither name nor unique_key is specified.

#### get_by_name(name: str) -> Optional[LiveView]: Optional[LiveView]

Kind: Static Method

Gets a Live View by its name.

:param name: Name of the Live View.
:return: Live View with the given name. None if a Live View with the given name does not exist.

#### get_by_unique_key(unique_key: str) -> Optional[LiveView]: Optional[LiveView]

Kind: Static Method

Gets a Live View by its unique key.

:param unique_key: Unique key of the Live View.
:return: Live View with the given unique key.
:raises ValueError: If a Live View with the given unique key does not exist.
