# Video transformation
The **gst-transform-example** application supports rotation, flipping, and scaling operations.
You can use this application for a security camera. Adjust the orientation of the displayed image using the flip and mirror operations on the CCTV camera. For more information about the transformation properties, see [qtivtransform](https://docs.qualcomm.com/doc/80-70030-50/topic/qtivtransform.html).
The following figure shows the pipeline, which takes the captured video stream, transforms it, and either displays it or saves it to a file. For information about the plugins used in the pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70030-50/topic/gst-transform-example.html#section-m3h-vz5-4bc).
**Figure : gst-transform-example pipeline**
## Run the application
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70030-50/topic/mm_sample_apps_prerequisites.html).
2. In the terminal of the target device, run the following use cases to rotate, downscale, or flip the video:
- Use camera source and save output to a file.
- Perform operations such as rotate, flip, upscale/downscale simultaneously:
gst-transform-example -r 90 -f 2 --output_width 1920 --output_height 1080 -o /etc/media/video_transform.mp4 -i .mp4
Copy to clipboard
- Rotate:
gst-transform-example -r 90 --input_width 3840 --input_height 2160 -o .mp4
Copy to clipboard
- Downscale/upscale:
gst-transform-example --input_width 3840 --input_height 2160 --output_width 1920 --output_height 1080 -o .mp4
Copy to clipboard
- Flip:
gst-transform-example -f 2 --input_width 3840 --input_height 2160 -o .mp4
Copy to clipboard
- Use file source and save output to a file.
- Perform operations such as rotate, flip, upscale/downscale simultaneously:
gst-transform-example -r 90 -f 2 –i .mp4 --output_width 1920 --output_height 1080 -o .mp4
Copy to clipboard
- Rotate:
gst-transform-example -r 90 -i .mp4 -o .mp4
Copy to clipboard
- Downscale/upscale:
gst-transform-example -i .mp4 --output_width 1920 --output_height 1080 -o .mp4
Copy to clipboard
- Flip:
gst-transform-example -f 2 -i .mp4 -o .mp4
Copy to clipboard
3. To stop the use case, use **CTRL + C**.
4. In the terminal of the target device, run the following command in the SSH shell to display the available help options:
gst-transform-example --help
Copy to clipboard
5. In the terminal of the host computer, run the following command to pull the files from the target device:
scp root@:/etc/media/
Copy to clipboard
The following table provides a description of the command-line parameters:
>
>
> | Command-line parameter | Description |
> | --- | --- |
> | `-h, --help` | Help |
> | `--output_width` | Downscale/upscale width.- The default value is 1920. - You can scale from 1080 to 720 or from 720 to 1080. |
> | `--output_height` | Downscale/upscale height. The default value is 1080. |
> | `-o` | Absolute path to generate the file. |
> | `-r` | Image rotate. The values are 0, 90, 180, 270. |
> | `--input_width` | Camera width. The default value is 1920. |
> | `--input_height` | Camera height. The default value is 1080. |
> | `-f` | Flip the image. The values are:
0: Don’t flip (Default).
1: Flip horizontally.
2: Flip vertically.
3: Flip both horizontally and vertically.
|
> | `-I`, `--input_file` | Absolute path of the input file.For example, `-I /etc/media/inputfileh264.mp4` |
> | `-o`,`--output_file` | Absolute path to generate the output file.For example, `-o /etc/media/video_transform.mp4` |
## Expected output
This pipeline supports simultaneous live preview and recording of the transformed video stream.
It provides two outputs:
- A video recording that’s stored as an MP4 file in the specified path.
- A preview on a display device.

**Figure : Expected output for gst-transform-example application–Preview**
## Pipeline flow
The following table lists the plugins used to run the video transforming pipeline:
| Plugin | Description |
| --- | --- |
| [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70030-50/topic/qtiqmmfsrc.html) and filesrc | Captures the video data. |
| capsfilter | Enforces constraints on the raw video data. |
| [qtivtransform](https://docs.qualcomm.com/doc/80-70030-50/topic/qtivtransform.html) | Transforms the video data. After transformation, capsfilter is applied again. |
| tee | Splits the transformed video data in two output paths:
Live preview
Save to file
|
| [Waylandsink](https://docs.qualcomm.com/doc/80-70030-50/topic/waylandsink.html) | Displays the video in live preview. |
| h264parse | Parses the encoded H.264 video stream. |
| mp4mux | Multiplexes the stream into an MP4 container. |
| filesink | Writes the video data to a file. |
## Related information
[Transform and Transcode use cases](https://docs.qualcomm.com/doc/80-70030-50/topic/transform-and-transcode-use-cases.html)
Last Published: Oct 06, 2026
[Previous Topic
Audio recording](https://docs.qualcomm.com/bundle/publicresource/80-70030-50/topics/gst-audio-encode-example-without-flac.md) [Next Topic
Video composition](https://docs.qualcomm.com/bundle/publicresource/80-70030-50/topics/gst-weston-composition-example.md)