# How to rotate a video?

{% embed url="<https://www.youtube.com/watch?v=wYQeTk6GmB4>" %}
**YouTube:** Quickstart on Raspberry Pi 4 to produce vertical video with filter.
{% endembed %}

In this video, a 16:9 video is rotated 90° using the datarhei Restreamer streaming server. In the video settings of the active channel, the encoding is changed to 9:16. There are different rotation presets available. In the example, a Raspberry Pi 4 is used, which performs the encoding via the GPU OpenMax.

{% hint style="info" %}
An encoding of the video is always necessary to get rotated video output.
{% endhint %}

## Prerequisite

You have already started your Restreamer and added a video source.

### Step 1

Edit the video source settings.

### Step 2

Start encoding

### Step 3

Various setting options are available besides rotation, also horizontal and vertical flipping.

![Fig 1: Various setting options are available.](https://304400748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS3qj4cW170AMeE1ckj-1703796690%2Fuploads%2F85EpVyyLIvfloapI4H2p%2FBildschirmfoto%202022-07-20%20um%2015.42.30.png?alt=media\&token=48c05405-4259-4411-84dc-462ce7239c10)

## Learn more

{% content-ref url="../../installing" %}
[installing](https://docs.datarhei.com/restreamer/installing)
{% endcontent-ref %}

{% content-ref url="../manual" %}
[manual](https://docs.datarhei.com/restreamer/knowledge-base/manual)
{% endcontent-ref %}


---

# 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.datarhei.com/restreamer/knowledge-base/user-guides/how-to-rotate-a-video.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.
