# Video Streaming

## RTSP Server

We use the [MediaMTX](https://github.com/bluenviron/mediamtx) open-source RTSP server. This server runs on boot at `0.0.0.0:8554`, and uses the publish policy. Any service is able to publish to this server, which will create a new endpoint if none exists, or kick out an established endpoint.

## Gstreamer

The version of Gstreamer that is loaded by default is 1.16.3. We preload the packages `gstreamer1.0-rtsp` and `gstreamer1.0-plugins-good`.  There are multiple hardware-accelerated Gstreamer components that are developed by Nvidia, including `nvv4l2decoder`, that can be utilized. More information about these components can be found using `gst-inspect-1.0`.&#x20;

#### Example Pipelines

1. Publishing a sample video stream to the RTSP server

```
gst-launch-1.0 videotestsrc pattern=snow ! x264enc ! rtspclientsink location=rtsp://0.0.0.0:8554/test
```

2. Forwarding a stream from a payload RTSP server to the Jetson RTSP server

```
gst-launch-1.0 rtspsrc latency=0 location=rtsp://<endpoint_ip>:<port>/<endpoint> ! rtph264depay ! rtspclientsink location=rtsp://0.0.0.0:8554/forward_endpoint
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flybydev.com/quickstart/video-streaming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
