Newer Older
1 2

Welcome to DVBlast!

5 6 7 8 9 10 11 12 13 14
DVBlast is a simple and powerful MPEG-2/TS demux and streaming
application with several input methods:
 - linux-dvb-supported cards (DVB-S, DVB-S2, DVB-C, DVB-T...)
 - DVB-ASI cards
 - UDP or RTP stream carrying a transport stream

It outputs one or several RTP streams carrying transport streams with:
 - hardware or software PID filtering
 - PID-based or service-based demultiplexing
 - optional descrambling via CAM device
 - optional DVB tables
16 17 18 19 20 21 22 23 24 25

DVBlast is written to be the core of a custom IRD, CID,or ASI gateway,
based on a PC with a Linux-supported card. It is very lightweight and
stable, designed for 24/7 operation.

Current features

 - Lightweight program designed for extreme memory and CPU conditions
 - No runtime dependancy; one build dependancy (biTStream)
 - CAM menus (MMI) support via an external application
28 29
 - The configuration file describing outputs can be reloaded without losing
   a single packet
30 31 32 33 34 35 36 37 38 39 40 41 42
 - Support for the new S2API of linux-dvb
 - IPv6 network support
 - UDP rather than RTP output for IPTV STBs which don't support RTP

Tuning DVBlast

You usually want to supply DVBlast with the parameters of a transponder,
for instance for DVB-S :

dvblast -f 11570000 -s 27500000 -v 18

43 44 45 46 47
This tunes to frequency 11570 MHz, symbol rate 27500, horizontal (-v 18).

For DVB-S2 you must indicate a modulation with -m qpsk|psk_8|apsk_16|apsk_32.

For DVB-T you must indicate a bandwidth, usually -b 8 for 8 MHz multiplexes.
48 49 50 51 52

Please note that frequencies are in kHz for DVB-S/S2/C, but Hz for DVB-T.
Symbol rates are in symbols/s, and bandwidths in MHz. If you have several
linux-dvb cards in the machine, specify which one to use with -a.

53 54 55 56 57 58 59 60 61
You generally want to run DVBlast in DVB compliance mode with option -C.
This option will pass through or generate mandatory DVB tables (NIT, SDT,
EITp/f, TOT, TDT). If you also want to pass-through the EIT schedule tables,
use the -e switch. It is considered a good practice to configure the name
of the network (for the NIT) with the -M option.

If you don't want to set these options on a general basis, you can set them
per output - see below.

62 63 64 65 66 67 68
Other rarely used options are available - run dvblast -h for more

Alternative inputs

69 70 71 72 73
DVBlast may handle several DVB adapters in the same machine with the -a switch:
-a 3 will use /dev/dvb/adapter3.  Additionally, selecting between frontends on
a single card is supported with the -n switch.  This is useful for hybrid 
DVB/S + DVB/T cards.

74 75 76 77
If you own a Computer Modules DVB-ASI input card, you can have DVBlast
filter and demultiplex the inputs. You just need to specify the slot number
with -A.

78 79 80 81 82
If you own a Deltacast ASI input card, you can have DVBlast filter and
demultiplex the inputs. You just need to specify the input as
"-A deltacast:<x>" where <x> is 100 * the card number (0 based) + the channel
number (0 based).

83 84 85 86 87 88
DVBlast can also read from a UDP or RTP IPv4 source carrying for
instance a multi-program transport stream. The address is specified with
-D. See the 'advanced features' section for information on how to create
such a stream for instance to cross network boundaries between the
receivers and the target network.

89 90 91 92 93 94 95 96 97 98 99 100 101
The syntax of the -D option is:
[<src host>[:<src port>]@]<src mcast>[:<port>][/<opts>]*
where <src mcast> is the multicast address carrying the stream, and <src
host> is optionally the address of the source, for source-specific multicast.
Options include:
 /udp (for streams without an RTP header)
 /mtu=XXXX (sets the maximum UDP packet size)
 /ifindex=X (binds to a specific network interface, by link number)
 /ifaddr=XXX.XXX.XXX.XXX (binds to a specific network interface, by address)

For example:

102 103 104 105 106 107

Configuring outputs

DVBlast reads a configuration file containing one or several lines in the
format :
<IP>[:<port>][@<IP>[:<port>]][/<option>]*	<always on>	<SID>	[<PID>,]*
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126

For instance :		1	10750	1234,1235,1236

The configuration file can be reloaded by sending "HUP" to the program, or
via the dvblastctl program.

IPv6 is supported, the destination address must be specified in the format 
described by RFC2732.  When using link-local scope addresses, it is
mandatory to include the interface name in the address, as shown in the 
example below.  If you do not include the interface name, you will see an
"invalid argument" error.  The interface name is optional for site-local and 
global scope addresses.

For example :
[ff12::1%eth0]:1234		1	10750
[ff15::abcd]:1234		1	10750

127 128 129 130 131 132 133 134 135
An optional bind address can be specified after an '@' sign. The typical
usage of this is to allow binding to a specific interface in a system which
has several. For instance:	1	10750

For IPv6 the bind address is not relevant; binding to an interface is achieved
via the option "/ifindex=X" where X is the number of the link, as given by
the command `ip link`.

136 137 138 139 140 141
The "always on" flag tells DVBlast whether the channel is expected to
be on at all times or if it may break. If set to "1", then DVBlast will
regularly reset the CAM module if it fails to descramble the service,
assuming the module is dead. Every time it is reset a few TS packets
will be lost, that is why this feature is optional.

142 143 144 145 146 147 148 149 150 151 152 153 154 155
Other options can be set by appending / to the multicast address definition.
Available options include :
 /udp (turns on -U for a specific output)
 /dvb (turns on -C for a specific output)
 /epg (turns on -C -e for a specific output)
 /tsid=XXX (sets the transport stream ID)
 /ssrc=XXX.XXX.XXX.XXX (sets the RTP synchronization source IPv4)
 /retention=XXX (see -E)
 /latency=XXX (see -L)
 /ttl=XX (see -t)
 /tos=XX (sets the IPv4 Type Of Service option)
 /mtu=XXXX (sets the maximum UDP packet size)
 /srvname=Some_Channel (set service name in SDT)
 /srvprovider=Some_Provider (set provider name in SDT)
156 157 158 159
 /newsid=XX (set output service ID)
 /srcaddr=XXX.XXX.XXX.XXX (use RAW packets and set source IPv4)
 /srcport=XX (set source port, depends on /srcaddr)
160 161 162 163 164 165 166 167

When setting text options like /srvname or /srvprovider, remember
that the underscore character (_) will be replaced by space ( ).

Several options can be appended, for instance:

168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
The optional "/udp" parameter can be used to force DVBlast to output
raw UDP stream. This functionality is provided for backwards compatibility
with IPTV set top boxes that don't support RTP and should only be used
if absolutely necessary. If you need both RTP and UDP streams of the same
program, specify them on separate lines like this:	1	10750	1	10750

There are three ways of configuring the PIDs to stream :

1. SID-based	1	10750	

DVBlast will stream all known PIDs from service 10750 (video, audio, and
subtitles). The resulting stream is fully MPEG-compliant, with PAT and PMT.

2. SID and PIDs	1	10750	1234,1235

DVBlast will stream SID 10750, but only PID 1234 and 1235 will be output.
Other known PIDs will be discarded and removed from the PMT. The list of
PIDs in the config file does not include the PAT and PMT, but it must
include the PCR PID if it is different from the video or audio PID, otherwise
the stream won't be compliant.

3. PIDs only	1	0	0,128,1234,1235

DVBlast will only stream the PIDs passed. No PAT and PMT will be generated,
so if they are not included the stream won't be compliant. Also the
included PAT and PMT may contain ghost programs or ESes.

205 206 207 208 209 210
4. PID remapping,audio_pid,video_pid,spu_pid

All four PIDs are required!

Note that the CAM will not be programmed in that case (unless it has
212 213 214 215 216 217 218 219 220 221 222 223
been programmed by another line of the config file).

5. Pass-through	1	*	

The entire received stream will be passed through the output. Please bear in
mind that when reading from a DVB adapter, hardware PID filtering is used by
default, so not all packets will be output unless you specify the -u option.

The file is read from the command-line :
224 225 226 227

dvblast -c /tmp/dvblast.conf

228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273

DVB cards usually output packets in big chunks. This can be problematic
with low bitrate multiplexes. By default, DVBlast bufferizes 200 ms
and tries to smooth the output. It may be desired to change this value
with the -L option. The appropriate value for the output latency should be :
  chunk_size / multiplex_bitrate

The chunk size for saa7146-based cards is 512000 bits ; for
cx23885-based cards is 192512 bits. The chunk size can be modified with
an appropriate kernel patch (see extra/). The multiplex_bitrate depends
on the symbol rate and many other factors such as the modulation.

The current default value allows for multiplex_rates as low as 2.56 Mbi/s.
Smaller multiplexes are rare but exist, so in that case you may want to
increase the buffer size. A typical DVB multiplex is 30 or 40 Mbi/s, so
the default introduces a superfluous latency ; the buffer can be lowered
to 50 ms if latency is an issue.

DVBlast also has another parameter called "max retention time" (-E).
This controls how TS packets are grouped together in IP datagrams : the
difference between the theorical output times of the first and the last
TS packets cannot exceed the maximal retention time.

IP datagrams are normally output at the output time of the earliest TS
packet ; it implies that the next TS packets are sent too soon and must
be buffered at the receiver level. ISO/IEC 13818-1 makes no provision for
this, since IP wasn't in mind when designing TS, so in theory we risk a
buffer overflow.

However normal IP receivers feature a jitter buffer which can absorb the
overflow ; DVB recommends a 50 ms buffer. DVBlast's default maximal
retention time is just below, at 40 ms, which should be fine in most

If some anal set-top-box complains about buffer overflows or clock issues,
you may try to lower the value ; the drawback is that on low bitrate
streams it will introduce padding. People with low bitrate streams and
nice receivers with big buffers can raise this value to avoid superfluous
padding and lower the total bitrate.

Please bear in mind though that setting a value for max retention time
greater than the output latency has no effect.

274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307

If dvblast is run with the -r option, the dvblastctl program can be used
to retrieve information from DVBlast about the front-end or CAM module.

dvblastctl -r /tmp/dvblast.sock fe_status
dvblastctl -r /tmp/dvblast.sock mmi_status
dvblastctl -r /tmp/dvblast.sock shutdown

CAM menu

For easier access to the CAM menus, the shell script is
provided : -r /tmp/dvblast.sock

Advanced features

For better latency, run DVBlast in real-time priority: -i 1 (requires root

DVBlast can also stream the entire transponder to an IPv4 or IPv6 address :
dvblast -u -d -f 11570000 -s 27500000 -v 18
dvblast -u -d [fe80::0ca:feff:fec0:ffee]:1235 -f 11570000 -s 27500000 -v 18

Note that IPv6 addresses specified on command line may need to have the square
brackets escaped (\[ and \]), depending on your shell.

The -u switch disables the PID filters, so that all PIDs, even the
unused ones, can be output.
309 310

Other options are self-understandable, and are listed in dvblast -h.