# Video transcoding Source: [https://docs.qualcomm.com/doc/80-70022-50/topic/gst-video-transcode-example.html](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-video-transcode-example.html) The **gst-video-transcode-example** application supports video transcoding of AVC-to-HEVC or HEVC-to-AVC format. A few use cases can be video editing, security camera, and augmented reality. The following figure shows the pipeline, which reads the incoming stream, decodes and encodes it, and either displays the transcoded output on a screen, or saves it to a file. For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70022-50/topic/gst-video-transcode-example.html#gst-video-transcode-example__section_rdl_ysg_4bc). Figure : gst-video-transcode-example pipeline filesrc h264parse/h265parse vl2h264dec/v4l2h65dec v4l2h265enc/v4l2h64enc h265parse/h264parse mp4mux filesink qtdemux Open source ## Run the application The following table lists the actions that can be performed for the common use cases of gst-video-transcode-example application:| Use case | Actions | | --- | --- | | Video editing | Rotate, flip, or resize videos. | | Security camera | Invert or rotate the video image to compensate for situations
where the camera is improperly mounted. | | Augmented reality | Scale or rotate the video feed to synchronize with the virtual
components. | To run the transcoding use cases, do the following: 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70022-50/topic/mm_sample_apps_prerequisites.html). 2. Input `AVC.mp4` and `HEVC.mp4` video files on the target device. 3. In the terminal of the target device, transcode the video file: gst-video-transcode-example -i /etc/media/.mp4 -c -o /etc/media/.mp4 Copy to clipboard The following table provides a description of the command-line parameters: | Command-line parameter | Description | | --- | --- | | `-1` | Specifies the absolute path to the MP4 input
file. | | `-c` | Specifies the video codec of the *input*file.

  • 1 = AVC (H.264)


  • 2 = HEVC (H.265)


| | `-o` | Specifies the absolute path to where the transcoded MP4
file is saved. | 4. Run the use cases for different video formats: - Transcode from AVC to HEVC: gst-video-transcode-example -i /etc/media/.mp4 -c 1 -o /etc/media/.mp4Copy to clipboard - Transcode from HEVC to AVC: gst-video-transcode-example -i /etc/media/.mp4 -c 2 -o /etc/media/.mp4Copy to clipboard 5. To stop the use case, use CTRL + C. 6. In the terminal of the target device, run the following command in the SSH shell to display the available help options: gst-video-transcode-example --helpCopy to clipboard ## Expected output The video stream is transcoded from H.264 to H.265 and back again to the H.264 format. ## Pipeline flow The following table lists the plugins used in the video transcoding pipeline: | Plugin | Description | | --- | --- | | filesrc | Reads the video streams. | | qtdemux | Demultiplexes the streams into separate audio and video
streams. | | h264parse | Parses the H.264 video stream. | | h265parse | Parses the H.265 video stream. | | [v4l2h264dec](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream using Video4Linux. | | [v4l2h265dec](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h265dec.html) | Decodes the H.265 video stream using Video4Linux. | | [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | Displays the H.264 video stream on Wayland display. | | filesink | Writes the H.265 video to a YUV file for playback. | The following table provides information on how the decoded video streams are handled to generate the transcoded output:| Video format | Description | | --- | --- | | H.264 |

  1. v4l2h265enc encodes the decoded
    H.264 video into H.265 format.


  2. h265parse parses the H.265 video stream.


  3. mp4mux multiplexes the stream into an MP4
    container.


  4. filesink writes the stream data to a file.





The AVC (H.264) video is transcoded to HEVC (H.265)
format. | | H.265 |

  1. v4l2h264enc encodes the decoded
    H.265 video into H.264 format.


  2. h264parse parses the H.264 video stream.


  3. mp4mux multiplexes the stream into an MP4
    container.


  4. filesink writes the stream data to a file.





The HEVC (H.265) video is transcoded to AVC (H.264)
format. | ## Related information [Transform and Transcode use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/transform-and-transcode-use-cases.html) **Parent Topic:** [Run sample applications for video and audio](https://docs.qualcomm.com/doc/80-70022-50/topic/audio-sample-applications.html) Last Published: Feb 20, 2026 [Previous Topic Audio-video playback](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-audio-video-playback.md) [Next Topic Video playback](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-video-playback-example.md)