rtp2httpd

rtp2httpd

rtp2httpd is a multimedia stream forwarding server designed specifically for the IPTV environment in mainland China.

1,724GitHub
Description

rtp2httpd is a multimedia stream forwarding server designed specifically for the IPTV environment in mainland China. rtp2httpd supports converting multicast RTP/UDP streams and RTSP streams into HTTP unicast streams. It implements carrier‑grade FCC (Fast Channel Change) fast zapping protocol, and can be used as a seamless replacement for udpxy and msd_lite, providing IPTV users with a viewing experience close to that of native set‑top boxes. Core Features 📡 Multi‑protocol support RTP → HTTP: Convert multicast RTP/UDP streams into standard HTTP streams RTSP → HTTP: Convert RTSP to HTTP video streams, with full RTSP/RTP protocol stack support and UDP NAT traversal (STUN) Can be used for IPTV RTSP time‑shift sources (catch‑up/rewind) HTTP → HTTP: Full reverse proxy capability; can proxy internal IPTV HLS sources to LAN or the public Internet for convenient viewing udpxy compatibility: Fully compatible with udpxy URL formats M3U playlist integration: Supports M3U/M3U8 formats, automatically recognizes and converts channel URLs, and provides standardized playlists Supports external M3U URLs Intelligently recognizes RTP/RTSP URLs and converts them to HTTP proxy format Automatically handles catchup-source time‑shift replay URLs Access the converted playlist via: http://server:port/playlist.m3u Packet‑loss and jitter resistance: Supports out‑of‑order recovery and FEC forward error correction to ensure playback quality Automatically fixes out‑of‑order RTP packets and eliminates artifacts caused by network jitter Supports Reed‑Solomon FEC‑based redundancy recovery, tolerating light packet loss (requires multicast upstream FEC support) Channel snapshots: Supports quickly obtaining channel snapshot images via HTTP requests to reduce decoding pressure on clients ⚡ FCC Fast Channel Change Technology Operator FCC protocol: Works with carrier FCC servers to achieve millisecond‑level channel zapping, comparable to native IPTV set‑top boxes Fast decoding: FCC ensures IDR frames are quickly provided during channel switching, allowing the player to start decoding immediately 📊 Real‑time Status Monitoring Web status page: Visit http://server:port/status in a browser to view real‑time running status Client connection statistics: Display each connection’s IP, status, bandwidth usage, and total transferred data System log viewing: View server logs in real time and dynamically adjust log levels Remote management: Forcefully disconnect client connections via the Web interface 🎬 Built‑in Player Browser‑based usage: Built‑in modern Web‑based player UI; can be opened directly in a browser with responsive desktop/mobile layout Fast startup: Combined with FCC, enables fast startup and fast channel switching Time‑shift and catch‑up: Supports EPG (Electronic Program Guide), time‑shift, and catch‑up (requires RTSP catch‑up source) Zero overhead: Pure Web front‑end implementation; almost no resource usage on rtp2httpd itself (no decoding/transcoding overhead) 🚀 High‑performance Optimizations Non‑blocking I/O: Uses epoll event‑driven model to efficiently handle large numbers of concurrent connections Multi‑core optimization: Supports multiple worker processes to fully utilize multi‑core CPUs and maximize throughput Buffer pool optimization: Pre‑allocates buffer pools to avoid frequent memory allocations; multiple clients dynamically share buffers based on load to prevent slow clients from exhausting resources Zero‑copy: Supports Linux MSG_ZEROCOPY to avoid copying data between user space and kernel space Lightweight: Implemented in pure C with zero external dependencies; small and simple, suitable for various embedded devices (routers, ONTs, NAS, etc.) Binary size is only about 340 KB (x86_64) and includes all front‑end resources for the Web player Prerequisites Before Installing This Application You must first set up an IPTV multicast forwarding service or configure your optical modem’s IPTV port to be bridged/fused into the local network. IPTV multicast forwarding service setup tutorial: https://rtp2httpd.com/reference/related-resources#iptv-%E6%90%AD%E5%BB%BA%E6%95%99%E7%A8%8B Official documentation: https://rtp2httpd.com/ Required Steps Before Installing This Application This application uses a network interface named iptv. You must perform some preparatory steps so that an interface named iptv exists; otherwise the application will fail to start. I. Method for setups based on the “LazyCat” VLAN (VLAN ID: 45) Enable the micro‑service sshd and log in. mkdir -p ~/.config/systemd/user/ vlanid=45 Create the systemd user service: cat <<EOF > ~/.config/systemd/user/iptv.service [Unit] Description=create iptv interface After=network.target [Service] Type=oneshot ExecStart=sh -c 'ip link add link enp2s0 name iptv type vlan id $vlanid && ip link set dev iptv up' [Install] WantedBy=default.target EOF systemctl --user enable iptv.service systemctl --user start iptv.service ip a | grep iptv@enp2s0 II. Method for setups based on a USB NIC mkdir -p ~/.config/systemd/user/ ip a | grep -A3 enx # check MAC address Create the trigger script: cat <<'EOF' > /root/.config/systemd/user/usb-iptv-trigger.sh #!/bin/bash echo " [Match] MACAddress=00:00:aa:00:16:19 [Link] Name=iptv NamePolicy=kernel " > /etc/systemd/network/72-iptv.link /usr/bin/udevadm control --reload /usr/bin/systemctl restart systemd-udevd for dev in /sys/class/net/*; do if /usr/bin/udevadm info "$dev" | grep -q "ID_BUS=usb"; then name=$(basename "$dev") echo "Triggering udev for USB NIC: $name" /usr/bin/udevadm trigger --action=add $dev fi done EOF chmod +x ~/.config/systemd/user/usb-iptv-trigger.sh 查看全部 Create the systemd user service: cat <<EOF > /root/.config/systemd/user/usb-iptv.service [Unit] Description=Create IPTV udev rule and reload for USB NICs After=network-pre.target DefaultDependencies=no [Service] Type=oneshot RemainAfterExit=yes ExecStart=/root/.config/systemd/user/usb-iptv-trigger.sh [Install] WantedBy=default.target EOF systemctl --user enable usb-iptv.service systemctl --user start usb-iptv.service How to Use rtp2httpd for Other Devices in the LAN After Installation For Apple TV or TVs, use the “LAN disconnection mapping tool” (local port mapping tool) to map a port to the application’s port 5140. Application Deployment Parameter Notes If an IGMP proxy is already configured, you do not need to enable PPPoE dialing. If you are directly using the IPTV VLAN passthrough, you must enable PPPoE and configure the IPTV account and password. If PPPoE dialing is enabled, it is recommended to set the MAC address to be the same as the TV set‑top box’s MAC address; if you do not need this, leave it empty.

Screenshots
Screenshot 1
Screenshot 2
Mobile Screenshots
Mobile Screenshot 1
Mobile Screenshot 2
Mobile Screenshot 3
App Information
Version
3.11.0
Package Size
178.06 MB
Updated
May 11, 2026
Source Code
stackia
Platform Support
PCMobile
Keywords
rtp2httpdudpxymsd_liteiptvFCCRTP