# Video playback
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/gst-video-playback-example.html](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-video-playback-example.html)
The **gst-video-playback-example** application allows you to decode and playback a
video file. The standard playback options such as play, pause, resume, and fast forward are
supported.
The following figure shows the pipeline workflow of the video playback GStreamer
application. The file is read, demultiplexed, parsed, decoded, and displayed on a
screen. For more information about the plugins, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-video-playback-example.html#gst-video-playback-example__section_op1_zwh_4bc).
Figure : gst-video-playback-example pipeline
## Prerequisites
- [Get started with the Qualcomm IM SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-51/install-sdk.html)
for your Qualcomm Linux 1.5 or Ubuntu Server.
- Activate SSH on your Qualcomm Linux or Ubuntu to sign in with SSH and connect to
the target device. For instructions see:
- [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-254/how_to.html#use-ssh) for Qualcomm
Linux
- [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-90441-1/Use_Ubuntu_on_RB3_Gen2_3.html#sign-in-to-the-rb3-gen-2-console-using-ssh) for Ubuntu
Server
Note: If SSH is already set up and Wi-Fi is
connected, skip this step.
- Use the HDMI port to connect the display to the device. For instructions, see
[Set up HDMI display](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-18/samples.html).
- Sign in to the target device using SSH.
- In the terminal of the target device, run the following commands from the SSH
shell of the target device to activate the display on the host computer:
- For
Linux:
export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
- For Ubuntu Server:
export XDG_RUNTIME_DIR=/run/user/$(id -u ubuntu)/ && export WAYLAND_DISPLAY=wayland-1 Copy to clipboard
- Connect the speaker to activate the audio on the target device. For
instructions, see [Set up audio hardware](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-16/enable-audio.html).
If you face
issues in recording the audio, run the following command in the terminal of
the target
device:
pactl set-default-source pal_source_speaker_micCopy to clipboard
- If you face issues with the camera or display, see [Camera troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-17/troubleshooting.html) and [Display troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70020-18/debug.html).
To use this application effectively, you should be aware of the GStreamer pipeline
construction.
## Run the application
1. Ensure that you input the `AVC.mp4 (H.264)` and `HEVC.mp4
(H.265)` video files on the target device.
2. In the terminal of the target device, play back the video
file:
gst-video-playback-example -e filesrc location=.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! waylandsink enable-last-sample=false fullscreen=trueCopy to clipboard
The following table provides a description of the command-line
parameters: | Command-line parameter | Description |
| --- | --- |
| `` | Specifies the MP4 input file to playback |
| `` | Specifies the video parser.
h264parse for H.264
h265parse for H.265
|
| `` | Specifies the video decoder.
v4l2h264dec for H.264
v4l2h265dec for H.265
|
For example, run the following commands for different video playback
use cases:
- Playback AVC (H.264)
video:
gst-video-playback-example -e filesrc location=.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! waylandsink enable-last-sample=false fullscreen=trueCopy to clipboard
- Playback HEVC (H.265)
video:
gst-video-playback-example -e filesrc location=.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! waylandsink enable-last-sample=false fullscreen=trueCopy to clipboard
3. To stop the use case, use CTRL +
C.
4. In the terminal of the target device, run the following command in the SSH shell
to display the available help
options:
gst-video-playback-example --helpCopy to clipboard
## Expected output
The video is captured, decoded, and played on the local display.
Figure : Expected output for gst-video-playback-example application

## Pipeline flow
The following table lists the plugins used to run the video playback
pipeline:| Plugin | Description |
| --- | --- |
| filesrc | Reads the AVC or HEVC MP4 file. |
| qtdemux | Demultiplexes the AVC or HEVC MP4 file. |
| h264parse | Parses the video stream for H.264 format. |
| h265parse | Parses the video stream for H.265 format. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264dec.html) | Decodes the video stream for H.264 format. |
| [v4l2h265dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h265dec.html) | Decodes the video stream for H.265 format. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70020-50/topic/waylandsink.html) | Displays the video in full-screen mode on a Wayland display. |
## Known issue
The rewind playback option isn't supported
## Related information
- [Video transformation using OpenCV](https://docs.qualcomm.com/doc/80-70020-50/topic/video-playback-using-opencv.html)
- [Video playback use cases](https://docs.qualcomm.com/doc/80-70020-50/topic/video-playback-use-cases.html)
**Parent Topic:** [Run sample applications for video and audio](https://docs.qualcomm.com/doc/80-70020-50/topic/audio-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
Video transcoding](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-video-transcode-example.md) [Next Topic
Audio and video encode](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/gst-audio-video-encode.md)