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
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.36.
.TH PS2TS "1" "November 2008" "ps2ts 1.11" "User Commands"
.SH NAME
ps2ts \- Convert an H.222 program stream to H.222 transport stream
.SH SYNOPSIS
.B ps2ts
[\fIswitches\fR] \fI<infile>\fR \fI<outfile>\fR
.SH DESCRIPTION
.IP
TS tools version 1.11, ps2ts built Nov 11 2008 17:15:47
.IP
Convert an H.222 program stream to H.222 transport stream.
.IP
This program does not make use of any Program Stream Map packets
in the data (mainly because I have yet to see data with any). This
means that the program has to determine the stream type of the data
based on the first few ES units.
.IP
This program does not output more than one video and one audio
stream. If the program stream data contains more than one of each,
the first will be used, and the others ignored (with a message
indicating this).
.IP
It is assumed that the video stream will contain DTS values in its
PES packets at reasonable intervals, which can be used as PCR values
in the transport stream, and thus the video stream's PID can be used
as the PCR PID in the transport stream.
.SS "Files:"
.TP
<infile>
is a file containing the program stream data
(but see \fB\-stdin\fR below)
.TP
<outfile>
is an transport stream file
(but see \fB\-stdout\fR and \fB\-host\fR below)
.SS "Input switches:"
.TP
\fB\-stdin\fR
Take input from <stdin>, instead of a named file
.TP
\fB\-dvd\fR
The PS data is from a DVD. This is the default.
This switch has no effect on MPEG\-1 PS data.
.TP
\fB\-notdvd\fR, \fB\-nodvd\fR
The PS data is not from a DVD.
The DVD specification stores AC\-3 (Dolby), DTS and
other audio in a specialised manner in private_stream_1.
.TP
\fB\-vstream\fR <n>
Take video from video stream <n> (0..7).
The default is the first video stream found.
.TP
\fB\-astream\fR <n>
Take audio from audio stream <n> (0..31).
The default is the first audio stream found
(this includes private_stream_1 on non\-DVD streams).
.TP
\fB\-ac3stream\fR <n>
Take audio from AC3 substream <n> (0..7), from
private_stream_1. This implies \fB\-dvd\fR.
(If audio is being taken from a substream, the user
is assumed to have determined which one is wanted,
e.g., using psreport)
.SS "Output switches:"
.TP
\fB\-stdout\fR
Write output to <stdout>, instead of a named file
Forces \fB\-quiet\fR.
.TP
\fB\-host\fR <host>, \fB\-host\fR <host>:<port>
Writes output (over TCP/IP) to the named <host>,
instead of to a named file. If <port> is not
specified, it defaults to 88.
.TP
\fB\-vpid\fR <pid>
<pid> is the video PID to use for the data.
Use '\-vpid 0x<pid>' to specify a hex value.
Defaults to 0x68.
.TP
\fB\-apid\fR <pid>
<pid> is the audio PID to use for the data.
Use '\-apid 0x<pid>' to specify a hex value.
Defaults to 0x67.
.TP
\fB\-noaudio\fR
Don't output the audio data
.TP
\fB\-pmt\fR <pid>
<pid> is the PMT PID to use.
Use '\-pmt 0x<pid>' to specify a hex value.
Defaults to 0x66
.TP
\fB\-prepeat\fR <n>
Output the program data (PAT/PMT) after every <n>
PS packs. Defaults to 100.
.TP
\fB\-pad\fR <n>
Pad the start with <n> filler TS packets, to allow
a TS reader to synchronize with the datastream.
Defaults to 8.
.SS "General switches:"
.TP
\fB\-verbose\fR, \fB\-v\fR
Print a 'v' for each video packet and an 'a' for
each audio packet, as it is read
.TP
\fB\-quiet\fR, \fB\-q\fR
Only output error messages
.TP
\fB\-max\fR <n>, \fB\-m\fR <n>
Maximum number of PS packs to read
.SS "Stream type:"
.IP
When the TS data is being output, it is flagged to indicate whether
it conforms to H.262, H.264, etc. It is important to get this right, as
it will affect interpretation of the TS data.
.IP
If input is from a file, then the program will look at the start of
the file to determine if the stream is H.264 or H.262 data. This
process may occasionally come to the wrong conclusion, in which case
the user can override the choice using the following switches.
.IP
If input is from standard input (via \fB\-stdin\fR), then it is not possible
for the program to make its own decision on the input stream type.
Instead, it defaults to H.262, and relies on the user indicating if
this is wrong.
.TP
\fB\-h264\fR, \fB\-avc\fR
Force the program to treat the input as MPEG\-4/AVC.
.TP
\fB\-h262\fR
Force the program to treat the input as MPEG\-2.
.TP
\fB\-mp42\fR
Force the program to treat the input as MPEG\-4/Part 2.
.TP
\fB\-vtype\fR <type>
Force the program to treat the input as video of
stream type <type> (e.g., 0x42 means AVS video). It is
up to the user to specify a valid <type>.
.IP
If the audio stream being output is Dolby (AC\-3), then the stream type
used to output it differs for DVB (European) and ATSC (USA) data. It
may be specified as follows:
.TP
\fB\-dolby\fR dvb
Use stream type 0x06 (the default)
.TP
\fB\-dolby\fR atsc
Use stream type 0x81
.IP
TS tools version 1.11, ps2ts built Nov 11 2008 17:15:47
.IP
Convert an H.222 program stream to H.222 transport stream.
.IP
This program does not make use of any Program Stream Map packets
in the data (mainly because I have yet to see data with any). This
means that the program has to determine the stream type of the data
based on the first few ES units.
.IP
This program does not output more than one video and one audio
stream. If the program stream data contains more than one of each,
the first will be used, and the others ignored (with a message
indicating this).
.IP
It is assumed that the video stream will contain DTS values in its
PES packets at reasonable intervals, which can be used as PCR values
in the transport stream, and thus the video stream's PID can be used
as the PCR PID in the transport stream.
.SS "Files:"
.TP
<infile>
is a file containing the program stream data
(but see \fB\-stdin\fR below)
.TP
<outfile>
is an transport stream file
(but see \fB\-stdout\fR and \fB\-host\fR below)
.SS "Input switches:"
.TP
\fB\-stdin\fR
Take input from <stdin>, instead of a named file
.TP
\fB\-dvd\fR
The PS data is from a DVD. This is the default.
This switch has no effect on MPEG\-1 PS data.
.TP
\fB\-notdvd\fR, \fB\-nodvd\fR
The PS data is not from a DVD.
The DVD specification stores AC\-3 (Dolby), DTS and
other audio in a specialised manner in private_stream_1.
.TP
\fB\-vstream\fR <n>
Take video from video stream <n> (0..7).
The default is the first video stream found.
.TP
\fB\-astream\fR <n>
Take audio from audio stream <n> (0..31).
The default is the first audio stream found
(this includes private_stream_1 on non\-DVD streams).
.TP
\fB\-ac3stream\fR <n>
Take audio from AC3 substream <n> (0..7), from
private_stream_1. This implies \fB\-dvd\fR.
(If audio is being taken from a substream, the user
is assumed to have determined which one is wanted,
e.g., using psreport)
.SS "Output switches:"
.TP
\fB\-stdout\fR
Write output to <stdout>, instead of a named file
Forces \fB\-quiet\fR.
.TP
\fB\-host\fR <host>, \fB\-host\fR <host>:<port>
Writes output (over TCP/IP) to the named <host>,
instead of to a named file. If <port> is not
specified, it defaults to 88.
.TP
\fB\-vpid\fR <pid>
<pid> is the video PID to use for the data.
Use '\-vpid 0x<pid>' to specify a hex value.
Defaults to 0x68.
.TP
\fB\-apid\fR <pid>
<pid> is the audio PID to use for the data.
Use '\-apid 0x<pid>' to specify a hex value.
Defaults to 0x67.
.TP
\fB\-noaudio\fR
Don't output the audio data
.TP
\fB\-pmt\fR <pid>
<pid> is the PMT PID to use.
Use '\-pmt 0x<pid>' to specify a hex value.
Defaults to 0x66
.TP
\fB\-prepeat\fR <n>
Output the program data (PAT/PMT) after every <n>
PS packs. Defaults to 100.
.TP
\fB\-pad\fR <n>
Pad the start with <n> filler TS packets, to allow
a TS reader to synchronize with the datastream.
Defaults to 8.
.SS "General switches:"
.TP
\fB\-verbose\fR, \fB\-v\fR
Print a 'v' for each video packet and an 'a' for
each audio packet, as it is read
.TP
\fB\-quiet\fR, \fB\-q\fR
Only output error messages
.TP
\fB\-max\fR <n>, \fB\-m\fR <n>
Maximum number of PS packs to read
.SS "Stream type:"
.IP
When the TS data is being output, it is flagged to indicate whether
it conforms to H.262, H.264, etc. It is important to get this right, as
it will affect interpretation of the TS data.
.IP
If input is from a file, then the program will look at the start of
the file to determine if the stream is H.264 or H.262 data. This
process may occasionally come to the wrong conclusion, in which case
the user can override the choice using the following switches.
.IP
If input is from standard input (via \fB\-stdin\fR), then it is not possible
for the program to make its own decision on the input stream type.
Instead, it defaults to H.262, and relies on the user indicating if
this is wrong.
.TP
\fB\-h264\fR, \fB\-avc\fR
Force the program to treat the input as MPEG\-4/AVC.
.TP
\fB\-h262\fR
Force the program to treat the input as MPEG\-2.
.TP
\fB\-mp42\fR
Force the program to treat the input as MPEG\-4/Part 2.
.TP
\fB\-vtype\fR <type>
Force the program to treat the input as video of
stream type <type> (e.g., 0x42 means AVS video). It is
up to the user to specify a valid <type>.
.IP
If the audio stream being output is Dolby (AC\-3), then the stream type
used to output it differs for DVB (European) and ATSC (USA) data. It
may be specified as follows:
.TP
\fB\-dolby\fR dvb
Use stream type 0x06 (the default)
.TP
\fB\-dolby\fR atsc
Use stream type 0x81
.SH "SEE ALSO"
The full documentation for
.B ps2ts
is maintained as a Texinfo manual.
Please check http://tstools.berlios.de for more information.
|