# Transform and encode a camera stream The **gst-camera-rotate-downscale-file.py** application rotates, downscales, and encodes a camera stream. The transformed stream is then saved to a file. Qualcomm Open source qtiqmmfsrc capsfilter qtivtransform capsfilter tee v4l2h264enc h264prase mp4mux filesink **Figure : Pipeline for video transformation** For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70033-50/topic/camera-transform-downscale-and-rotate-encode.html#section-uk5-f5k-bdc). ## Run the application on the target device 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70033-50/topic/prerequisites-for-python-sample-applications.html). 2. Run the transformation script on the target device: gst-camera-rotate-downscale-file.py Copy to clipboard 3. To display the available help options, run the following command: gst-camera-rotate-downscale-file.py -h Copy 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-70033-50/topic/qtiqmmfsrc.html) | Captures the video stream. | | [qtivtransform](https://docs.qualcomm.com/doc/80-70033-50/topic/qtivtransform.html) | Transforms the video stream. | | [v4l2h264enc](https://docs.qualcomm.com/doc/80-70033-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-70033-50/topic/gst-transform-example.html) Last Published: Nov 04, 2026 [Previous Topic Object detection and classification](https://docs.qualcomm.com/bundle/publicresource/80-70033-50/topics/camera-ai-detection-overlay-composer-display.md) [Next Topic Camera encode, object detection, and display](https://docs.qualcomm.com/bundle/publicresource/80-70033-50/topics/camera-encode-file-detection-yolov8-overlay-display.md)