# Additional transform and transcode use cases

Source: [https://docs.qualcomm.com/doc/80-70015-50/topic/additional-transform-and-transcode-use-cases.html](https://docs.qualcomm.com/doc/80-70015-50/topic/additional-transform-and-transcode-use-cases.html)

## Video transform use cases

- 4K@30 AVC → decode → rotate and downscale → 1080p@30 AVC
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! qtivtransform engine=fcv rotate=90CCW ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! qtivtransform engine=gles rotate=90CCW ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- 4K@30 AVC → decode → flip and downscale → 1080p@30 AVC
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! qtivtransform engine=fcv flip-vertical=true ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! qtivtransform engine=gles flip-vertical=true ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_rotate\_counter\_clockwise\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv rotate=90CCW ! queue ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc ! qtivtransform engine=gles rotate=90CCW ! queue ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_scale\_down\_3840 x 2160 @30fps\_to\_1080p
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv ! queue ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc ! qtivtransform engine=gles ! queue ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4Copy to clipboard
- Video\_qmmf\_Transform\_flip\_horizontal\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv flip-horizontal=true ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_h.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc ! qtivtransform engine=gles flip-horizontal=true ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_h.mp4Copy to clipboard
- Video\_qmmf\_Transform\_flip\_vertical\_3840 x 2160 @30fps
    - Qualcomm Computer Vision SDK (fcv)
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! qtivtransform engine=fcv flip-vertical=true ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_v.mp4Copy to clipboard
    - GLES
                            engine:

            gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc ! qtivtransform engine=gles flip-vertical=true ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video_flip_v.mp4Copy to clipboard

## Video transcode use cases

- 4k@30 HEVC → decode → 4k@30 AVC
                    encode:

        gst-launch-1.0 -e filesrc location=/opt/<4K_H265/HEVC_file>.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=5 output-io-mode=5 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! queue ! h264parse ! mp4mux ! queue ! filesink location=/opt/offline_hevc_to_avc.mp4Copy to clipboard
- 4k@30 AVC → decode → 4k@30 HEVC
                    encode:

        gst-launch-1.0 -e filesrc location=/opt/<4K_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! v4l2h265enc capture-io-mode=5 output-io-mode=5 ! queue ! h265parse ! mp4mux ! queue ! filesink location="/opt/offline_avc_to_hevc.mp4"Copy to clipboard

## Dynamic cropping using qtivtransform

**Single 1080p file stream from which the ROI is cropped**
1. Display the
                        stream:

        gst-launch-1.0 filesrc location=/opt/<input_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! queue ! qtivtransform flip-vertical=true crop="<480,270,960,540>" ! waylandsink fullscreen=trueCopy to clipboard
2. Encode the stream
                        data:

        gst-launch-1.0 -e filesrc location=/opt/<input_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=5 output-io-mode=5 ! queue ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! queue ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/offline_crop_vtransform.mp4Copy to clipboard

**Single 1080p camera stream from which ROI is cropped**

1. Display the
                    stream:

        gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc ! queue ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! waylandsink fullscreen=trueCopy to clipboard
2. Encode the stream
                    data:

        gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc ! qtivtransform flip-horizontal=true crop="<480,270,960,540>" ! queue ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc,interlace-mode=progressive,colorimetry=bt601 ! v4l2h264enc capture-io-mode=5 output-io-mode=5 ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/cam_crop_vtransform.mp4Copy to clipboard

**Parent Topic:** [Transform and Transcode use cases](https://docs.qualcomm.com/doc/80-70015-50/topic/transform-and-transcode-use-cases.html)

Last Published: Oct 27, 2025

[Previous Topic
K – downscale to 1080p—encode to AVC MP4](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/4k-downscale-to-1080p-encode-to-avc-mp4-mux.md) [Next Topic
Video playback use cases](https://docs.qualcomm.com/bundle/publicresource/80-70015-50/topics/video-playback-use-cases.md)