summaryrefslogtreecommitdiffstats
path: root/INSTALL
blob: 16311dc8c8d2b843f4ba36fa291f59e5f7a8e1bb (plain)
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
$Id: INSTALL 93 2010-01-03 13:07:23Z gatty $

Installing Multicat
===================

No autotools yet... You'd have to tweak the Makefile by hand. Compile the
program with `make`.


The socket description format
=============================

For conveniency all tools use the same way of describing a socket in a
program argument:

<connect address>:<connect port>@<bind address>:<bind port>

All parts are optional; default port (1234) or wildcard address will then
be used.

Some examples:

Reading all streams coming to port 5004:
    @:5004
Reading from a multicast stream on port 5004:
    @239.255.0.1:5004
The same, with source-specific multicast:
    192.168.0.1@239.255.0.1:5004
Writing to a multicast stream on port 5004:
    239.255.0.1:5004
The same, but binding to a specific interface:
    239.255.0.1:5004@192.168.0.2


Using Multicat
==============

Recording a multicast address to a file:

multicat @239.255.0.1:5004 /tmp/myfile.ts

This will also create file /tmp/myfile.aux. Playing back the file:

multicat -p 68 /tmp/myfile.ts 239.255.0.2:5004

Adding an RTP header to an existing multicast stream:

multicat -p 68 -u @239.255.0.1:5004 239.255.0.2:5004

The PCR PID is here supposed to be 68. If you don't specify it, the timestamps
will not be RFC-compliant (but will work in most cases). You can use the
get_pcr_pid tool from libdvbpsi to determine it. Otherwise, if you are sure
the stream contains a single program, and only one PID carries a PCR, you can
pass "-p 8192" the disable the PID check. This isn't on by default because
it can produce awful things with multi-program transport streams, and the
world would be a better place if people had to knowingly turn it on.


Using IngesTS
=============

ingests -p 68 /tmp/afile.ts

This will create file /tmp/afile.aux. 68 is supposed to be the PCR PID.
The same note as above applies to ingesTS.

Playing the file:

multicat -p 68 /tmp/afile.ts 239.255.0.2:5004


Using OffseTS
=============

We want to take the first 60 minutes of a TS file. We must scale it in a
27 MHz clock:
60 * 60 (seconds) * 27000000 (MHz) = 97200000000

Find the offset in 1316-blocks:

offsets /tmp/myfile.aux 97200000000

It returns for instance "556896". Then cut the file using dd:

dd if=/tmp/myfile.ts of=/tmp/mynewfile.ts bs=1316 count=556896

Alternatively, if we want to *remove* the first hour:

dd if=/tmp/myfile.ts of=/tmp/mynewfile.ts bs=1316 skip=556896

It can also be done with multicat using the -s and -n options.


Using AggregaRTP and DesaggregaRTP
==================================

Splitting an RTP stream to two streams with different routing policies:

aggregartp @239.255.0.1:5004 239.1.0.1:5004@192.168.0.1 239.2.0.1:5004@172.16.0.1

At the other end, reassembling the two streams into one usable stream:

desaggregartp 192.168.0.1@239.1.0.1:5004 172.16.0.1@239.2.0.1:5004 239.254.0.1:5004