forked from stackia/rtp2httpd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtp2httpd.conf
More file actions
151 lines (120 loc) · 5.98 KB
/
rtp2httpd.conf
File metadata and controls
151 lines (120 loc) · 5.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#RTP2HTTPD Config file
# All blank lines and lines starting with # or ; are ignored
[global]
#GLOBAL OPTIONS
#These options can be overrided by command-line switches
#VERBOSITY: 0-quiet 1-error 2-warn 3-info 4-debug (default 1)
verbosity = 1
#maximum paralell clients (default 5)
;maxclients = 5
# UDPxy URL compatibility (default yes)
;udpxy = yes
# Worker processes (default 1)
;workers = 1
# Hostname to check in the Host: HTTP header (default none)
;hostname = somehost.example.com
# When enabled, uses HTTP X-Forwarded-For header as client address for status page display (default: no)
# Only enable when running behind a reverse proxy
;xff = no
# Authentication token for HTTP requests (default none)
# When set, all HTTP requests must include r2h-token query parameter with matching value
;r2h-token = your-secret-token-here
# Status page path (default: /status)
;status-page-path = /status
# Player page path (default: /player)
;player-page-path = /player
# Interface configuration for upstream media streams
# Default interface for all upstream traffic (lowest priority, used when specific interface not set)
;upstream-interface = iptv
# Specific interfaces (override upstream-interface when set)
# Interface for multicast (RTP/UDP) traffic
;upstream-interface-multicast = iptv
# Interface for FCC unicast traffic
;upstream-interface-fcc = iptv
# Interface for RTSP unicast traffic
;upstream-interface-rtsp = iptv
# Interface for HTTP proxy traffic
;upstream-interface-http = iptv
# Priority: upstream-interface-{multicast,fcc,rtsp,http} > upstream-interface > routing table
# External M3U Configuration
# Fetch M3U playlist from a URL (file://, http://, https:// supported)
# Note: HTTP/HTTPS fetching requires 'curl' command to be installed
;external-m3u = https://example.com/playlist.m3u
# or use a local file
;external-m3u = file:///path/to/playlist.m3u
# External M3U update interval in seconds (default 7200 = 2 hours)
# Set to 0 to disable automatic updates, or a positive value for custom interval
;external-m3u-update-interval = 7200
# Multicast rejoin interval in seconds (default 0, disabled)
# Set to a positive value (e.g., 60) to periodically rejoin multicast groups
# This is a compatibility workaround for networks with:
# - IGMP snooping switches that timeout without proper IGMP Query from router
# - Misconfigured network equipment that drops multicast membership
# Recommended value: 30-120 seconds (less than typical switch timeout of 260s)
# Only enable if you experience multicast stream interruptions
;mcast-rejoin-interval = 0
# Local UDP port range for FCC client sockets (format: start-end, default random ports)
;fcc-listen-port-range = 40000-40100
# Maximum number of buffers in buffer pool (default 16384)
# Each buffer is 1536 bytes, so 16384 buffers = 24MB memory
# Increase this value to improve throughput for multi-client concurrency
;buffer-pool-max-size = 16384
# UDP socket receive buffer size in bytes (default 524288 = 512KB)
# Applies to multicast, FCC, and RTSP RTP/RTCP sockets.
# For 4K IPTV streams at ~30 Mbps, 512KB provides ~140ms of buffering.
# Increase to reduce packet loss on high-bandwidth streams.
# The actual buffer size may be limited by kernel parameter net.core.rmem_max.
;udp-rcvbuf-size = 524288
# Enable zero-copy send with MSG_ZEROCOPY (default: no)
# Set to 1, yes, true, or on to enable zero-copy for better performance
# Zero-copy requires kernel 4.14+ with MSG_ZEROCOPY support
# On supported devices, enabling this can improve throughput and reduce CPU usage
# Not recommended when running behind reverse proxies like Nginx/Caddy/Lucky
;zerocopy-on-send = no
# Override User-Agent header for upstream HTTP proxy requests (default: disabled)
# When set, this value replaces the client User-Agent header sent to upstream /http/ targets
;http-proxy-user-agent = rtp2httpd-http-proxy/1.0
# User-Agent header used for upstream RTSP requests (default: rtp2httpd/<version>)
;rtsp-user-agent = rtp2httpd/custom
# STUN server for RTSP NAT traversal (default: disabled)
# When RTSP server only supports UDP transport and client is behind NAT,
# try using STUN for NAT traversal (may not always succeed)
# Format: host:port or host (default port 3478)
# Example: stun.miwifi.com or stun.miwifi.com:3478
;rtsp-stun-server = stun.miwifi.com
# CORS cross-origin request configuration (default: disabled)
# When set, enables CORS and automatically handles OPTIONS preflight requests
# Set to * to allow all origins, or specify a domain (e.g., https://example.com)
;cors-allow-origin = *
# Enable video snapshot feature (default: no)
# Set to 1, yes, true, or on to enable; otherwise 0 (disabled)
# When enabled, allows clients to request video snapshots with `snapshot=1` query parameter
;video-snapshot = no
# FFmpeg executable path (default: ffmpeg, which uses system PATH)
# Specify full path if ffmpeg is not in PATH or you want to use a specific version
;ffmpeg-path = /usr/bin/ffmpeg
# Additional FFmpeg arguments (default: -hwaccel none)
# These arguments are passed to ffmpeg when generating snapshots
# Common options: -hwaccel none, -hwaccel auto, -hwaccel vaapi, -hwaccel qsv
;ffmpeg-args = -hwaccel none
[bind]
#List of address and ports to bind to, eg.
;mybox.example.net 5140
;mybox2.example.net 8000
;2001::1 http-alt
#Note that binding to port number < 1024 will
#require root privelegies and therefore is
#not recommended. (Dropping privilegies is
#not implemeted at this moment)
#below is default - all addresses, port 5140
* 5140
[services]
# Instead of using external-m3u, you can also write M3U content directly below, starting with #EXTM3U header
# Example:
;#EXTM3U x-tvg-url="https://example.com/epg.xml.gz"
;#EXTINF:-1 tvg-id="CCTV1" tvg-name="CCTV1" tvg-logo="https://example.com/logo/CCTV1.png" group-title="央视" catchup="default" catchup-source="rtsp://10.0.0.50:554/catchup?playseek={utc:YmdHMS}-{utcend:YmdHMS}",CCTV-1
;rtp://239.253.64.120:5140
;#EXTINF:-1 tvg-id="CCTV2" tvg-name="CCTV2" group-title="央视",CCTV-2
;rtp://239.253.64.121:5140
;#EXTINF:-1,广东卫视
;rtp://239.194.10.15:1234