# Video playback use cases The video playback use cases show the playback of the 4K video stream from a file, which is in a media container format such as MP4. - Before you run the use cases, ensure that you complete the preconditions mentioned in [GStreamer command-line use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/gstreamer-application-use-cases.html). - Run all the commands in the SSH shell of the target device. - To stop the use case, use **CTRL + C**. Note To play the YUV file, pull the YUV dump from the device and play with a YUV player on the host computer. For example, you can select `YUV420planarNV12` format, and use `1920 & 1088` as stride and scanlines. ## Single stream video playback (H.264) - Decode and display a single stream (H.264): gst-launch-1.0 -e filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! waylandsink fullscreen=true Copy to clipboard GST BIN filesrc qtdemux h264parse v4l2h264dec waylandsink Open source **Figure : Pipeline to decode and display a single stream (H.264)** - Decode and save a stream to a file (H.264): gst-launch-1.0 -e filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink location="/opt/video.yuv" Copy to clipboard Open source GST BIN filesrc qtdemux h264parse v4l2h264dec filesink **Figure : Pipeline to decode and save a stream to a file (H.264)** ## Single stream video playback (H.265) - Decode and display a single stream (H.265): gst-launch-1.0 -e filesrc location=/opt/.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! waylandsink fullscreen=true Copy to clipboard Open source GST BIN filesrc qtdemux h265parse v4l2h264dec waylandsink **Figure : Pipeline to decode and display a single stream (H.265)** - Decode and save a stream to a file (H.265): gst-launch-1.0 -e filesrc location=/opt/.mp4 ! qtdemux ! queue ! h265parse ! v4l2h265dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink location="/opt/video.yuv" Copy to clipboard Open source GST BIN filesrc qtdemux h265parse v4l2h264dec filesink **Figure : Pipeline to decode and save a stream to a file (H.265)** ## Single stream video playback (VP9) The use cases show the playback of a 4K video stream from a file of media container format such as webm. - Decode and display a single stream (VP9): gst-launch-1.0 -e filesrc location=/opt/.webm ! matroskademux ! v4l2vp9dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! waylandsink fullscreen=true Copy to clipboard Open source GST BIN filesrc matroskademux v4l2vp9dec waylandsink **Figure : Pipeline to decode and display a single stream (VP9)** - Decode and save a stream to a file (VP9): gst-launch-1.0 -e filesrc location=/opt/.webm ! matroskademux ! v4l2vp9dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! filesink location="/opt/video.yuv" Copy to clipboard Open source GST BIN filesrc matroskademux v4l2vp9dec filesink **Figure : Pipeline to decode and save a stream to a file (VP9)** ## Two 1080p streams video playback simultaneously The pipeline shows the simultaneous playback of two video streams from a file of a media container format such as MP4. **Known issue**: In Dragonwing IQ-9075, running these commands results in a blank screen, which blocks any further execution of the GST commands. - In console 1: gst-launch-1.0 -e filesrc location=/opt/<1080p_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! queue ! qtivcomposer name=mixer sink_1::position="<480, 0>" sink_1::dimensions="<480, 270>" ! waylandsink Copy to clipboard - In console 2: gst-launch-1.0 -e filesrc location=/opt/<1080p_H264/AVC_file>.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw, format=NV12 ! queue ! qtivcomposer name=mixer sink_0::position="<0, 0>" sink_0::dimensions="<480, 270>" ! waylandsink Copy to clipboard filesrc qtdemux h264parse v4l2h264dec waylandsink GST BIN GST BIN filesrc qtdemux h264parse v4l2h264dec waylandsink Open source **Figure : Simultaneous playback of two video streams from a file** ## Frame skip The [videorate](https://gstreamer.freedesktop.org/documentation/videorate/) plugin takes an incoming stream of timestamped video frames and produces a stream that matches the frame rate of the source pad. - To perform a correction, drop and duplicate the frames. - To force a conversion to a specific frame rate, use filtered caps on the source pad. Use any of the following commands to run the use case: - Single stream 1080p at 30 fps AVC file save: gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! queue ! mp4mux ! queue ! filesink location=/opt/video.mp4 Copy to clipboard Playback from a file stream at 15 fps for frame skip: gst-launch-1.0 filesrc location="/opt/video.mp4" ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! videorate ! video/x-raw, framerate=15/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! queue ! filesink location="/opt/video15fps.mp4" Copy to clipboard - 1080p at 30 AVC → encode → decode → videorate at 20 fps → save to file: gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! videorate ! video/x-raw,framerate=20/1 ! v4l2h264enc capture-io-mode=4 output-io-mode=5 ! h264parse ! mp4mux ! queue ! filesink location="/opt/video20fps.mp4" Copy to clipboard ## Related information - [Video playback](https://docs.qualcomm.com/doc/80-80021-50/topic/gst-video-playback-example.html) - [Video transformation using OpenCV](https://docs.qualcomm.com/doc/80-80021-50/topic/video-playback-using-opencv.html) Last Published: Mar 26, 2026 [Previous Topic Transform and Transcode use cases](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/transform-and-transcode-use-cases.md) [Next Topic Audio use cases](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/audio-use-cases.md)