Files
gitlab-instance-0a899031_do…/scripts/srt_to_hdmi_drm.example.sh
2026-03-28 02:39:29 -05:00

11 lines
582 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 无 X11/Wayland、仅有 DRM/KMS 的开发板示例:将同源 SRT 解码后送 kmsgrab/drm 需按板卡改设备。
# 请先确认 ffmpeg 编译选项含 --enable-libdrm路径与 connector 用 `modetest`/`drm_info` 自查。
# 使用前复制为 srt_to_hdmi_drm.sh 并修改 DRM 设备与 mode。
set -euo pipefail
: "${SRS_SRT_URL:?设置 SRS_SRT_URL}"
: "${DRM_DEVICE:=/dev/dri/card0}"
echo "示例占位:请根据硬件将下行 ffmpeg 参数改为本机可用的 drmvideo/kmsgrab 输出。" >&2
echo "SRT: $SRS_SRT_URL DRM: $DRM_DEVICE" >&2
exit 1