← 返回 Skills 市场
🔌

jf-open-pro-livestream

作者 jftech · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
46
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install jf-open-pro-livestream
功能描述
杰峰设备直播预览技能(开发版)。支持多端集成实时视频播放,兼容 HLS、RTSP、RTMP、FLV、MP4、WebRTC 等主流协议,适配 H.264/H.265 设备。
使用说明 (SKILL.md)

jf-open-pro-livestream - 杰峰设备直播预览技能(开发版)

技能描述

支持杰峰设备实时直播地址获取,适用于多端集成播放:

  • 多协议支持 - HLS、RTSP、RTMP、FLV、MP4、WebRTC
  • 多端适配 - Web、微信小程序、H5、第三方播放器
  • 编码兼容 - H.264、H.265 视频编码
  • 低时延 - WebRTC 低时延预览(仅 H.264)

适用场景:

  • Web 页面嵌入实时监控
  • 微信小程序视频播放
  • 第三方播放器集成
  • 移动端 APP 视频预览

触发词

  • 获取直播地址 / 直播预览 / 实时播放
  • 视频流地址 / 获取播放 URL / 直播流

前置条件

设备要求

  1. 设备在线 - 设备需在线且可访问
  2. 低功耗设备 - 获取 URL 后必须在 3 秒内播放
  3. 编码配置 - H.265 设备建议使用特定协议

必需配置

  1. 签名算法 - 使用杰峰官方移位加密算法生成 signature
  2. 时间戳算法 - counter(7 位) + timeMillis(13 位),实时生成
  3. 设备绑定 - 设备需先绑定到开放平台账号

环境变量

变量名 说明 默认值 必需
JF_UUID 开放平台用户 uuid -
JF_APP_KEY 开放平台应用 appKey -
JF_APP_SECRET 开放平台应用密钥 -
JF_MOVE_CARD 移动卡标识(用于签名) 2
JF_DEVICE_SN 设备序列号 -
JF_DEVICE_TOKEN 设备接口访问令牌 -
JF_DEVICE_USERNAME 设备用户名 admin
JF_DEVICE_PASSWORD 设备密码 -
JF_ENDPOINT API 接入地址 api-cn.jftechws.com

API 接口

功能 地址 方法 需要 Token 需要在线
获取直播地址 POST /gwp/v3/rtc/device/livestream/{token} POST

支持的协议

FLV 协议族

协议 说明 适用场景
FLV flv 标准 FLV 封装 Web 端(H.264/H.265)
FLV 增强 flv-enhanced FLV-enhanced 封装 VLC 4.0+、ffmpeg 6.1+
WS-FLV ws-flv WebSocket FLV Web 端低时延
WS-FLV 增强 ws-flv-enhanced WebSocket FLV-enhanced Web 端低时延
WS 私有 ws-pri 杰峰私有协议 杰峰 WEB 播放器

HLS 协议族

协议 说明 适用场景
HLS-TS hls-ts HLS+TS 切片 iOS、Safari
HLS-FMP4 hls-fmp4 HLS+fMP4 切片 iOS、Safari

RTMP 协议族

协议 说明 适用场景
RTMP-FLV rtmp-flv RTMP+FLV 微信小程序
RTMP 增强 rtmp-enhanced RTMP+FLV-enhanced 微信小程序

RTSP 协议族

协议 说明 适用场景
RTSP-SDP rtsp-sdp RTSP 标准协议 VLC、FFmpeg
RTSP 私有 rtsp-pri RTSP 私有协议 杰峰客户端

MP4 协议

协议 说明 适用场景
MP4 mp4 HTTP+MP4 Chrome 23+

WebRTC 协议

协议 说明 适用场景
WebRTC webrtc WebRTC 协议 仅 H.264,低时延

使用场景推荐

微信小程序

组件 支持协议
live-player http-flvrtmphls

H5 页面/Web 端

播放方式 支持协议 说明
\x3Cvideo> 标签 hlsmp4 仅 H.264
flv.js http-flv 需要 H.264
WebRTC API webrtc 仅 H.264,低时延
杰峰 WEB 播放器 全部 支持 H.264/H.265

第三方播放器

播放器 推荐协议
VLC 4.0+ flv-enhancedrtsp
FFmpeg 6.1+ flv-enhancedrtsp
PotPlayer rtsprtmp

使用示例

环境准备

# 设置环境变量
export JF_UUID="uuidxxxx"
export JF_APP_KEY="appkeyxxxx"
export JF_APP_SECRET="appsecretxxxx"
export JF_MOVE_CARD=0
export JF_DEVICE_SN="snxxx1"
export JF_DEVICE_TOKEN="NTQ0NzQ3YmE3MXwyYzFk..."
export JF_DEVICE_USERNAME="admin"
export JF_DEVICE_PASSWORD="xxxx"
export JF_ENDPOINT="api-cn.jftechws.com"

1. 获取 FLV 直播地址(Web 端推荐)

cd ~/.openclaw/workspace/skills/developer/jf-open-pro-livestream/scripts

# 获取 FLV 地址(标清辅码流)
python3 livestream.py --action get-url --protocol flv

# 获取 FLV 地址(高清主码流)
python3 livestream.py --action get-url --protocol flv --stream 0

2. 获取 HLS 地址(iOS/小程序推荐)

# 获取 HLS-TS 地址
python3 livestream.py --action get-url --protocol hls-ts

# 获取 HLS-FMP4 地址
python3 livestream.py --action get-url --protocol hls-fmp4

3. 获取 RTMP 地址(微信小程序)

# 获取 RTMP-FLV 地址
python3 livestream.py --action get-url --protocol rtmp-flv

4. 获取 WebRTC 地址(低时延,仅 H.264)

# 获取 WebRTC 地址(仅支持 H.264 设备)
python3 livestream.py --action get-url --protocol webrtc

5. 获取 RTSP 地址(VLC/FFmpeg)

# 获取 RTSP 地址
python3 livestream.py --action get-url --protocol rtsp-sdp

6. 设置 URL 有效期

# 设置 24 小时有效期
python3 livestream.py --action get-url --protocol flv --expire-hours 24

# 设置 7 天有效期
python3 livestream.py --action get-url --protocol flv --expire-days 7

请求参数

参数 类型 必需 默认值 说明
channel string 0 通道号(0=第一通道)
stream string 1 码流(0=高清主码流,1=标清辅码流)
protocol string - 播放协议
username string admin 设备登录用户名
password string `` 设备登录密码
expireTime string 10 小时 URL 有效期(毫秒时间戳)

响应参数

字段 类型 说明
code int 平台状态码(2000=成功)
msg string 响应消息
data object 响应数据
├─ Ret int 设备状态码(100=成功)
├─ url string 播放地址 URL
└─ retMsg string 设备错误信息(失败时)

状态码

平台状态码

code 说明 处理建议
2000 成功 -
28007 Header 参数错误 检查 uuid、appKey、timeMillis、signature
40103 无效 Token deviceToken 过期,重新获取
50000 服务器内部错误 联系杰峰技术支持

设备状态码(Ret)

Ret 说明 处理建议
100 成功 -
101 登录连接超时 检查设备是否在线
106 用户名或密码错误 检查设备凭证

注意事项

  1. URL 有效期 - 默认 10 小时,可自定义 30 秒 -720 天
  2. 低功耗设备 - 获取 URL 后必须在 3 秒内播放
  3. 设备休眠 - 低功耗设备需先唤醒再获取 URL
  4. 编码格式 - WebRTC 仅支持 H.264 设备
  5. H.265 设备 - 建议使用 flv-enhanced 或 ws-flv-enhanced
  6. 重复使用 - 有效期内 URL 可重复使用,减少起播时长
  7. 单路限制 - 部分设备同时只支持一路直播流

相关文件

文件 说明
SKILL.md 技能文档
scripts/livestream.py Python 执行脚本
scripts/crypto.py 签名/时间戳加密工具(复用)

参考文档

安全使用建议
Review this before installing in any environment with real cameras. Use only least-privilege JF credentials, keep tokens and returned livestream URLs out of logs and chat transcripts, avoid long URL expirations, and require explicit user confirmation before running it. Do not use the test-url action unless you trust the configured endpoint and upstream API response.
能力标签
crypto
能力评估
Purpose & Capability
The stated purpose matches the code: it signs requests to the JF API and returns livestream URLs for camera devices. The concern is that returned URLs can expose real-time camera feeds, and the documentation does not clearly warn users that credentials, device tokens, passwords, and stream URLs are highly sensitive.
Instruction Scope
The trigger phrases are broad and generic for a high-privacy action, and the instructions do not require explicit device selection or confirmation before revealing a stream URL.
Install Mechanism
The artifact contains a SKILL.md plus Python helper scripts; no hidden installer, package install hook, or automatic startup mechanism was found.
Credentials
Environment variables for API keys, app secrets, device tokens, optional device passwords, and endpoint selection are disclosed and mostly purpose-aligned, but the endpoint is configurable and the skill sends credentials in signed API requests.
Persistence & Privilege
No persistence or privilege escalation was found, but the skill uses stored credentials to fetch direct livestream URLs and includes a test action that makes a HEAD request to the returned URL without domain or private-network validation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jf-open-pro-livestream
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jf-open-pro-livestream 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
jf-open-pro-livestream v1.0.0 - 首次发布杰峰设备直播预览技能,支持主流实时视频协议(HLS、RTSP、RTMP、FLV、MP4、WebRTC),兼容 H.264/H.265 设备。 - 提供多端(Web、微信小程序、第三方)集成示例与详细配置说明。 - 支持多种直播流协议族与播放场景选择,易于集成与部署。 - 涵盖设备、环境与接口使用前置条件,包含详细错误码说明与实用注意事项。 - 附带 Python 演示脚本和签名加密工具,便于开发和测试。
元数据
Slug jf-open-pro-livestream
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

jf-open-pro-livestream 是什么?

杰峰设备直播预览技能(开发版)。支持多端集成实时视频播放,兼容 HLS、RTSP、RTMP、FLV、MP4、WebRTC 等主流协议,适配 H.264/H.265 设备。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 46 次。

如何安装 jf-open-pro-livestream?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jf-open-pro-livestream」即可一键安装,无需额外配置。

jf-open-pro-livestream 是免费的吗?

是的,jf-open-pro-livestream 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

jf-open-pro-livestream 支持哪些平台?

jf-open-pro-livestream 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 jf-open-pro-livestream?

由 jftech(@jftech)开发并维护,当前版本 v1.0.0。

💬 留言讨论