npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crybaby4x4/scrypted-tplink-cn-talkback

v0.0.4

Published

Scrypted plugin for TP-Link IPC Chinese version cameras with two-way audio via MULTITRANS protocol

Readme

TP-Link IPC CN Two-Way Audio — Scrypted Plugin

为国内版 TP-Link IPC 摄像头添加真正的双向音频(对讲)支持。

适用于:TP-Link IPC 系列(国内版),不适用于国际版 Tapo。


特性

本插件以 MixinProvider 方式追加在已有 ONVIF 摄像头上,无需重新添加设备,原有的人体检测、云台控制、动作侦测等功能完全保留。


系统架构

HomeKit / Scrypted UI
        │
        ├─── 视频流 ──▶ Scrypted ONVIF 插件 ──▶ 摄像头(直连)
        │
        └─── 话筒 ────▶ TalkbackMixin(本插件)──▶ 摄像头 TCP(MULTITRANS 直连,默认 554)

| 组件 | 职责 | |------|------| | Scrypted ONVIF 插件 | 视频流、人体检测、动作侦测、云台、快照 | | 本插件(TalkbackMixin) | 双向音频:直连摄像头 MULTITRANS 协议 |

Mixin 架构

Scrypted ONVIF 设备(保留所有原有功能)
  └── TalkbackMixin(本插件追加)
        ├── 覆盖 Intercom 接口 → MULTITRANS 协议
        └── 代理 Settings 接口 → 合并显示 ONVIF + Talkback 配置

只需要:摄像头网络可达 + Scrypted 已通过 ONVIF 接入摄像头。


使用指南

前提条件

  • Scrypted 已通过 ONVIF 插件添加 TP-Link 摄像头,视频流正常
  • Scrypted 服务器与摄像头在同一局域网
  • 摄像头的 RTSP 端口(默认 554)可被 Scrypted 服务器访问

安装插件

在 Scrypted 管理界面(https://你的IP:10443):

  1. 左侧菜单 → Plugins
  2. 搜索 @crybaby4x4/scrypted-tplink-cn-talkback,点击安装

启用双向音频

  1. 打开目标摄像头设备

  2. 进入 Extensions(扩展) 标签

  3. 找到 TP-Link IPC CN Two-Way Audio → 点击启用

  4. 在设备 Settings 页面,滚动到 TP-Link Talkback 分组:

    | 字段 | 说明 | |------|------| | Camera IP Address | 摄像头 IP,通常与 ONVIF 的 IP 相同 | | RTSP Port | MULTITRANS 协议端口,默认 554 | | Username | 摄像头登录用户名(通常为 admin) | | Password | 摄像头登录密码 | | Duplex Mode | half_duplex(默认):对讲模式,说话时无法同时收听;full_duplex:全双工,可同时说话和收听 |

  5. 保存后话筒按钮即可正常使用

使用对讲

  • 在 Scrypted 或 HomeKit 中点击话筒按钮,即可向摄像头端说话
  • 默认为 half_duplex 模式;如需全双工可在设置中切换为 full_duplex

MULTITRANS 协议说明

国内TP-Link 双语音私有协议

握手流程

客户端  →  MULTITRANS rtsp://ip/multitrans RTSP/1.0
           CSeq: 0  X-Client-UUID: <uuid>

摄像头  →  200 OK(部分固件)或 401(需要 Digest 认证)
           Session: <session_id>

客户端  →  MULTITRANS ... + Session + Content-Type: application/json
           {"type":"request","seq":0,"params":{"method":"get","talk":{"mode":"half_duplex|full_duplex"}}}

摄像头  →  200 OK  {"error_code":0, "session_id":"2"}

注意:不同固件版本行为不同。部分摄像头直接返回 200(无需认证),部分需要 Digest。已兼容两种情况。

音频格式

| 参数 | 值 | |------|-----| | 编码 | PCM A-law (pcm_alaw) | | 采样率 | 8000 Hz | | 声道 | 单声道 (mono) | | 传输 | RTP over UDP → 封装为 RTSP interleaved frame → TCP |

RTSP interleaved 帧格式:$ | channel(0x01) | length(2B BE) | rtp_payload

FFmpeg 转码参数

-af aresample=8000,pan=mono|c0=c0,adelay=300:all=1,arealtime
-acodec pcm_alaw -ar 8000 -ac 1
-f rtp rtp://127.0.0.1:<udp_port>

已知限制

  • 部分固件仅支持 half_duplex,切换为 full_duplex 后若对讲无效,请恢复默认值

参考资料与致谢

MULTITRANS 协议实现基于以下开源项目的逆向工程成果:

本插件在上述参考基础上新增:

  • TypeScript/Node.js 实现
  • 200/401 双认证流程兼容(部分固件跳过 Digest 认证直接返回 200)
  • Scrypted MixinProvider 集成(保留 ONVIF 原有功能)