-
Notifications
You must be signed in to change notification settings - Fork 116
/
rtmpdump.1
311 lines (310 loc) · 7.98 KB
/
rtmpdump.1
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
.TH RTMPDUMP 1 "2012-07-24" "RTMPDump v2.4"
.\" Copyright 2011 Howard Chu.
.\" Copying permitted according to the GNU General Public License V2.
.SH NAME
rtmpdump \- RTMP streaming media client
.SH SYNOPSIS
.B rtmpdump
.BI \-r \ url
[\c
.BI \-n \ hostname\fR]
[\c
.BI \-c \ port\fR]
[\c
.BI \-l \ protocol\fR]
[\c
.BI \-S \ host:port\fR]
[\c
.BI \-a \ app\fR]
[\c
.BI \-t \ tcUrl\fR]
[\c
.BI \-p \ pageUrl\fR]
[\c
.BI \-s \ swfUrl\fR]
[\c
.BI \-f \ flashVer\fR]
[\c
.BI \-u \ auth\fR]
[\c
.BI \-C \ conndata\fR]
[\c
.BI \-y \ playpath\fR]
[\c
.BR \-Y ]
[\c
.BR \-v ]
[\c
.BI \-d \ subscription\fR]
[\c
.BR \-e ]
[\c
.BI \-k \ skip\fR]
[\c
.BI \-A \ start\fR]
[\c
.BI \-B \ stop\fR]
[\c
.BI \-b \ buffer\fR]
[\c
.BI \-m \ timeout\fR]
[\c
.BI \-T \ key\fR]
[\c
.BI \-j \ JSON\fR]
[\c
.BI \-w \ swfHash\fR]
[\c
.BI \-x \ swfSize\fR]
[\c
.BI \-W \ swfUrl\fR]
[\c
.BI \-X \ swfAge\fR]
[\c
.BI \-o \ output\fR]
[\c
.BR \-# ]
[\c
.BR \-q ]
[\c
.BR \-V ]
[\c
.BR \-z ]
.br
.B rtmpdump \-h
.SH DESCRIPTION
.B rtmpdump
is a tool for dumping media content streamed over RTMP.
.LP
.B rtmpdump
makes a connection to the specified RTMP server and plays the media
specified by the given
.IR url .
The url should be of the form
.nf
rtmp[t][e]://hostname[:port][/app[/playpath]]
.fi
Plain rtmp, as well as tunneled and encrypted sessions are supported.
.SH OPTIONS
.SS "Network Parameters"
These options define how to connect to the media server.
.TP
\fB\-\-rtmp \-r\fP\ \fIurl\fP
URL of the server and media content.
.TP
\fB\-\-host \-n\fP\ \fIhostname\fP
Overrides the hostname in the RTMP URL.
.TP
\fB\-\-port \-c\fP\ \fIport\fP
Overrides the port number in the RTMP URL.
.TP
\fB\-\-protocol \-l\fP\ \fInumber\fP
Overrides the protocol in the RTMP URL.
.nf
0 = rtmp
1 = rtmpt
2 = rtmpe
3 = rtmpte
4 = rtmps
5 = rtmpts
.fi
.TP
\fB\-\-socks \-S\fP\ \fIhost:port\fP
Use the specified SOCKS4 proxy.
.SS "Connection Parameters"
These options define the content of the RTMP Connect request packet.
If correct values are not provided, the media server will reject the
connection attempt.
.TP
\fB\-\-app \-a\fP\ \fIapp\fP
Name of application to connect to on the RTMP server. Overrides
the app in the RTMP URL. Sometimes the rtmpdump URL parser cannot
determine the app name automatically, so it must be given explicitly
using this option.
.TP
\fB\-\-tcUrl \-t\fP\ \fIurl\fP
URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath.
.TP
\fB\-\-pageUrl \-p\fP\ \fIurl\fP
URL of the web page in which the media was embedded. By default no
value will be sent.
.TP
\fB\-\-swfUrl \-s\fP\ \fIurl\fP
URL of the SWF player for the media. By default no value will be sent.
.TP
\fB\-\-flashVer \-f\fP\ \fIversion\fP
Version of the Flash plugin used to run the SWF player. The
default is "LNX 10,0,32,18".
.TP
\fB\-\-auth \-u\fP\ \fIstring\fP
An authentication string to be appended to the Connect message. Using
this option will append a Boolean TRUE and then the specified string.
This option is only used by some particular servers and is
deprecated. The more general
.B \-\-conn
option should be used instead.
.TP
\fB\-\-conn \-C\fP\ \fItype:data\fP
Append arbitrary AMF data to the Connect message. The type
must be B for Boolean, N for number, S for string, O for object, or Z
for null. For Booleans the data must be either 0 or 1 for FALSE or TRUE,
respectively. Likewise for Objects the data must be 0 or 1 to end or
begin an object, respectively. Data items in subobjects may be named, by
prefixing the type with 'N' and specifying the name before the value, e.g.
NB:myFlag:1. This option may be used multiple times to construct arbitrary
AMF sequences. E.g.
.nf
\-C B:1 \-C S:authMe \-C O:1 \-C NN:code:1.23 \-C NS:flag:ok \-C O:0
.fi
.SS "Session Parameters"
These options take effect after the Connect request has succeeded.
.TP
\fB\-\-playpath \-y\fP\ \fIpath\fP
Overrides the playpath parsed from the RTMP URL. Sometimes the
rtmpdump URL parser cannot determine the correct playpath
automatically, so it must be given explicitly using this option.
.TP
.B \-\-playlist \-Y
Issue a set_playlist command before sending the play command. The
playlist will just contain the current playpath.
.TP
.B \-\-live \-v
Specify that the media is a live stream. No resuming or seeking in
live streams is possible.
.TP
\fB\-\-subscribe \-d\fP\ \fIstream\fP
Name of live stream to subscribe to. Defaults to
.IR playpath .
.TP
.B \-\-realtime \-R
Download approximately in realtime, without attempting to speed up via
Pause/Unpause commands ("the BUFX hack").
Useful for servers that jump backwards in time at the Unpause command.
Resuming and seeking in realtime streams is still possible.
.TP
.B \-\-resume \-e
Resume an incomplete RTMP download.
.TP
\fB\-\-skip \-k\fP\ \fInum\fP
Skip
.I num
keyframes when looking for the last keyframe from which to resume. This
may be useful if a regular attempt to resume fails. The default is 0.
.TP
\fB\-\-start \-A\fP\ \fInum\fP
Start at
.I num
seconds into the stream. Not valid for live streams.
.TP
\fB\-\-stop \-B\fP\ \fInum\fP
Stop at
.I num
seconds into the stream.
.TP
\fB\-\-buffer \-b\fP\ \fInum\fP
Set buffer time to
.I num
milliseconds. The default is 36000000.
.TP
\fB\-\-timeout \-m\fP\ \fInum\fP
Timeout the session after
.I num
seconds without receiving any data from the server. The default is 120.
.SS "Security Parameters"
These options handle additional authentication requests from the server.
.TP
\fB\-\-token \-T\fP\ \fIkey\fP
Key for SecureToken response, used if the server requires SecureToken
authentication.
.TP
\fB\-\-jtv \-j\fP\ \fIJSON\fP
JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken
.TP
\fB\-\-swfhash \-w\fP\ \fIhexstring\fP
SHA256 hash of the decompressed SWF file. This option may be needed if
the server uses SWF Verification, but see the
.B \-\-swfVfy
option below. The hash is 32 bytes, and must be
given in hexadecimal. The
.B \-\-swfsize
option must always be used with this option.
.TP
\fB\-\-swfsize \-x\fP\ \fInum\fP
Size of the decompressed SWF file. This option may be needed if the
server uses SWF Verification, but see the
.B \-\-swfVfy
option below. The
.B \-\-swfhash
option must always be used with this option.
.TP
\fB\-\-swfVfy \-W\fP\ \fIurl\fP
URL of the SWF player for this media. This option replaces all three
of the
.BR \-\-swfUrl ,
.BR \-\-swfhash ,
and
.B \-\-swfsize
options. When this option is used, the SWF player is retrieved from the
specified URL and the hash and size are computed automatically. Also
the information is cached in a
.I .swfinfo
file in the user's home directory, so that it doesn't need to be retrieved
and recalculated every time rtmpdump is run. The .swfinfo file records
the URL, the time it was fetched, the modification timestamp of the SWF
file, its size, and its hash. By default, the cached info will be used
for 30 days before re-checking.
.TP
\fB\-\-swfAge \-X\fP\ \fIdays\fP
Specify how many days to use the cached SWF info before re-checking. Use
0 to always check the SWF URL. Note that if the check shows that the
SWF file has the same modification timestamp as before, it will not be
retrieved again.
.SS Miscellaneous
.TP
\fB\-\-flv \-o\fP\ \fIoutput\fP
Specify the output file name. If the name is \- or is omitted, the
stream is written to stdout.
.TP
.B \-\-hashes \-#
Display streaming progress with a hash mark for each 1% of progress, instead
of a byte counter.
.TP
.B \-\-quiet \-q
Suppress all command output.
.TP
.B \-\-verbose \-V
Verbose command output.
.TP
.B \-\-debug \-z
Debug level output. Extremely verbose, including hex dumps of all packet data.
.TP
.B \-\-help \-h
Print a summary of command options.
.SH EXIT STATUS
.TP
.B 0
Successful program execution.
.TP
.B 1
Unrecoverable error.
.TP
.B 2
Incomplete transfer, resuming may get further.
.SH ENVIRONMENT
.TP
.B HOME
The value of
.RB $ HOME
is used as the location for the
.I .swfinfo
file.
.SH FILES
.TP
.I $HOME/.swfinfo
Cache of SWF Verification information
.SH "SEE ALSO"
.BR rtmpgw (8)
.SH AUTHORS
Andrej Stepanchuk, Howard Chu, The Flvstreamer Team
.br
<http://rtmpdump.mplayerhq.hu>