rtp2httpd

stackiaGPL-2.0活跃维护

把组播 RTP/RTSP 流转换成单播 HTTP,方便在浏览器或播放器里看 IPTV,自带网页播放器、状态面板和快速换台。

Multicast RTP/RTSP to Unicast HTTP stream converter, with built-in web player, status dashboard, fast channel change support, and more!

v3.17.2发布于 2026-10-02 09:34 UTC2,326star +9 / 7 天376fork同步于 2026-11-10 05:43 UTC

怎么上手

README 里没有找到可直接复制的安装命令

README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。

硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v3.17.2
  1. v3.17.2最新正式版2026-10-02 · 2026-10-02 09:34 UTC
    • 修复 DEBUG 日志模式下出现大量 "Checking for shrink opportunity" 问题
    • 网页播放器:
      • 新增 EPG 时间轴 by @CGG888,有节目单的频道将以时间轴替代原有进度条
      • 修复触屏设备上连续点击控制栏时,控制栏可能中途自动隐藏的问题
      • Fancy 风格下移除毛玻璃(背景模糊)效果,降低播放视频时的 GPU 占用

    • Fix excessive "Checking for shrink opportunity" messages in DEBUG log mode
    • Web player:
      • Add an EPG timeline by @CGG888 that replaces the progress bar on channels with guide data
      • Fix the controls auto-hiding midway through a series of taps on touch devices
      • Remove frosted-glass (backdrop blur) effects in the Fancy theme to reduce GPU load during video playback
  2. v3.17.12026-09-11 · 2026-09-11 10:08 UTC
    查看更新说明
    • 网页播放器:修复开启画质增强或去隔行后,播放开始时出现的短暂黑屏
    • OpenWrt:使用安装脚本更新后,若服务原本在运行会自动重启,使新版本立即生效
      • 更新期间正在播放的流可能会短暂中断
    • 安装文档新增 Homebrew 部署说明

    • Web player: fix the brief black flash at playback startup when picture enhancement or deinterlacing is enabled
    • OpenWrt: the installer now restarts a previously running service after an update so the new version takes effect
      • Active playback may disconnect briefly during the update
    • Installation docs now include Homebrew deployment instructions
  3. v3.17.02026-09-09 · 2026-09-09 09:55 UTC
    查看更新说明

    这是一个聚焦于性能优化的版本,组播转发、网页播放器的性能都得到了大幅改进。

    新功能

    • 大幅优化组播转发性能:多个客户端并发观看同一频道时,CPU 占用降低 60%–80%,内存占用降低 80%
      • 性能测试表明,rtp2httpd 在所有已测试场景中的 CPU 和内存占用均低于 msd_lite
    • 网页播放器:改善启动加载速度,EPG 在后台线程解析,大型节目单不再造成启动界面和视频画面卡顿
    • 网页播放器:降低 CPU 占用并改善画质增强效果,噪点进一步降低
    • 网页播放器:当前频道的节目标题过长时自动滚动显示
    • 网页播放器:鼠标中键点击频道或节目,即可复制可直接请求的 HTTP 媒体直链
      • 便于用 FFmpeg、N_m3u8DL-RE、IDM 等下载,或在其他播放器中打开
    • 状态页强制断开连接后,会短暂拦截该客户端 IP(约 5 秒),避免播放器立刻重连
    • OpenWrt:新增 powerpc_464fp 架构软件包(如 apm821xx 设备)
    • 安装文档新增 systemd 服务单元示例

    问题修复

    • M3U 播放列表:支持单个 #EXTINF 下的多个播放地址,避免遗漏后续地址
    • HTTP 代理现在遇到 302 Location 时会改写 rtsp://、rtp://、udp:// 开头的 URL,使播放器可继续通过 rtp2httpd 拉流
    • 网页播放器:回看切片按 EPG 节目边界切分,避免一次请求跨越多个节目,以提升对特定运营商的兼容性
    • 网页播放器:在 iOS / iPadOS 主屏幕 PWA 中隐藏画中画按钮(该环境下画中画无效)
    • RTSP:服务端关闭连接时不再丢失最后一段交错传输的媒体数据

    This release focuses on performance: multicast forwarding and the web player are both substantially faster.

    New Features

    • Significantly improve multicast forwarding performance: reduce CPU usage by 60–80% and memory usage by 80% when multiple clients watch the same channel concurrently
      • Performance tests show that rtp2httpd uses less CPU and memory than msd_lite across all tested scenarios
    • Web player: faster startup — EPG is parsed off the main thread, so large programme guides no longer freeze the startup overlay or video
    • Web player: lower CPU usage and better enhancement quality, with further noise reduction
    • Web player: automatically scroll overflowing programme titles for the current channel
    • Web player: middle-click a channel or programme to copy a directly requestable HTTP media URL
      • Useful for downloading with FFmpeg, N_m3u8DL-RE, IDM, or opening in another player
    • Force-disconnect on the status page now briefly blocks that client IP (about 5 seconds) so the player cannot reconnect immediately
    • OpenWrt: add packages for the powerpc_464fp architecture (for example apm821xx devices)
    • Installation docs now include a systemd service unit example

    Bug Fixes

    • M3U playlists: support multiple playback URLs under a single #EXTINF so subsequent URLs are no longer omitted
    • HTTP proxy now rewrites 302 Location URLs that start with rtsp://, rtp://, or udp://, so players can keep pulling through rtp2httpd
    • Web player: catch-up segments now split on EPG programme boundaries, so a single request no longer spans multiple shows, improving compatibility with certain ISPs
    • Web player: hide the Picture-in-Picture button in iOS / iPadOS home-screen PWAs (PiP is a no-op there)
    • RTSP: no longer drop the last interleaved media when the server closes the connection
  4. v3.17.0-beta.1pre-release2026-09-06 · 2026-09-06 17:38 UTC
    查看更新说明

    新功能

    • 大幅优化组播转发性能:多个客户端并发观看同一频道时,CPU 占用降低 60%–80%,内存占用降低 80%
      • 性能测试表明,rtp2httpd 在所有已测试场景中的 CPU 和内存占用均低于 msd_lite
    • 网页播放器:改善启动加载速度,EPG 在后台线程解析,大型节目单不再造成启动界面和视频画面卡顿
    • 网页播放器:当前频道的节目标题过长时自动滚动显示
    • 网页播放器:鼠标中键点击频道或节目,即可复制可直接请求的 HTTP 媒体直链
      • 便于用 FFmpeg、N_m3u8DL-RE、IDM 等下载,或在其他播放器中打开
    • 状态页强制断开连接后,会短暂拦截该客户端 IP(约 5 秒),避免播放器立刻重连
    • 安装文档新增 systemd 服务单元示例

    问题修复

    • M3U 播放列表:支持单个 #EXTINF 下的多个播放地址,避免遗漏后续地址
    • HTTP 代理现在遇到 302 Location 时会改写 rtsp://、rtp://、udp:// 开头的 URL,使播放器可继续通过 rtp2httpd 拉流
    • 网页播放器:回看切片按 EPG 节目边界切分,避免一次请求跨越多个节目,以提升对特定运营商的兼容性
    • 网页播放器:在 iOS / iPadOS 主屏幕 PWA 中隐藏画中画按钮(该环境下画中画无效)

    New Features

    • Significantly improve multicast forwarding performance: reduce CPU usage by 60–80% and memory usage by 80% when multiple clients watch the same channel concurrently
      • Performance tests show that rtp2httpd uses less CPU and memory than msd_lite across all tested scenarios
    • Web player: faster startup — EPG is parsed off the main thread, so large programme guides no longer freeze the startup overlay or video
    • Web player: automatically scroll overflowing programme titles for the current channel
    • Web player: middle-click a channel or programme to copy a directly requestable HTTP media URL
      • Useful for downloading with FFmpeg, N_m3u8DL-RE, IDM, or opening in another player
    • Force-disconnect on the status page now briefly blocks that client IP (about 5 seconds) so the player cannot reconnect immediately
    • Installation docs now include a systemd service unit example

    Bug Fixes

    • M3U playlists: support multiple playback URLs under a single #EXTINF so subsequent URLs are no longer omitted
    • HTTP proxy now rewrites 302 Location URLs that start with rtsp://, rtp://, or udp://, so players can keep pulling through rtp2httpd
    • Web player: catch-up segments now split on EPG programme boundaries, so a single request no longer spans multiple shows, improving compatibility with certain ISPs
    • Web player: hide the Picture-in-Picture button in iOS / iPadOS home-screen PWAs (PiP is a no-op there)
  5. v3.17.0-beta.0pre-release2026-09-02 · 2026-09-02 12:33 UTC
    查看更新说明

    新功能

    • 网页播放器:鼠标中键点击频道或节目,即可复制可直接请求的 HTTP 媒体直链
      • 便于用 FFmpeg、N_m3u8DL-RE、IDM 等下载,或在其他播放器中打开
    • 状态页强制断开连接后,会短暂拦截该客户端 IP(约 5 秒),避免播放器立刻重连
    • 安装文档新增 systemd 服务单元示例

    问题修复

    • HTTP 代理现在遇到 302 Location 时会改写 rtsp://、rtp://、udp:// 开头的 URL,使播放器可继续通过 rtp2httpd 拉流
    • 网页播放器:改善启动加载速度,EPG 在后台线程解析,大型节目单不再造成启动界面和视频画面卡顿
    • 网页播放器:回看切片按 EPG 节目边界切分,避免一次请求跨越多个节目,以提升对特定运营商的兼容性
    • 网页播放器:在 iOS / iPadOS 主屏幕 PWA 中隐藏画中画按钮(该环境下画中画无效)

    New Features

    • Web player: middle-click a channel or programme to copy a directly requestable HTTP media URL
      • Useful for downloading with FFmpeg, N_m3u8DL-RE, IDM, or opening in another player
    • Force-disconnect on the status page now briefly blocks that client IP (about 5 seconds) so the player cannot reconnect immediately
    • Installation docs now include a systemd service unit example

    Bug Fixes

    • HTTP proxy now rewrites 302 Location URLs that start with rtsp://, rtp://, or udp://, so players can keep pulling through rtp2httpd
    • Web player: faster startup — EPG is parsed off the main thread, so large programme guides no longer freeze the startup overlay or video
    • Web player: catch-up segments now split on EPG programme boundaries, so a single request no longer spans multiple shows, improving compatibility with certain ISPs
    • Web player: hide the Picture-in-Picture button in iOS / iPadOS home-screen PWAs (PiP is a no-op there)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    rtp2httpd - IPTV 流媒体转发服务器

    >> 访问官方文档网站 <<

    >> English Documentation <<

    rtp2httpd 是一个 IPTV 转发服务器,支持将组播 RTP/UDP、RTSP 转换为 HTTP 流,或将 HLS 流从内网代理到外网。

    本项目专为中国大陆 IPTV 环境进行优化,实现了运营商级的 FCC(Fast Channel Change)快速换台协议,可作为 udpxy 和 msd_lite 的无缝替代,为 IPTV 用户提供接近原生机顶盒的观看体验。

    ✨ 核心功能特性

    📡 多协议支持

    • RTP->HTTP:将组播 RTP/UDP 流转换为标准 HTTP 流
    • RTSP->HTTP:RTSP 转为 HTTP 视频流,完整支持 RTSP/RTP 协议栈,支持 UDP NAT 穿透 (STUN)
      • 可以实现 IPTV RTSP 时移源的回看
    • HTTP->HTTP:实现了完整反向代理,可以将 IPTV 内网 HLS 源代理到局域网、公网,方便观看
    • udpxy 兼容性:完全兼容 udpxy URL 格式
    • M3U 播放列表集成:支持 M3U/M3U8 格式,自动识别并转换节目地址,提供标准化的播放列表
      • 支持外部 M3U URL
      • 智能识别 RTP/RTSP URL 并转换为 HTTP 代理格式
      • 自动处理 catchup-source 时移回看地址
      • 通过 http://<server:port>/playlist.m3u 访问转换后的播放列表
    • 抗丢包抗抖动:支持乱序恢复、FEC 前向纠错技术,保证播放质量
      • 自动纠正乱序到达的 RTP 包,消除网络抖动导致的花屏
      • 支持 Reed-Solomon FEC 冗余恢复,可抵抗轻度丢包(需组播上游支持 FEC)
    • 频道快照:支持通过 HTTP 请求快速获取频道的快照图片,降低播放端解码压力

    ⚡ FCC 快速换台技术

    • 支持运营商 FCC 协议:搭配运营商 FCC 服务器,实现毫秒级换台响应,媲美原生 IPTV 机顶盒
    • 快速解码:FCC 保证了换台时迅速提供 IDR 帧,可供播放器立即解码

    📊 实时状态监控

    • Web 状态页面:通过浏览器访问 http://<server:port>/status 查看实时运行状态
    • 客户端连接统计:显示每个连接的 IP、状态、带宽使用、传输数据量
    • 系统日志查看:实时查看服务器日志,支持动态调整日志级别
    • 远程管理功能:通过 Web 界面强制断开客户端连接

    🎬 内置播放器

    • 浏览器直接使用:内置基于 Web 的现代化播放器界面,可以在浏览器直接打开播放,桌面/移动端 UI 自适应
    • 快速起播:搭配 FCC 可实现快速起播、快速换台
    • 支持时移和回看:支持 EPG 电子节目单,支持时移和回看(需要有 RTSP 回看源)
    • 零开销:纯 Web 前端实现,对 rtp2httpd 运行几乎没有资源占用(无解码转码开销)
    • 画质增强:支持自动反交错、AMD FSR 1 超分辨率技术,优化 576i / 1080i 在现代 2K/4K 屏幕上的表现

    🚀 高性能优化

    • 非阻塞 IO 模型:使用 epoll 事件驱动,高效处理大量并发连接
    • 多核优化:支持多 worker 进程,充分利用多核 CPU 提高最大吞吐量
    • 缓冲池优化:预分配缓冲池,避免频繁内存分配,多客户端根据负载动态共享,避免慢客户端吃满资源
    • 同源复用:同一工作进程内共享组播订阅、RTP 处理和批量缓冲,减少多客户端重复工作
    • 轻量化:使用纯 C 语言编写,零依赖,小巧简洁,适合运行在各种嵌入式设备上(路由器、光猫、NAS 等)
      • 程序大小仅 509KB (x86_64),并内置了 Web 播放器所有前端资源
    • 查看 性能测试报告(与 msd_lite、udpxy、tvgate 的性能对比)

    📹 演示效果

    快速换台 + 时移回看

    https://github.com/user-attachments/assets/ca1a332f-d6e7-4a1e-be88-92bef67758b3

    [!TIP] 快速换台需要使用针对 IPTV 优化的播放器,例如 mytv-android / TiviMate / Cloud Stream 等(视频中的播放器是 mytv-android)。 常见普通播放器,例如 PotPlayer / IINA 等,没有专门优化起播速度,FCC 效果不明显。

    内置播放器

    https://github.com/user-attachments/assets/d3dab0c0-03c4-453b-86ae-85406e5208eb

    [!TIP] 需要配置 M3U 播放列表后使用,通过浏览器访问 http://<server:port>/player 即可打开。 受限于浏览器解码能力,一些频道可能不支持(表现为无音频、画面黑屏)。

    实时状态监控

    25 条 1080p 组播流同时播放

    https://github.com/user-attachments/assets/9d531ab6-6c35-4c50-802a-71f88b6b22c5

    [!NOTE] 单流码率 8 Mbps。总仅占用 25% CPU 单核 (i3-N305),消耗 4MB 内存。

    📖 文档

    如果是首次搭建 IPTV 组播转发服务,对相关网络知识比较陌生(DHCP 鉴权、路由、组播、防火墙),推荐先看 搭建教程。

    📄 开源许可

    本项目基于 GNU General Public License v2.0 开源协议发布。这意味着:

    • ✅ 可以部署在商业环境中(如企业内部使用)
    • ✅ 可以基于它提供收费的 IPTV 转码服务
    • ✅ 可以在有偿 IPTV 咨询服务中使用本软件
    • ✅ 可以销售包含此软件的硬件设备
    • ⚠️ 如果修改代码,必须公开修改后的源代码
    • ⚠️ 如果分发二进制文件,必须同时提供源代码
    • ⚠️ 不能将其闭源后再销售

    🙏 致谢

    • 原始项目 oskar456/rtp2httpd 的开发者们
    • 愿意在互联网上公开 FCC 协议细节的业内人士
    • 所有测试和反馈用户