| 1 |
DVBstream - v0.6 |
| 2 |
---------------- |
| 3 |
|
| 4 |
INTRODUCTION |
| 5 |
|
| 6 |
DVBstream is based on the ts-rtp package available at |
| 7 |
http://www.linuxtv.org. It broadcasts a (subset of a) DVB transport |
| 8 |
stream over a LAN using the rtp protocol. There were a couple of |
| 9 |
small bugs in the original ts-rtp application, which I have fixed |
| 10 |
here. |
| 11 |
|
| 12 |
v0.4pre2 of dvbstream introduced the "-ps" option which performs |
| 13 |
on-the-fly conversion of the stream to a PS before either streaming it |
| 14 |
or writing it to stdout. However, this option is not needed with |
| 15 |
recent versions of MPlayer and xine - they have native Transport |
| 16 |
Stream support. |
| 17 |
|
| 18 |
REQUIREMENTS |
| 19 |
|
| 20 |
This software requires Linux, a supported DVB card, the Linux DVB |
| 21 |
drivers from www.linuxtv.org and a kernel with Multicast networking |
| 22 |
enabled. |
| 23 |
|
| 24 |
See the Multicasting HOWTO for more information on multicasting. In |
| 25 |
brief, just set CONFIG_IP_MULTICAST=y (the default on my SuSE 7.1 |
| 26 |
installation) and recompile your kernel (if required). You can then |
| 27 |
set up the "route" using a command like: |
| 28 |
|
| 29 |
/sbin/route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 |
| 30 |
|
| 31 |
INSTALLATION |
| 32 |
|
| 33 |
Just type "make" to compile (you may need to change the path to the |
| 34 |
DVB include files in the first line of the Makefile). |
| 35 |
|
| 36 |
If you are using dvbtune for DVB-T in Finland, you should replace the |
| 37 |
"make" command with "make FINLAND=1". or "make FINLAND2=1" (see the |
| •38 |
comments in the dvb_defaults.h file for details). If in Australia |
| 39 |
use "make AUSTRALIA=1". |
| 40 |
|
| 41 |
USAGE - SERVER |
| 42 |
|
| 43 |
If you wanted to broadcast TVC International from Astra 19E, you would |
| 44 |
type the following command: |
| 45 |
|
| 46 |
dvbstream -f 12441 -p v -s 27500 512 660 |
| 47 |
|
| 48 |
You can specify up to 8 PIDs on the command-line to include in the |
| 49 |
multicasted transport stream. A 10MBit/s network should be able to |
| 50 |
handle one video and one audio stream, or eight audio streams. |
| 51 |
|
| 52 |
If you also want to view the TV channel on the TV-OUT of your DVB-S |
| 53 |
card (or using xawtv or similar), then you can use the "-v" and "-a" |
| 54 |
flags before the video and audio PIDs respectively: |
| 55 |
|
| 56 |
dvbstream -f 12441 -p v -s 27500 -v 512 -a 660 |
| 57 |
|
| 58 |
dvbstream also has the ability to map PIDS to different values before |
| 59 |
you stream it. For example, if you type |
| 60 |
|
| 61 |
dvbstream -f 12441 -p v -s 27500 -v 512:1 -a 660:2 |
| 62 |
|
| 63 |
then the video stream will become "PID 1" and the audio stream will |
| 64 |
become "PID 2". |
| 65 |
|
| 66 |
Also, with driver versions from October 2001 onwards, you can |
| 67 |
broadcast the entire transport stream (if you are using a budget card) |
| 68 |
with the command: |
| 69 |
|
| 70 |
dvbstream 8192 |
| 71 |
|
| 72 |
8192 is a "dummy PID" (legal PIDS are in the range 0-8191) and the |
| 73 |
driver interprets this to mean the entire TS. Obviously, it would |
| 74 |
make no sense to use the map feature on this "pid". |
| 75 |
|
| 76 |
USAGE - CLIENT |
| 77 |
|
| 78 |
To receive the stream on any other machine on your LAN, use the |
| 79 |
dumprtp utility (from ts-rtp). An slightly improved version is |
| 80 |
included in this archive. e.g. |
| 81 |
|
| 82 |
dumprtp > received.ts |
| 83 |
|
| 84 |
If you have a DVB card on the second machine, you can use the rtpfeed |
| 85 |
command to decode the stream. Type "rtpfeed -h" for usage |
| 86 |
information. rtpfeed was written by Guenter Wildmann |
| 87 |
<[email protected]> - please address any bugs or comments to |
| 88 |
Guenter. |
| 89 |
|
| 90 |
If you don't have a DVB card on the client machine, You can use mpg123 |
| •91 |
for live audio decoding: |
| 92 |
|
| •93 |
dumprtp | ts_filter $apid | mpg123 - |
| 94 |
|
| 95 |
This command line is included with dvbstream as the "rtpradio.sh" script. |
| 96 |
|
| 97 |
If you only want audio, you can run dvbstream with eight audio PIDs, |
| 98 |
and then your clients can choose which PID to play. |
| 99 |
|
| 100 |
For live TV channel playing, the best solution I have found is mplayer |
| 101 |
(http://www.mplayerhq.hu). Please install the latest CVS version - |
| 102 |
mplayer is being rapidly improved. |
| 103 |
|
| 104 |
You can then view TV being streamed over the network using the |
| 105 |
following command: |
| 106 |
|
| 107 |
mplayer -cache 2048 rtp://224.0.1.2:5004/ |
| 108 |
|
| 109 |
TELNET INTERFACE |
| 110 |
|
| 111 |
From v0.4 onwards, DVBstream incorporates a "telnet" interface to |
| 112 |
allow you to remotely start and stop the streaming, and tune the card |
| 113 |
to a different channel. |
| 114 |
|
| 115 |
The following commands are supported: |
| 116 |
|
| 117 |
TUNE freq pol srate |
| 118 |
STOP |
| 119 |
ADDV pid[:map] |
| 120 |
ADDA pid[:map] |
| 121 |
ADDT pid[:map] |
| 122 |
ADD pid[:map] |
| 123 |
QUIT |
| 124 |
|
| 125 |
STOP closes down all PIDs and stops the streaming. The other commands |
| 126 |
should be self-explanatory. See the scripts in the TELNET directory |
| 127 |
for example usage. |
| 128 |
|
| 129 |
CONTRIBUTORS |
| 130 |
|
| 131 |
The ts2ps conversion is taken from the "mpegtools" package distributed |
| 132 |
with the linuxtv.org DVB driver. This code is (C) 2000, 2001 Marcus |
| 133 |
Metzler for Convergence Integrated Media Gmbh and released under the |
| 134 |
GNU GPL. |
| 135 |
|
| 136 |
rtp.c is a slightly modified version of the sendrtp_ts.c file included |
| 137 |
with the "ts-rtp" package (also from linuxtv.org). It was writen by |
| 138 |
David Podeur for Convergence Integrated Media Gmbh and released under |
| 139 |
the GNU GPL. |
| 140 |
|
| 141 |
Stephen Davies <[email protected]> for the implementation of the |
| 142 |
"-o" and "-t" switches. |
| 143 |
|
| 144 |
COPYRIGHT NOTICE |
| 145 |
|
| 146 |
This program is free software; you can redistribute it and/or modify |
| 147 |
it under the terms of the GNU General Public License as published by |
| 148 |
the Free Software Foundation; either version 2 of the License, or |
| 149 |
(at your option) any later version. |
| 150 |
|
| 151 |
This program is distributed in the hope that it will be useful, |
| 152 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 153 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 154 |
GNU General Public License for more details. |
| 155 |
|
| 156 |
You should have received a copy of the GNU General Public License |
| 157 |
along with this program; if not, write to the Free Software |
| 158 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |