# AI smart codec

Source: [https://docs.qualcomm.com/doc/80-70018-50/topic/ai-smart-codec.html](https://docs.qualcomm.com/doc/80-70018-50/topic/ai-smart-codec.html)

The **gst-ai-smartcodec-example** application reduces network bandwidth and
        storage resources for input from a camera or a file source.

## Sample model and label files

Table : Sample model and label files for gst-ai-smartcodec-example

| Runtime | Model files | Label files |
| :--- | :--- | :--- |
| LiteRT | <var class="keyword varname">YOLOv8-Detection-Quantized.tflite</var> | <var class="keyword varname">coco_labels.txt</var> |

## Prerequisites

- If not already done so, [Download and install eSDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-51/install-sdk.html#download-and-install-esdk-).
- Download model and label files.
- To access your host computer, enable SSH. For instructions, see [Sign in using SSH](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-254/how_to.html#use-ssh).
Note: If SSH is already enabled, you can skip this
                        step.
- Push the model files from the Linux host
                    computer.

        scp <model_filename> root@<IP address of target device>:/etc/modelsCopy to clipboard
- Note that the downloaded
                        script downloads the sample video.mp4 video to
                    the /etc/media directory. If you are using a custom video,
                    then ensure that you push the video to /etc/media and
                    update the file path in the application config.JSON file.
- Connect the display to the device using the HDMI port. For instructions, see
                        [Set up HDMI display](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/samples.html).
- Enable the
                    display:

        export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard

If you face issues while enabling camera or display, see [Camera troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-17/troubleshooting.html) and [Display troubleshooting](https://docs.qualcomm.com/bundle/publicresource/topics/80-70018-18/debug.html).

## Run the application

For model and label files, see Sample model and label files.

- Run the application with a camera
                    source:

        gst-ai-smartcodec-example -w 640 -h 480 -o output.mp4 -m /etc/models/YOLOv8-Detection-Quantized.tflite -l /etc/labels/coco_labels.txtCopy to clipboard
- Run the application with a file
                    source:

        gst-ai-smartcodec-example -i /etc/media/video.mp4 -o output.mp4 -m /etc/models/YOLOv8-Detection-Quantized.tflite -l /etc/labels/coco_labels.txtCopy to clipboard

To display the available help options, run the following commands in the SSH
                shell:

    gst-ai-smartcodec-example --helpCopy to clipboard

To stop the use case, use CTRL + C.

## Expected output

The application generates the output as an encoded MP4 file.

**Parent Topic:** Run AI/ML sample applications

**Related Resources**  

- Smart codec

Last Published: Jan 30, 2026

Previous Topic
 
Multistream batch inference Next Topic

Face detection