# Transform and encode a camera stream Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/camera-transform-downscale-and-rotate-encode.html](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-transform-downscale-and-rotate-encode.html) The **gst-camera-rotate-downscale-file.py** application rotates, downscales, and encodes a camera stream. The transformed stream is then saved to a file. Note: This application isn't supported on the Ubuntu Server. Figure : Pipeline for video transformation For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/camera-transform-downscale-and-rotate-encode.html#camera-transform-downscale-and-rotate-encode__section_uk5_f5k_bdc). ## Run the application on the target device 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-50/topic/prerequisites-for-python-sample-applications.html). 2. Run the transformation script on the target device: gst-camera-rotate-downscale-file.pyCopy to clipboard 3. To display the available help options, run the following command: gst-camera-rotate-downscale-file.py -hCopy to clipboard ## Expected output The output is saved to a file at /etc/media/test.mp4. ## Pipeline flow The following table lists the plugins used to run the transformation pipeline:| Plugin | Description | | --- | --- | | [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-50/topic/qtiqmmfsrc.html) | Captures the video stream. | | [qtivtransform](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivtransform.html) | Transforms the video stream. | | [v4l2h264enc](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264enc.html) | Encodes H.264 video. | | 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 [Video transformation](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-transform-example.html) **Parent Topic:** [Python applications](https://docs.qualcomm.com/doc/80-70020-50/topic/python-sample-applications.html) Last Published: Jan 30, 2026 [Previous Topic Object detection and classification](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/camera-ai-detection-overlay-composer-display.md) [Next Topic Camera encode, object detection, and display](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/camera-encode-file-detection-yolov8-overlay-display.md)