README.md
1<a href="https://scan.coverity.com/projects/minisatip2">
2 <img alt="Coverity Scan Build Status"
3 src="https://scan.coverity.com/projects/23090/badge.svg"/>
4</a>
5
6# Welcome to Minisatip
7
8Minisatip is a multi-threaded satip server version 1.2 that runs under Linux and it was tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC and ISDB-T cards. More details about supported hardware: https://github.com/catalinii/minisatip/blob/master/Supported_Hardware.md
9
10The protocol specification can be found at:
11http://satip.info/sites/satip/files/resource/satip_specification_version_1_2_2.pdf
12It is very lightweight (designed for embedded systems with memory and processing constrains), does not need any additional libraries for basic functionality and can be used by existing satip clients like: Tvheadend, DVBViewer, vdr, VideoLAN or Android/iOS applications. Minisatip can act as a satip client as well in order to connect to satip servers from different networks.
13
14The application is designed to stream the requested data to multiple clients (even with one dvb card) in the same time while opening different pids.
15
16It is tested on x86_64, x86, ARM and MIPS platforms and it requires DVBAPI 5. Supported protocols are RTSP (both tcp and udp), HTTP (port 8080) and SSDP (as specified in the SAT>IP documentation). On top of that, it supports dvbapi protocol implemented by oscam (requires dvbcsa library) to decrypt channels using an official subscription and support dvbca protocol (requires dvben50221 library) for dvb cards with CA hardware. In order to enable/disable features, please edit the Makefile.
17
18The application shows also a status page by default at the address: http://IP:8080
19The latest binaries for embedded platforms: https://minisatip.org/forum/viewtopic.php?f=5&t=371
20
21Contact
22-------
23Please use https://minisatip.org/forum/ for any question or join slack: https://join.slack.com/t/minisatip/shared_invite/zt-rms717g0-SQR25SFs8RH9JlVZV4II7A
24
25In order to speed up the investigation of an issue, please provide the full log and a link to the application that is not working.
26
27If you like minisatip and you want to support the development of the project please make a donation:
28https://paypal.me/minisatip
29
30Usage:
31-------
32
33minisatip version v1.1.8-24d77e4, compiled in Jun 15 2021 20:36:32, with s2api version: 050B
34
35 ./minisatip [-[fgtzE]] [-a x:y:z] [-b X:Y] [-B X] [-H X:Y] [-d A:C-U ] [-D device_id] [-e X-Y,Z] [-i prio]
36 [-[uj] A1:S1-F1[-PIN]] [-m mac] [-P port] [-l module1[,module2]] [-v module1[,module2]][-o oscam_host:dvbapi_port,offset] [-p public_host] [-r remote_rtp_host] [-R document_root] [-s [*][DELSYS:][FE_ID@][source_ip/]host[:port] [-u A1:S1-F1[-PIN]] [-L A1:low-high-switch] [-w http_server[:port]]
37 [-x http_port] [-X xml_path] [-y rtsp_port] [-I name_service]
38
39Help
40-------
41
42* -4 : Force TCP sockets to use IPv6
43
44* -a --adapters x:y:z simulate x DVB-S2, y DVB-T2 and z DVB-C adapters on this box (0 means auto-detect)
45 * eg: -a 1:2:3
46 - it will report 1 dvb-s2 device, 2 dvb-t2 devices and 3 dvb-c devices
47
48* -G --disable-ssdp disable SSDP announcement
49
50* -b --buffer X:Y : set the app adapter buffer to X Bytes (default: 376000) and set the kernel DVB buffer to Y Bytes (default: 5775360) - both multiple of 188
51 * eg: -b 18800:18988
52
53* -B X : set the app socket write buffer to X KB.
54 * eg: -B 10000 - to set the socket buffer to 10MB
55
56* -d --diseqc ADAPTER1:COMMITTED1-UNCOMMITTED1[,ADAPTER2:COMMITTED2-UNCOMMITTED2[,...]
57 * The first argument is the adapter number, second is the number of committed packets to send to a Diseqc 1.0 switch, third the number of uncommitted commands to sent to a Diseqc 1.1 switch
58 The higher number between the committed and uncommitted will be sent first.
59 * eg: -d 0:1-0 (which is the default for each adapter).
60 - note: * as adapter means apply to all adapters
61 - note: * before committed number enables fast-switch (only voltage/tone)
62 - note: @ before committed number sets 'Any Device' diseqc address (0x00)
63 - note: . before committed number sets 'LNB' diseqc address (0x11)
64
65* -q --diseqc-timing ADAPTER1:BEFORE_CMD1-AFTER_CMD1-AFTER_REPEATED_CMD1-AFTER_SWITCH1-AFTER_BURST1-AFTER_TONE1[,...]
66 * All timing values are in ms, default adapter values are: 15-54-15-15-15-0
67 - note: * as adapter means apply to all adapters
68
69* -D --device-id DVC_ID: specify the device id (in case there are multiple SAT>IP servers in the network)
70 * eg: -D 4
71
72* -0 --diseqc-multi ADAPTER1:DISEQC_POSITION[,...]
73 * Send diseqc to selected position before other position is set.
74 - note: * as adapter means apply to all adapters
75
76* -E Allows encrypted stream to be sent to the client even if the decrypting is unsuccessful
77 - note: when pids=all is emulated this pass NULLs too
78
79* -Y --delsys ADAPTER1:DELIVERY_SYSTEM1[,ADAPTER2:DELIVERY_SYSTEM2[,..]] - specify the delivery system of the adapters (0 is the first adapter)
80 * eg: --delsys 0:dvbt,1:dvbs
81 - specifies adapter 0 as a DVBT device, adapter 1 as DVB-S, which overrides the system detection of the adapter
82
83* -e --enable-adapters list_of_enabled adapters: enable only specified adapters
84 * eg: -e 0-2,5,7 (no spaces between parameters)
85 - keep in mind that the first adapters are the local ones starting with 0 after that are the satip adapters
86 if you have 3 local dvb cards 0-2 will be the local adapters, 3,4, ... will be the satip servers specified with argument -s
87
88* -f foreground: otherwise run in background
89
90* -F --logfile log_file: output the debug/log information to log_file when running in background (option -f not used), default /tmp/minisatip.log
91
92* -g --syslog: use syslog instead stdout for logging, multiple -g - print to stderr as well
93
94* -H --threshold X:Y : set the write time threshold to X (UDP) / Y (TCP) milliseconds.
95 * eg: -H 5:50 - set thresholds to 5ms (UDP) and 50ms (TCP)
96
97* -I --name-app specificies an alternative Service Name
98
99* -i --priority prio: set the DVR thread priority to prio
100
101* -k Emulate pids=all when the hardware does not support it, on enigma boxes is enabled by default
102
103* -l specifies the modules comma separated that will have increased verbosity,
104 logging to stdout in foreground mode or in /tmp/minisatip.log when a daemon
105 Possible modules: general,http,socketworks,stream,adapter,satipc,pmt,tables,dvbapi,lock,netceiver,ca,axe,socket,utils,dmx,ssdp,dvb
106 * eg: -l http,pmt
107
108* -v specifies the modules comma separated that will have increased debug level (more verbose than -l),
109 * eg: -v http,pmt
110
111* -L --lnb specifies the adapter and LNB parameters (low, high and switch frequency)
112 * eg: -L *:9750-10600-11700 - sets all the adapters to use Universal LNB parameters (default)
113 * eg: -L *:10750-10750-10750 - sets the parameters for Sky NZ LNB using 10750 Mhz
114 * eg: -L 0:10750-10750-10750,1:9750-10600-11700 - adapter 0 has a SKY NZ LNB, adapter 1 has an Universal LNB
115
116* -m --mac xx: simulate xx as local mac address, generates UUID based on mac
117 * eg: -m 001122334455
118
119* -M --multiplier: multiplies the strength and snr of the DVB adapter with the specified values
120 * If the snr or the strength multipliers are set to 0, minisatip will override the value received from the adapter and will report always full signal 100%
121 * eg: -M 4-6:1.2-1.3 - multiplies the strength with 1.2 and the snr with 1.3 for adapter 4, 5 and 6
122 * eg: -M *:1.5-1.6 - multiplies the strength with 1.5 and the snr with 1.6 for all adapters
123
124* -N --disable-dvb disable DVB adapter detection
125
126* -Z --adapter-timeout ADAPTER1,ADAPTER2-ADAPTER4[,..]:TIMEOUT - specify the timeout for the adapters (0 enabled infinite timeout)
127 eg: --adapter-timeout 1-2:30
128 - sets the timeouts for adapter 1 and 2 to 30 seconds
129 --adapter-timeout *:0
130 - turns off power management for all adapters (recommended instead of --adapter-timeout 0-32:0)
131 - required for some Unicable LNBs
132
133* -o --dvbapi host:port - specify the hostname and port for the dvbapi server (oscam). Port 9000 is set by default (if not specified)
134 * eg: -o 192.168.9.9:9000
135 192.168.9.9 is the host where oscam is running and 9000 is the port configured in dvbapi section in oscam.conf.
136 * eg: -o /tmp/camd.socket
137 /tmp/camd.socket is the local socket that can be used
138
139* -p --playlist url: specify playlist url using X_SATIPM3U header
140 * eg: -p http://192.168.2.3:8080/playlist
141 - this will add X_SATIPM3U tag into the satip description xml
142
143* -P port: use port number to listen for UDP socket in the RTP communication. port + 1000 will be used to listen by the sat>ip client (option -s)
144 * eg: -P 5500 (default): will use for the sat>ip server 5500 + 2*A and 5500 + 2*A + 1, where A is the adapter number.
145 6500 + 2*A and 6500 + 2*A + 1 - will be used by the sat>ip client
146
147* -r --remote-rtp remote_rtp_host: send the rtp stream to remote_rtp_host instead of the ip the connection comes from
148 * eg: -r 192.168.7.9
149
150* -R --document-root directory: document root for the minisatip web page and images
151
152* -s --satip-servers [~][*][DELSYS:][FE_ID@][source_ip/]host[:port] - specify the remote satip host and port with delivery system DELSYS, it is possible to use multiple -s
153 * ~ When using this symbol at start the `pids=all` call is replaced with `pids=0-20`
154 * - Use TCP if -O is not specified and UDP if -O is specified
155 DELSYS - can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, isdbt, atsc, dvbcb ( - DVBC_ANNEX_B ) [default: dvbs2]
156 host - the server of the satip server
157 port - rtsp port for the satip server [default: 554]
158 FE_ID - will be determined automatically
159 eg: -s 192.168.1.2 -s dvbt:192.168.1.3:554 -s dvbc:192.168.1.4
160 - specifies 1 dvbs2 (and dvbs)satip server with address 192.168.1.2:554
161 - specifies 1 dvbt satip server with address 192.168.1.3:554
162 - specifies 1 dvbc satip server with address 192.168.1.4:554
163 eg: -s dvbt:2@192.168.1.100/192.168.1.2:555
164 - specifies 1 dvbt adapter to satip server with address 192.168.1.2, port 555. The client will use fe=2 (indicating adapter 2 on the server) and will connect from IP address 192.168.1.100
165 address 192.168.1.100 needs to be assigned to an interface on the server running minisatip.
166 This feature is useful for AVM FRITZ!WLAN Repeater
167
168* --satip-xml <URL> Use the xml retrieved from a satip server to configure satip adapters
169 eg: --satip-xml http://localhost:8080/desc.xml
170
171* -O --satip-tcp Use RTSP over TCP instead of UDP for data transport
172 * -S --slave ADAPTER1,ADAPTER2-ADAPTER4[,..]:MASTER - specify slave adapters
173 * Allows specifying bonded adapters (multiple adapters connected with a splitter to the same LNB)
174 * This feature is used by FBC receivers and AXE to specify the source input of the adapter
175 Only one adapter needs to be master all others needs to have this parameter specified
176 eg: -S 1-2:0
177 - specifies adapter 1 to 2 as slave, in this case adapter 0 is the master that controls the LNB
178 - the slave adapter will not control the LNB polarity or band, but it will just change the internal frequency to tune to a different transponder
179 - if there is no adapter using this link, the slave will use master adapters frontend to change the LNB polarity and band
180 eg: -S 2-7:0 (default for DVB-S2 FBC), adapter 0 and 1 are masters, 2-7 slave and linked to input 0 (A)
181 - all 8 adapters use physical input A to tune
182 eg: -S 2-4:0,5-7:1
183 - adapters 2,3,4 use physical input A to tune, while 1,5,6,7 uses input B to tune, adapter 0 and 1 are masters
184
185* -t --cleanpsi clean the PSI from all CA information, the client will see the channel as clear if decrypted successfully
186
187* -T --threads: enables/disable multiple threads (reduces memory consumption) (default: ENABLED)
188
189* -u --unicable unicable_string: defines the unicable adapters (A) and their slot (S), frequency (F) and optionally the PIN for the switch:
190 * The format is: A1:S1-F1[-PIN][,A2:S2-F2[-PIN][,...]]
191 eg: 2:0-1284[-1111]
192 * When * character is used before frequency, force 13V only for setup
193
194* -j --jess jess_string - same format as -u
195
196* -U --sources sources_for_adapters: limit the adapters to specific sources/positions
197 * eg: -U 0-2:*:3:2,6,8 (no spaces between parameters)
198 - In this example: for SRC=1 only 0,1,2; for SRC=2 all: for SRC=3 only 3; and for SRC=4 the 2,6,8 adapters are used.
199 - For each position (separated by : ) you need to declare all the adapters that use this position with no exception.
200 - The special char * indicates all adapters for this position.
201 - The number of sources range from 1 to 64; but the list can include less than 64 (in this case all are enabled for undefined sources).
202 - By default or in case of errors all adapters have enabled all positions.
203
204* -w --http-host http_server[:port]: specify the host and the port (if not 80) where the xml file can be downloaded from [default: default_local_ip_address:8080]
205 * eg: -w 192.168.1.1:8080
206
207* -x --http-port port: port for listening on http [default: 8080]
208 * eg: -x 9090
209
210* -X --xml PATH: the path to the xml that is provided as part of the satip protocol
211 * by default desc.xml is provided by minisatip without needing an additional file,
212 however satip.xml is included if it needs to be customized
213
214* -y --rtsp-port rtsp_port: port for listening for rtsp requests [default: 554]
215 * eg: -y 5544
216 - changing this to a port > 1024 removes the requirement for minisatip to run as root
217* -1 --demux-dev [1|2|3]: the protocol used to get the data from demux
218 * 0 - use dvrX device
219 * 1 - use demuxX device
220 * 2 - use dvrX device and additionally capture PSI data from demuxX device
221 * 3 - use demuxX device and additionally capture PSI data from demuxX device
222
223 * -3 --ca-pin mapping_string: set the pin for CIs
224 * The format is: ADAPTER1:PIN,ADAPTER2-ADAPTER4:PIN
225 * eg: 0:1234,2-3:4567
226
227* -C --ci mapping_string: disable CI+ mode for specified adapters
228 * The format is: ADAPTER1:PIN,ADAPTER2-ADAPTER4
229 * eg : 0,2-3
230
231* -c --multiple-pmt adapter_list:maximum_number_of_channels_supported: Enable 2 PMTs inside of the same CAPMT to double the number of decrypted channels
232 * The format is: ADAPTER1:MAX_CHANNELS[-CAID1[-CAID2]...,ADAPTER2:MAX_CHANNELS[-CAID3[-CAID4]...]
233 * eg : 0:1-100
234The DDCI adapters 0 will support maximum of 1 CAPMT (2 channels) and will use CAID1. If CAID is not specified it will use CAMs CAIDs
235Official CAMs support 1 or 2 channels, with this option this is extended to 2 or 4
236By default every CAM supports 4 channels
237
238How to compile:
239------
240
241- ./configure
242
243Configures minisatip for the current system (use ./configure --help for options)
244
245To cross compile, use something like (static compilation), considering that mips-openwrt-linux-musl-gcc is the gcc executable for that platform:
246
247- ./configure --host=mips-openwrt-linux-musl --enable-static
248
249To compiles the application
250
251- make
252
253To add custom compilation flags you can use:
254
255make EXTRA_CFLAGS=....
256
257Examples:
258-------
259- In order to listen to a radio after minisatip is started open the following URL in your favorite media player:
260 - on Hotbird 13E: "http://MINISATIP_HOST:8080/?msys=dvbs&freq=11623&pol=v&sr=27500&pids=0,10750,254"
261 - Astra 19.2E: "http://MINISATIP_HOST:8080/?msys=dvbs&freq=12266&pol=h&sr=27500&pids=0,851"
262
263- Television FTA programs:
264 - Astra 19.2E, Kika HD: "rtsp://MINISATIP_HOST:554/?src=1&freq=11347&pol=v&ro=0.35&msys=dvbs2&mtype=8psk&plts=on&sr=22000&fec=23&pids=0,17,18,6600,6610,6620,6630"
265
266- msys can be one of: dvbs, dvbs2, dvbt, dvbt2, dvbc, dvbc2, atsc, isdbt, dvbcb ( - DVBC_ANNEX_B )
267
268