# Video transcoding 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-80021-50/topic/gst-video-transcode-example.html#section-rdl-ysg-4bc). filesrc h264parse/h265parse vl2h264dec/v4l2h65dec v4l2h265enc/v4l2h64enc h265parse/h264parse mp4mux filesink qtdemux Open source ## Run the 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-80021-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 | 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/.mp4 Copy to clipboard - Transcode from HEVC to AVC: gst-video-transcode-example -i /etc/media/.mp4 -c 2 -o /etc/media/.mp4 Copy 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 --help Copy 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 | 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-80021-50/topic/v4l2h264dec.html) | Decodes the H.264 video stream using Video4Linux. | | [v4l2h265dec](https://docs.qualcomm.com/doc/80-80021-50/topic/v4l2h265dec.html) | Decodes the H.265 video stream using Video4Linux. | | [Waylandsink](https://docs.qualcomm.com/doc/80-80021-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. | | 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-80021-50/topic/transform-and-transcode-use-cases.html) Last Published: Mar 26, 2026 [Previous Topic Audio-video playback](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-audio-video-playback.md) [Next Topic Video playback](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/gst-video-playback-example.md)