# Video transformation using OpenCV
Source: [https://docs.qualcomm.com/doc/80-70018-50/topic/video-playback-using-opencv.html](https://docs.qualcomm.com/doc/80-70018-50/topic/video-playback-using-opencv.html)
The **gst-opencv-transform.py** application captures and transforms a video frame,
and then displays the video on the screen.
The 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
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70018-50/topic/prerequisites-for-python-sample-applications.html).
2. Run the application with input from a video
file.
gst-opencv-transform.py [OPTION?]Copy to clipboard
For
example:
gst-opencv-transform.py --infile /opt/data/Animals_000_720p_180s_30FPS.mp4Copy to clipboard
The
stream is displayed on the screen.
## Expected output
Figure : Expected output for gst-opencv-transform.py application–Preview

## Pipeline flow
The 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-70018-50/topic/v4l2h264dec.html) | Decodes the H.264 video streams. |
| [qtivtransform](https://docs.qualcomm.com/doc/80-70018-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-70018-50/topic/waylandsink.html) | Displays the video stream on the Wayland display. |
**Parent Topic:** [Python applications](https://docs.qualcomm.com/doc/80-70018-50/topic/python-sample-applications.html)
**Related Resources**
- [Video transformation](https://docs.qualcomm.com/doc/80-70018-50/topic/gst-transform-example.html)
- [Transform and Transcode use cases](https://docs.qualcomm.com/doc/80-70018-50/topic/transform-and-transcode-use-cases.html)
- [Video playback](https://docs.qualcomm.com/doc/80-70018-50/topic/gst-video-playback-example.html)
Last Published: Jan 30, 2026
[Previous Topic
Camera streaming using OpenCV](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/gst-camera-opencv-resize-py.md) [Next Topic
Concurrent video playback (video wall) using Python](https://docs.qualcomm.com/bundle/publicresource/80-70018-50/topics/video-wall-using-python.md)