> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable video

This section outlines the prerequisites for video functionality, steps to render video, and methods to validate video playback and video recording.

The following workflow shows the sequence to get started with video functionality:

<div className="flex flex-col items-center gap-2">
  <img src="https://mintcdn.com/qualcomm-prod/h7j64QujhJHkLxyj/Technologies/Video/media/qli-video-technology/Getting-started-workflow.svg?fit=max&auto=format&n=h7j64QujhJHkLxyj&q=85&s=f9cbd3f2be87d07c3833548a889be125" alt="Figure: Getting started workflow for video" width="704" height="133" data-path="Technologies/Video/media/qli-video-technology/Getting-started-workflow.svg" />

  <p className="text-sm text-gray-700">
    **Figure: Getting started workflow for video**
  </p>
</div>

The workflow outlines the essential steps for initializing and starting a video-based system:

1. **Prerequisites:** Build and flash the required software, and establish an SSH connection to the target device.
2. **Setup:** Run the necessary commands from an SSH terminal and push a prerecorded video to the device.
3. **Run:** Run the required commands to validate video playback and recording.

## **Prerequisites**

* Build and flash the software. For information, see [Qualcomm Linux Build Guide](https://dragonwingdocs.qualcomm.com/Key-Documents/Firmware-Guide/build-firmware).
* Connect to the device using SSH. For information, see ***Sign in using SSH***

<Expandable title="Sign in using SSH">
  <SignInUsingSsh />
</Expandable>

## **Set up video rendering**

The setup procedure helps you render video content on the display and transfer it to the device.

To playback a video, transfer a prerecorded H.264 video to the device and run the following command from an SSH terminal:

```text theme={null}
scp -r <file_name> root@[DEVICE IP-ADDR]:/opt
```

<div
  style={{
borderLeft: '4px solid #3B5BDB',
backgroundColor: '#EEF2FF',
padding: '12px 16px',
borderRadius: '4px',
marginTop: '12px'
}}
>
  <p style={{ margin: '0 0 6px 0', fontWeight: 'bold', color: '#1E3A8A' }}>Note:</p>

  <ul style={{ margin: 0, paddingLeft: '20px' }}>
    <li>Video sample mp4 clip can be downloaded externally from the internet.</li>
    <li>When prompted for a password, enter <code>oelinux123</code>.</li>
  </ul>
</div>

## **Validate playback and video recording**

You can run a set of commands on the device terminal to validate the video playback and recording functionality.

**Validate video playback functionality**

1. To validate the video playback functionality, run the following command:
   ```text theme={null}
   gst-launch-1.0 filesrc location=/opt/<file_name> ! qtdemux ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! video/x-raw,format=NV12 ! waylandsink fullscreen=true
   ```
2. To stop validating the use case, select **<kbd>CTRL</kbd>**<kbd> + C</kbd>.

**Validate video recording functionality**

1. To validate the video recording functionality, run the following command:
   ```text theme={null}
   gst-launch-1.0 videotestsrc num-buffers=1000 ! video/x-raw, format=NV12,width=1280,height=720,framerate=30/1,interlace-mode=progressive,colorimetry=bt601 ! queue ! v4l2h264enc capture-io-mode=4 output-io-mode=4 extra-controls="controls,video_bitrate=1000000,video_gop_size=29;" ! h264parse ! queue ! mp4mux ! filesink location=/opt/720p_AVC.mp4
   ```
2. To stop validating the use case, select **<kbd>CTRL</kbd>**<kbd> + C</kbd>.
3. To pull the recorded content from the device, run the following Secure Copy Protocol (SCP) command:
   ```text theme={null}
   scp -r root@[DEVICE IP-ADDR]:/opt/720p_AVC.mp4 user1@[HOST IP-ADDR]:/workspace
   ```
4. Play the content on your host computer.

## **Next steps**

* [Build video source components](https://dragonwingdocs.qualcomm.com/Technologies/Video/build-video-source-components)
* [Explore video sample applications](https://dragonwingdocs.qualcomm.com/Technologies/Video/explore-video-sample-applications)
