dvbstream is a popular utility, from the "DVB tools" project, that can be used to broadcast either a (subset of a) DVB transport stream or a DVB program stream over a LAN using the rtp protocol. It attempts to be compliant with RFCs 1889, 1890, 2038 and 2250.
- streams one or more PIDs over network
- supports network multicast broadcasting (if that is setup with your kernel), so many can recieve the stream, not only one computer in the network.
- provides a protocol in backwards direction so that the client computer can control the frequency of the DVB card of the server computer and which PIDs get streamed over network
- can also be used to easily write a stream to harddisk (locally, without network usage - see the Testing your DVB device).
Obtaining the dvbstream package
If the dvbstream package is maintained in a repository available for your "distro", then you can obtain it with your package manager. For example:
- To install it on a debian system:
# apt-get install dvbstream
Terry Hardie has also made additions to DVBStream, notably:
- DVB-S2 support
- Multi LNB type support
- DiSeqC positioner support
- Continuity checking (prevents corrupted TS streams being created)
- Multi file splitting (on size or continuity error)
- curses interface
- Multi-threaded high performance file writer (Tested to 80Mbit streams)
You can get this version from here
After tuning to a transponder, you run dvbstream as follows:
dvbstream pid1 pid2 ... pid8
On the client, use the included dumprtp utility to receive selected PIDs from the multicast:
dumprtp pid1 pid2 > received.ts
To receive the stream on any other machine on your LAN, use the dumprtp utility (included with the dvbstream package, so you'll have to install that also on your client). Easiest usage:
dumprtp > received.ts
If you have a full-featured DVB card on the client machine, you can use the rtpfeed command to decode the stream; type "rtpfeed -h" for usage information.
Otherwise the same restrictions apply as with a system with a budget DVB card. If you don't have a FF DVB card on the client machine, you can use mpg123 and the mpegtools provided with the DVB driver for live audio decoding:
dumprtp | ts2es apid | mpg123 -
Alternatively, you can pipe the dumprtp output to your favourite video player, e.g. gxine:
dumprtp | gxine
It's advisable to cache some data locally if you're in a slow or strongly used network environment, e.g. with mplayer:
mplayer -cache 2048 rtp://220.127.116.11:5004/
But keep in mind that you'll see the goal only seconds after it happened, so you'll hear the neighbours scream before you see it youself...
If you only want audio, you can run dvbstream with eight audio PIDs, and then your clients can choose which PID to play. Dvbstream supports up to 8 PIDs, and audio streams have much lower bandwidth so you can stream many of them.
From v0.4 onwards, DVBstream incorporates a "telnet" interface to allow you to remotely start and stop the streaming, and tune the card to a different channel.
The following commands are supported:
- TUNE freq pol srate
- ADDV pid[:map]
- ADDA pid[:map]
- ADDT pid[:map]
- ADD pid[:map]
STOP closes down all PIDs and stops the streaming. The other commands should be self-explanatory. See the scripts in the TELNET directory for example usage. The default port is 12345