-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
324 lines (215 loc) · 9.47 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
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
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
dvbsnoop - an open source DVB/MPEG stream analyzer
====================================================
http://dvbsnoop.sourceforge.net/
http://cvs.tuxbox.org/
dvbsnoop is a DVB/MPEG stream analyzer program.
The program can be used to sniff, monitor, debug, dump
or view DVB/MPEG/DSM-CC/MHP stream information (digital
television or data broadcasts) sent via satellite, cable
or terrestrial.
The program was mainly written to learn and understand the DVB
protocol structures and streams. dvbsnoop is currently part of
the tuxbox project, bringing Linux based TV software to some
set top boxes (digital satellite/cable receivers).
Documentation and example outputs can be found at:
http://dvbsnoop.sourceforge.net
Disclaimer:
===========
You are using this program at your own risk!
This program may not be used to hack pay tv or encrypted dvb services
in any way.
License:
========
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
Basic requirements:
===================
- a DVB card (not needed for offline decoding of recorded files)
- Linux DVB API version 1 or 3 installed (see www.linuxtv.org)
or
- a Linux based set top box (using DVB API version 1 or 3)
(e.g. 'dbox2' or 'dreambox')
Installation:
=============
- install the DVB API driver from http://www.linuxtv.org
(linux kernel 2.6.x and above are already providing the DVB API)
- Prerequistes of other software:
To compile dvbsnoop you may need:
- autoconf >= 2.57a
- automake >= 1.8
- libtool >= 1.4.2
- make >= 3.79
- tar
- bunzip2 (bzip2)
- gunzip (gzip)
- gcc 2.95 or >= 3.0
- download the latest source from http://dvbsnoop.sourceforge.net
(download a tarball or checkout from cvs)
- unzip and untar the archive (if needed)
gzip -d dvbsnoop-<version>.tar.gz
or
bzip2 -d dvbsnoop-<version>.tar.bz2
tar xvf dvbsnoop-<version>.tar
cd dvbsnoop-<version>
- configure the source
./autogen.sh # e.g. on "dbox2" cdk, use if needed
./configure
or you may specify a path to DVB API include files
./configure CPPFLAGS=-I/path/to/dvb-kernel/linux/include
- compile
make
make install
- test
dvbsnoop -help
- PROBLEMS compiling dvbsnoop?
dvbsnoop should compile smoothly on any ANSI-C-Compiler. But it was
tested on GCC (gcc-3.x) only.
If you see any problems during 'autoconf.sh' or 'configure' execution,
please check if you have the latest versions of 'autoconf' and 'configure'
installed. In cases, please update your system (check packages
automake, autoconf and libtool). Please see also mini FAQ at the end
of this file.
- Special Platforms
Cygwin:
dvbsnoop may be used on Microsoft Windows Platforms using cygwin
(http://www.cygwin.com). Due to a missing dvb hardware layer you may
use dvbsnoop in offline mode only. To compile dvbsnoop for cygwin,
please read annex "cygwin".
Posting dvbsnoop output:
========================
If you are posting dvbsnoop output to mailing lists, newsgroups, public boards
or whatever, please always include the dvbsnoop header:
e.g.: " dvbsnoop V1.2.49 -- http://dvbsnoop.sourceforge.net/"
The version information is helpful if there are discussions about the
decoding output.
Using source code snippets or dvbsnoop knowledge for your own purpose:
======================================================================
Feel free to use dvbsnoop source for your own programs as knowledge
or code base. In any cases, please include a link or reference to
dvbsnoop in your program or documentation... Thanks.
Bugs, requests:
===============
Well, if you find some bugs, please let me know.
(check first, if the data stream is not broken).
Reoport bugs to: http://sourceforge.net/tracker/?group_id=85040
Please do not send binary data stream files or large
decoding output via email! (If needed, I will ask for it!)
But it is a good advise to save the data stream using
the option "dvbsnoop -s ... -b ... > file" on your harddrive.
It might be helpful for further investigations.
To prevent spam-filtering please preceed your mail subject
with "dvbsnoop: " (e.g. mail topic: "dvbsnoop: bugreport xyz")
Keywords:
=========
DVB stream analyzer mpeg stream analyzer, TS stream analyzer, MPEG,
MPG, descriptor, digital television, satellite TV, cable TV, DVB-C,
DVB-S, DVB-T, MHP, DSM-CC, SI, PES, TOT, PAT, PMT, SDT, EIT, NIT,
TDST, RST, SIT, DIT, BAT, EMM, ECM, PSI, SI tables, SSU, INT, UNT, datagram,
sections, transport stream analyzer, packetized elementary stream, demux,
ISO/IEC 13818-1, ISO/IEC 13818-6, ETSI EN 300468, ETSI EN 301162,
ETSI TS 102006, ETSI EN 301192, ETSI TR 101202, ITU H.222.0,
data carousel, object carousel, dvb snoop, TV ANYTIME
(c) 2001-2007 Rainer Scherg (Rainer.Scherg@gmx.de)
http://dvbsnoop.sourceforge.net
Annex
=====
Install on Cygwin
=================
dvbsnoop <= version 1.4.0:
==========================
To make dvbsnoop run on cygwin platforms, you have to:
1.) copy dvb-api include files to your cygwin installation.
2.) tweak some cygwin header files.
Tnx to Kamal for this description:
-----Original Message-----
From: Kamalanand [mailto:kamal_dasu@xxxxxxxxxx]
Subject: RE: dvbsnoop as analyzer on Windows - worked
Rainer,
I had to apply a few fixes in my environment to make dvbsnoop build with
cygwin. This might be very specific to my environment, however wanted to
share this with you if others face a similar problem.
I am using the following cygwin version downloaded using setup.exe on
http://wwww.cygwin.com :
CYGWIN_NT-5.1 my-pc 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown
Cygwin
I have the following installed in the cygwin environment
1) Dvbsnoop http://dvbsnoop.sourceforge.net/ under ~/dvbsnoop-1.4.00/
2) Downloaded the linux kernel 2.6.12 sources from http://www.kernel.org/ ,
extracted to /linux-2.6
These are the things I did to have a successful build,
1) Copied the dvb includes from the /linux-2.6/include/linux/dvb under
/usr/include/linux/dvb
(Actaully I made a symbolic link but its upto you.)
2) The cygwin installation had the __u64 type missing in the
/usr/include/asm/types.h ,
So added that to /usr/include/asm/types.h. This is needed by the struct
dmx_stc in /usr/include/lnux/dvb/dmx.h
..
typedef __signed__ int __s64;
typedef unsigned int __u64;
..
3) Then noticed the dmx_pes.c includes file_io.h which includes the
sys/ioctl.h. I
figured that the IOCTL macros are needed to compile
~/dvbsnoop-1.4.0.0/src/dvb_api/dmx_pes.c file. The IOCTL macros are used in
the /usr/include/linux/dvb/dmx.h which get called in the dmx_pes.c. Now
cygwin /usr/include/sys/ioctl.h does not have the macros in it and
/usr/include/asm/ioctl.h is missing in the cygwin environment for some
reason.
Anyway I copied the /include/linux/asm-i386/ioctl.h from linux kernel
sources to the /usr/include/asm/ioctl.h . Then added the following to the
/usr/include/sys/ioctl.h
#include <asm/ioctl.h>
4) However the ~/dvbsnoop-1.4.0.0/src/misc/packet_mem.c refused to compile
due to various type incopatabilities with strings.h and stdlib.h under
cygwin. Basically it needed the definitions for u_char and u_long. So I
tried the following to fix the problem :
/* #include <string.h> */
/* #include <stdlib.h> */
#include <sys/types.h>
Maybe there is a better way to do this, for now this seemed to work for me
5) Ran the following
~/dvbsnoop-1.4.0.0/configure script
~/dvbsnoop-1.4.0.0/make clean
~/dvbsnoop-1.4.0.0/make
~/dvbsnoop-1.4.0.0/make install
Now I am able to do offline analysis and decode the MPEG streams.
Thanks & Regards
Kamal
dvbsnoop > version 1.4.0:
==========================
To make dvbsnoop run on cygwin platforms, you have to:
1.) copy dvb-api include files to your cygwin installation.
2.) maybe: you have tweak some cygwin header files.
3.) see src/dvb_api/dvb_api.h: uncomment the IOCTL, etc. #defines
(please read remark in header file)
4.) Next: go on with standard procedure...:
./configure
make
etc.
if you encounter some problems, try "make distclean"
prior to autogen.sh
Problems compiling dvbsnoop?
============================
Mini-FAQ from the tuxbox project (linux@dbox2):
Q: Why is there no configure script?
A: "autoconf" creates configure from "configure.ac". You can call
"./autogen.sh", which will call "autoconf" for you.
Q: Why is there no "Makefile", neither in the root
directory nor in any subdirectory?
A: "configure" creates "Makefile" from "Makefile.in". "./configure --help"
usually shows the available options.
Q: Why is there no "Makefile.in"?
A: "automake" creates "Makefile.in" from "Makefile.am". You can call
"./autogen.sh", which will call "automake" for you. If you call
"automake" manually, then make sure your working directory contains
"configure.ac".