# Player: Single-stream playback

Source: [https://docs.qualcomm.com/doc/80-88500-3/topic/29_Player_single_stream_playback.html](https://docs.qualcomm.com/doc/80-88500-3/topic/29_Player_single_stream_playback.html)

This section provides information on executing common playback use cases from
      `gst-launch`. The `qtic2vdec` GStreamer video decoder plug-in is
    used for hardware-accelerated video decoding.

Note: Ensure that Weston is running. For more information, see [Verify Weston](https://docs.qualcomm.com/doc/80-88500-3/topic/10_Verify_Weston.html#Verify_Weston_10).

## 4K video file playback

1. Run the following command to generate the 4K MP4 file for playback.
    - For Linux
              Ubuntu:

            gst-launch-1.0 -e qtiqmmfsrc name=qmmf camera=0 ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! queue ! qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location=/data/output/mux.mp4Copy to clipboard

    - For Linux
              Embedded:

            gst-launch-1.0 -e qtiqmmfsrc name=qmmf ! video/x-raw\(memory:GBM\),format=NV12,width=3840,height=2160,framerate=30/1 ! queue ! qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location=/data/output/mux.mp4Copy to clipboard
2. Run the following command to start video playback.
    - For Linux
              Ubuntu:

            export XDG_RUNTIME_DIR=/run/user/root  && gst-launch-1.0 filesrc location=/data/output/mux.mp4 ! qtdemux name=demux demux. ! queue ! h264parse ! qtivdec ! video/x-raw\(memory:GBM\),compression=nonubwc ! waylandsink fullscreen=trueCopy to clipboard

    - For Linux Embedded:

            export XDG_RUNTIME_DIR=/run/user/root && export WAYLAND_DISPLAY=wayland-1 && gst-launch-1.0 filesrc location=/data/output/mux.mp4 ! qtdemux name=demux demux. ! queue ! h264parse ! qtic2vdec ! video/x-raw\(memory:GBM\),compression=nonubwc !waylandsink fullscreen=trueCopy to clipboard

## 1080p video file playback

1. Run the following command to generate a 1080p video file for playback.
    - For Linux
              Ubuntu:

            gst-launch-1.0 -e qtiqmmfsrc name=qmmf camera=0 ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location=/data/output/mux.mp4Copy to clipboard

    - For Linux
              Embedded:

            gst-launch-1.0 -e qtiqmmfsrc name=qmmf ! video/x-raw\(memory:GBM\),format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! qtic2venc ! queue ! h264parse ! mp4mux ! queue ! filesink location=/data/output/mux.mp4Copy to clipboard
2. Run the following command to start video playback.
    - For Linux
              Ubuntu:

            export XDG_RUNTIME_DIR=/run/user/root  && gst-launch-1.0 filesrc location=/data/output/mux.mp4 ! qtdemux name=demux demux. ! queue ! h264parse ! qtivdec ! video/x-raw\(memory:GBM\),compression=nonubwc ! waylandsink fullscreen=trueCopy to clipboard

    - For Linux
              Embedded:

            export XDG_RUNTIME_DIR=/run/user/root && export WAYLAND_DISPLAY=wayland-1 && gst-launch-1.0 filesrc location=/data/output/mux.mp4 ! qtdemux name=demux demux. ! queue ! h264parse ! qtic2vdec ! video/x-raw\(memory:GBM\),compression=nonubwc ! waylandsink fullscreen=trueCopy to clipboard

The `waylandsink` plug-in renders the decoded YUV buffers on the HDMI
        display. The `waylandsink` plugin is a client of Weston.

**Parent Topic:** [Multimedia use cases](https://docs.qualcomm.com/doc/80-88500-3/topic/28_Multimedia_use_cases.html)

Last Published: Sep 26, 2023

[Previous Topic
Multimedia use cases](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/28_Multimedia_use_cases.md) [Next Topic
Player: Multistream playback](https://docs.qualcomm.com/bundle/publicresource/80-88500-3/topics/33_Player_multi_stream_playback.md)