Skip to content

Releases: stackia/rtp2httpd

v3.7.0

27 Jan 08:38

Choose a tag to compare

新功能

  • 新增配置项 udp-rcvbuf-size 用于手动指定 UDP 接收缓冲区大小(默认 512KB)
    • 频繁遇到丢包花屏可以尝试增大这个选项
    • 需要以 root 权限运行才有效(对于 Docker,需要指定 --cap-add=NET_ADMIN
    • 在 OpenWrt LuCI UI 也新增了这个选项 UDP 接收缓冲区大小
  • 新增 RTP 乱序包重排能力,改善一些网络环境下的乱序包花屏问题
    • 开箱即用,无需任何配置
  • 新增 FEC 前向纠错功能,在 URL 上指定 ?fec=<端口> 来启用
    • 有些运营商支持 FEC 前向纠错,用户观看一个频道时,同时接收两个组播流,一个组播流负责发送 RTP 包,另一个组播流负责发送 FEC 冗余包,当 RTP 流丢包时,可以利用 FEC 流进行恢复。
    • FEC 流和 RTP 流使用相同的组播 IP,不同的端口。抓包出来的 ChannelFECPort 就是 FEC 端口。
    • 由于不同运营商的 FEC 纠错算法有差异,未必能支持所有 FEC 算法,如遇问题请提 issue 反馈(需提供抓包文件)
    • URL 示例:http://<ip>:<port>/rtp/239.253.64.120:5140?fcc=10.255.14.152:8027&fcc-type=huawei&fec=5142
  • 一键安装脚本:使用 OpenWrt 自带的 uclient-fetch 代替 curl 避免一些人没有安装 curl 导致脚本失败

问题修复

  • 修复转换后的 playlist.m3u 未在 EPG URL 带上 r2h-token,导致 EPG 加载失败 by @mjl371
  • Web 状态面板不再对每个客户端 URL 重复显示 r2h-token=xxxx,保持 UI 清爽

New Features

  • New configuration option udp-rcvbuf-size to manually specify the UDP receive buffer size (default 512KB)
    • Try increasing this if you frequently experience packet loss and video artifacts
    • Requires root privileges to take effect (for Docker, use --cap-add=NET_ADMIN)
    • Also available in the OpenWrt LuCI UI as UDP Receive Buffer Size
  • New RTP out-of-order packet reordering, improving video artifacts caused by packet reordering in some network environments
    • Works out of the box, no configuration needed
  • New FEC (Forward Error Correction) support, enabled by specifying ?fec=<port> in the URL
    • Some ISPs support FEC: when watching a channel, two multicast streams are received simultaneously — one for RTP packets and another for FEC redundancy packets. When the RTP stream has packet loss, FEC packets can be used for recovery.
    • FEC and RTP streams share the same multicast IP but use different ports. The ChannelFECPort from packet capture is the FEC port.
    • Due to varying FEC algorithms across ISPs, not all FEC algorithms may be supported. Please open an issue if you encounter problems (packet capture required).
    • URL example: http://<ip>:<port>/rtp/239.253.64.120:5140?fcc=10.255.14.152:8027&fcc-type=huawei&fec=5142
  • Installation script: now uses OpenWrt's built-in uclient-fetch instead of curl to avoid failures when curl is not installed

Bug Fixes

  • Fixed the converted playlist.m3u not including r2h-token in the EPG URL, causing EPG loading failures by @mjl371
  • The web status panel no longer repeatedly displays r2h-token=xxxx for each client URL, keeping the UI clean

v3.6.2

09 Jan 04:15

Choose a tag to compare

  • 网页播放器:频道 logo 图片加载使用 no-referrer policy,避免一些网站的防盗链设置导致图片加载失败
  • 修复在非常罕见的情况下,RTSP 连接会卡在 RTSP 完成 TEARDOWN 状态且一直不会释放
  • 设置 UDP RCVBUF 时,尝试使用 SO_RCVBUFFORCE 以突破一些固件的默认内核参数 net.core.rmem_max 限制,可以改善 4K 视频流偶尔花屏马赛克问题
  • 修复对于一些特殊的 RTSP 上游,断开连接时出现 RTSP: Socket event handling failed 报错

  • Web player: channel logo images now use no-referrer policy to avoid loading failures caused by hotlink protection on some websites
  • Fixed a very rare case where an RTSP connection could get stuck in RTSP TEARDOWN completed state and never be released
  • When setting UDP RCVBUF, now attempts to use SO_RCVBUFFORCE to bypass the default kernel parameter net.core.rmem_max limit on some firmware, improving occasional 4K video artifacts
  • Fixed RTSP: Socket event handling failed error when disconnecting from some special RTSP upstreams

v3.6.1

31 Dec 04:47

Choose a tag to compare

  • 兼容之前的 hostname 配置行为,即当配置了 https://your-domain.com 时,生成的 m3u 内的频道地址会使用 https 而不是默认的 http

  • Restored backward compatibility with the previous hostname configuration behavior: when configured with https://your-domain.com, channel URLs in the generated m3u will use https instead of the default http

v3.6.0

30 Dec 16:38

Choose a tag to compare

新功能

  • 新增 r2h-start 参数用来指定 RTSP PLAY 起始时间 by @yydewf
  • 优化对反向代理场景的支持,playlist.m3u 现在会总是使用用户实际请求的 host 作为地址前缀。反向代理的具体配置方式请参考 公网访问建议
    • 如果你原先使用 hostname 配置项来解决反代地址问题,现在需要改成开启 xff 配置项并透传 X-Forwarded-For / X-Forwarded-Host / X-Forwarded-Proto 头(对于 lucky,勾选"万事大吉"选项即可)
  • INFO 日志输出现在会记录客户端的访问 IP: New client <ip>:<port> requested URL

问题修复

  • 改进对 gzipped epg.xml 兼容性 by @taksssss

New Features

  • New r2h-start parameter to specify the RTSP PLAY start time by @yydewf
  • Improved reverse proxy support: playlist.m3u now always uses the host from the actual client request as the URL prefix. See Public Access Guide for reverse proxy configuration.
    • If you previously used the hostname configuration to resolve reverse proxy address issues, you now need to enable the xff option and forward X-Forwarded-For / X-Forwarded-Host / X-Forwarded-Proto headers instead
  • INFO log output now records the client's access IP: New client <ip>:<port> requested URL

Bug Fixes

  • Improved compatibility with gzipped epg.xml by @taksssss

v3.5.2

12 Dec 18:37

Choose a tag to compare

  • 网页播放器:视频正常播放时,现在可以自动隐藏鼠标指针

  • Web player: the mouse cursor now auto-hides during normal video playback

v3.5.1

28 Nov 12:57

Choose a tag to compare

  • 修复在 Docker 内,v3.5.0 worker 持续崩溃无法正常运行问题

  • Fixed v3.5.0 worker continuously crashing and unable to run properly inside Docker

v3.5.0

28 Nov 05:12

Choose a tag to compare

新功能

  • 优化程序的生命周期管理,确保工作进程因各种异常退出时,能够被主进程重启
  • 支持配置热重载。rtp2httpd 主进程现在支持以下信号:
    • SIGHUP: 重新加载配置文件、重新拉取 M3U/EPG(不会断开已经连接的客户端)
    • SIGUSR1: 强制重启所有工作进程(会断开所有已经连接的客户端)
  • 对于 OpenWrt,运行后会在 /var/run 下写入 pid 文件,方便用户输入信号
    • 例如:可以通过 kill -HUP $(cat /var/run/rtp2httpd_*.pid) 输入 SIGHUP 触发配置热重载
  • 在状态面板新增"服务控制",目前支持重载配置、重启工作进程、清空日志
image

问题修复

  • 优化网页播放器性能,提升在一些低端设备上的 UI 响应性(例如 LG 电视 📺)
  • OpenWrt LuCI 面板,r2h-token 不再使用密码样式输入框,避免触发一些浏览器的自动填充而用户不知情

v4 展望

此版本预计会是 v3 系列最后一个有新功能的版本,后续在 v3 上只会进行 bugfix,作者精力将会聚焦到 v4 开发。

v4 预计将会带来这些新功能:

  • RTP / RTSP / HTTP / HLS 任意互转(WebSocket / WebRTC 考虑中)
  • 给 OpenWrt 以外的更多平台带来原生插件(爱快、飞牛、Home Assistant 等)
  • 增强对反向代理的支持,解决目前在反代后运行出现的各种问题
  • 跨平台支持(macOS / Windows):考虑到一些人使用 macOS 作为旁路由,还有一些人自己搭建 Windows NAS

敬请期待。


New Features

  • Improved process lifecycle management, ensuring worker processes are restarted by the main process when they exit due to various errors
  • Configuration hot reload support. The rtp2httpd main process now supports the following signals:
    • SIGHUP: reload configuration file and re-fetch M3U/EPG (does not disconnect existing clients)
    • SIGUSR1: force restart all worker processes (disconnects all connected clients)
  • On OpenWrt, a pid file is now written to /var/run after startup for easy signal delivery
    • Example: kill -HUP $(cat /var/run/rtp2httpd_*.pid) to trigger configuration hot reload
  • New "Service Control" section in the status panel, supporting config reload, worker restart, and log clearing

Bug Fixes

  • Improved web player performance, enhancing UI responsiveness on some low-end devices (e.g., LG TVs)
  • OpenWrt LuCI panel: r2h-token no longer uses a password-style input field, preventing some browsers from auto-filling without the user's knowledge

v4 Outlook

This version is expected to be the last v3 release with new features. Future v3 releases will only contain bug fixes as the author focuses on v4 development.

Planned v4 features:

  • Arbitrary conversion between RTP / RTSP / HTTP / HLS (WebSocket / WebRTC under consideration)
  • Native plugins for more platforms beyond OpenWrt (iKuai, fnOS, Home Assistant, etc.)
  • Enhanced reverse proxy support, resolving various issues when running behind a reverse proxy
  • Cross-platform support (macOS / Windows): for those using macOS as a sidecar router or self-hosting Windows NAS

Stay tuned.

如果这个项目对你有帮助,不妨请作者喝一杯咖啡 ☕️

v3.4.0

21 Nov 10:19

Choose a tag to compare

新功能

  • OpenWrt 一键安装脚本:支持手动输入版本号,安装指定版本
  • 网页播放器:
    • 对于支持回看的频道,如果 EPG 没有内容,现在会用 精彩节目 填充
    • 通过 剪裁 mpegts.js,使 rtp2httpd 文件体积更小
    • 全屏时自动关闭侧边栏
    • 在支持的设备上(例如 iOS / macOS Safari),现在可以播放 AC-3 编码音频
    • 优化键盘和遥控器操作体验
      • 对于 LG 电视 webOS,用内置浏览器打开 rtp2httpd 网页播放器,可以算是目前 webOS 上最好的 IPTV 播放体验
      • 目前支持的快捷键如下:
        • 数字键:直接跳转频道号
        • 回车 或 s:打开/关闭侧边栏
        • 空格:播放/暂停
        • 键盘上下方向键、PageUpPageDown、遥控器频道上下键:上下切换频道
        • 键盘左右方向键:调整进度条(对于支持回看的频道)
        • Esc:显示进度条3秒
        • f:切换全屏
        • m:切换静音

问题修复

  • 修复 OpenWrt LuCI UI "自动重启" 选项无效问题
  • 修复 IGMP Membership Report 未带上 Router Alert option 导致部分上游设备无法识别,组播周期重加入无效问题
  • 修复对于特定地区 FCC 服务器(成都移动),无法收到单播流问题

New Features

  • OpenWrt one-click installation script: now supports manually specifying a version number to install a specific version
  • Web player:
    • For channels with catchup support, if EPG has no content, it now fills with a placeholder program
    • Reduced rtp2httpd binary size by trimming mpegts.js
    • Sidebar automatically closes when entering fullscreen
    • AC-3 encoded audio can now be played on supported devices (e.g., iOS / macOS Safari)
    • Improved keyboard and remote control experience
      • For LG TV webOS, opening the rtp2httpd web player in the built-in browser provides arguably the best IPTV playback experience on webOS
      • Currently supported shortcuts:
        • Number keys: jump directly to channel number
        • Enter or s: toggle sidebar
        • Space: play/pause
        • Up/Down arrow keys, PageUp, PageDown, remote channel up/down: switch channels
        • Left/Right arrow keys: adjust progress bar (for channels with catchup support)
        • Esc: show progress bar for 3 seconds
        • f: toggle fullscreen
        • m: toggle mute

Bug Fixes

  • Fixed OpenWrt LuCI UI "Auto Restart" option not working
  • Fixed IGMP Membership Report missing the Router Alert option, causing some upstream devices to fail recognition and periodic multicast rejoin to not work
  • Fixed inability to receive unicast streams from certain regional FCC servers (e.g., Chengdu Mobile)

v3.3.2

19 Nov 14:45

Choose a tag to compare

  • 修复偶发组播无法离开,一直持续接收组播流、持续占用带宽问题
  • 周期性组播重加入现在会同时发出 IGMPv2 和 IGMPv3 Membership Report,解决上游仅支持 IGMPv2 时无法工作问题(此前只发送了 IGMPv3 Membership Report)
  • 网页播放器:修复 M3U 只有 tvg-name 时,在特定 EPG 源下无法找到节目问题

  • Fixed occasional failure to leave a multicast group, causing continuous multicast stream reception and persistent bandwidth usage
  • Periodic multicast rejoin now sends both IGMPv2 and IGMPv3 Membership Reports, resolving issues when the upstream only supports IGMPv2 (previously only IGMPv3 was sent)
  • Web player: fixed program lookup failure when M3U only has tvg-name with certain EPG sources

v3.3.1

13 Nov 10:45

Choose a tag to compare

  • 为了保持兼容,不再对 8027 端口 FCC 服务器都默认使用华为协议交互。现在不指定 fcc-type 默认为电信协议,要使用华为协议必须手动指定 fcc-type=huawei
  • 修复 Docker arm64 / armv7 镜像

  • For backward compatibility, FCC servers on port 8027 no longer default to the Huawei protocol. Without specifying fcc-type, the default is now the China Telecom protocol. To use the Huawei protocol, you must manually specify fcc-type=huawei
  • Fixed Docker arm64 / armv7 images