# Video transformation using OpenCV
The **gst-opencv-transform.py** application captures and transforms a video frame and then displays the video on the screen.
The following figure shows the pipeline, which takes an input video file and parses it. The OpenCV VideoCapture() function captures a video frame from the file. The video frame is then converted to a different color format (NV12 to BGR) and displayed on the screen.
**Figure : gst-opencv-transform.py pipeline**
## Run the application on the target device
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-80021-50/topic/prerequisites-for-python-sample-applications.html).
2. Input the `(H264.mp4)` video file on the target device.
3. In the terminal of the target device, run the application with input from a video file.
gst-opencv-transform.py [OPTION?]
Copy to clipboard
For example:
gst-opencv-transform.py --infile /etc/media/Animals_000_720p_180s_30FPS.mp4
Copy to clipboard
The stream is displayed on the screen.
## Expected output

**Figure : Expected output for gst-opencv-transform.py application–Preview**
## Pipeline flow
The following table lists the plugins used to run the video playback with OpenCV pipeline:
| Plugin | Description |
| --- | --- |
| filesrc | Reads the video data. |
| qtdemux | Demultiplexes the video data. |
| h264parse | Parses the H.264 video streams. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h264dec.html) | Decodes the H.264 video streams. |
| [qtivtransform](https://docs.qualcomm.com/doc/80-80021-50/topic/qtivtransform.html) | Transforms the video data.
After transformation, capsfilter is applied again. |
| videoconvert | Converts the video frames from one format to another. |
| capsfilter | Enforces constraints on the video data. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-80021-50/topic/waylandsink.html) | Displays the video stream on the Wayland display. |
## Related information
- [Video transformation](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-transform-example.html)
- [Transform and Transcode use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/transform-and-transcode-use-cases.html)
- [Video playback](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-video-playback-example.html)
Last Published: Mar 26, 2026
[Previous Topic
Camera streaming using OpenCV](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-camera-opencv-resize-py.md) [Next Topic
Concurrent video playback (video wall) using Python](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/video-wall-using-python.md)