dvbstream

From LinuxTVWiki
Revision as of 20:30, 7 January 2008 by CityK (talk | contribs) (some formatting and edits)
Jump to navigation Jump to search

dvbstream is a popular utility, from the "DVBtools" 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.

Features

dvbstream:

  • 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).

Usage

Server

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

Client

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://224.0.1.2: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...

PID selection

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.

Telnet Interface

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 STOP ADDV pid[:map] ADDA pid[:map] ADDT pid[:map] ADD pid[:map] QUIT

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.

Note: Some of the text above has been taken directly from the readme written by Alastair McKinstry (linked to below), which stands under a GNU license ... (the tiny amounts should be fair use anyway)

External Links