# GStreamer 命令行用例

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/gstreamer-application-use-cases.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/gstreamer-application-use-cases.html)

GStreamer 提供命令行工具（例如 [gst-launch-1.0](https://gstreamer.freedesktop.org/documentation/tools/gst-launch.html) 工具）来帮助您运行 AI/ML 和多媒体用例。

## 前提条件

- 针对 Qualcomm Linux 1.6 或 Ubuntu Server，[开始使用 Qualcomm IM SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-51/install-sdk.html)。
- 在您的 Qualcomm Linux 或 Ubuntu 上激活 SSH，以便使用 SSH 登录并连接到目标设备。有关说明，请参阅：
    - [使用 SSH 登录](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-254/how_to.html#use-ssh) Qualcomm Linux
    - [使用 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) Ubuntu Server

Note: 如果已设置 SSH 并连接 Wi-Fi，请跳过此步骤。
- 使用 HDMI 端口将显示器连接到设备。有关说明，请参见[设置 HDMI 显示器](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-18/samples.html)。
- 使用 SSH 登录目标设备。
- 在目标设备的终端中，从目标设备的 SSH shell 运行以下命令以激活主机上的显示器：
    - 对于 Linux：

            export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard
    - 对于 Ubuntu Server：

            export XDG_RUNTIME_DIR=/run/user/$(id -u ubuntu)/ && export WAYLAND_DISPLAY=wayland-1 Copy to clipboard
- 连接扬声器以激活目标设备上的音频。有关说明，请参见[设置音频硬件](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-16/enable-audio.html)。
    如果您遇到摄像头或显示器问题，请参阅[摄像头问题排查](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-17/troubleshooting.html)和[显示问题排查](https://docs.qualcomm.com/bundle/publicresource/topics/80-70022-18/debug.html)。

- 在 Linux 主机的终端中，运行以下命令将文件推送到目标设备：

        scp -r <file_name> root@[DEVICE IP-ADDR]:/optCopy to clipboard
- GBM 错误是非致命的。但是，要避免这些错误，请使用以下命令：

        mkdir -p /var/cache/display
        echo 0 > /var/cache/display/gbm_dbg_cfg.txtCopy to clipboard
- 对于 Dragonwing IQ-9075 和 Dragonwing IQ-8275，请将 Waylandsink 插件的全屏属性设置为 true：

        fullscreen=trueCopy to clipboard

- **[运行机器学习用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/machine-learning-use-cases.html)**  

在机器学习用例中使用 LiteRT 和 Qualcomm Neural Processing SDK runtime 进行推理。
- **[运行多媒体用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/multimedia-use-cases.html)**  

多媒体用例展示了使用 GStreamer pipeline 的各种多媒体场景。

Last Published: Nov 05, 2025

[Previous Topic
运行 GStD 的 Docker 镜像](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/container-use-cases-for-video-encode-and-ai-pipelines.md) [Next Topic
运行机器学习用例](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/machine-learning-use-cases.md)