More for input buffer checks
[rtmpdump.git] / rtmpdump.1.html
blob4c39b359e05048287fc3354cb25ce7520b86d180
1 <HTML>
2 <HEAD>
3 <title>RTMPDUMP(1): </title></head>
4 <table>
5 <thead>
6 <tr><td>RTMPDUMP(1)<td align="center"><td align="right">RTMPDUMP(1)
7 </thead>
8 <tfoot>
9 <tr><td>RTMPDump v2.4<td align="center">2012-07-24<td align="right">RTMPDUMP(1)
10 </tfoot>
11 <tbody><tr><td colspan="3"><br><br><ul>
12 <!-- Copyright 2011 Howard Chu.
13 Copying permitted according to the GNU General Public License V2.-->
14 </ul>
16 <h3>NAME</h3><ul>
17 rtmpdump &minus; RTMP streaming media client
18 </ul>
20 <h3>SYNOPSIS</h3><ul>
21 <b>rtmpdump</b>
22 <b>&minus;r</b><i>&nbsp;url</i>
23 [<b>&minus;n</b><i>&nbsp;hostname</i>]
24 [<b>&minus;c</b><i>&nbsp;port</i>]
25 [<b>&minus;l</b><i>&nbsp;protocol</i>]
26 [<b>&minus;S</b><i>&nbsp;host:port</i>]
27 [<b>&minus;a</b><i>&nbsp;app</i>]
28 [<b>&minus;t</b><i>&nbsp;tcUrl</i>]
29 [<b>&minus;p</b><i>&nbsp;pageUrl</i>]
30 [<b>&minus;s</b><i>&nbsp;swfUrl</i>]
31 [<b>&minus;f</b><i>&nbsp;flashVer</i>]
32 [<b>&minus;u</b><i>&nbsp;auth</i>]
33 [<b>&minus;C</b><i>&nbsp;conndata</i>]
34 [<b>&minus;y</b><i>&nbsp;playpath</i>]
35 [<b>&minus;Y</b>]
36 [<b>&minus;v</b>]
37 [<b>&minus;R</b>]
38 [<b>&minus;d</b><i>&nbsp;subscription</i>]
39 [<b>&minus;e</b>]
40 [<b>&minus;k</b><i>&nbsp;skip</i>]
41 [<b>&minus;A</b><i>&nbsp;start</i>]
42 [<b>&minus;B</b><i>&nbsp;stop</i>]
43 [<b>&minus;b</b><i>&nbsp;buffer</i>]
44 [<b>&minus;m</b><i>&nbsp;timeout</i>]
45 [<b>&minus;T</b><i>&nbsp;key</i>]
46 [<b>&minus;j</b><i>&nbsp;JSON</i>]
47 [<b>&minus;w</b><i>&nbsp;swfHash</i>]
48 [<b>&minus;x</b><i>&nbsp;swfSize</i>]
49 [<b>&minus;W</b><i>&nbsp;swfUrl</i>]
50 [<b>&minus;X</b><i>&nbsp;swfAge</i>]
51 [<b>&minus;o</b><i>&nbsp;output</i>]
52 [<b>&minus;#</b>]
53 [<b>&minus;q</b>]
54 [<b>&minus;V</b>]
55 [<b>&minus;z</b>]
56 <br>
57 <b>rtmpdump &minus;h</b>
58 </ul>
60 <h3>DESCRIPTION</h3><ul>
61 <b>rtmpdump</b>
62 is a tool for dumping media content streamed over RTMP.
63 <p>
64 <b>rtmpdump</b>
65 makes a connection to the specified RTMP server and plays the media
66 specified by the given
67 <i>url</i>.
68 The url should be of the form
69 <pre>
70 rtmp[t][e]://hostname[:port][/app[/playpath]]
71 </pre>
72 <p>
73 Plain rtmp, as well as tunneled and encrypted sessions are supported.
74 </ul>
76 <h3>OPTIONS</h3><ul>
77 </ul>
79 <h4>Network Parameters</h4><ul>
80 These options define how to connect to the media server.
81 <p>
82 <dl compact><dt>
83 <b>&minus;&minus;rtmp &minus;r</b>&nbsp;<i>url</i>
84 <dd>
85 URL of the server and media content.
86 </dl>
87 <p>
88 <dl compact><dt>
89 <b>&minus;&minus;host &minus;n</b>&nbsp;<i>hostname</i>
90 <dd>
91 Overrides the hostname in the RTMP URL.
92 </dl>
93 <p>
94 <dl compact><dt>
95 <b>&minus;&minus;port &minus;c</b>&nbsp;<i>port</i>
96 <dd>
97 Overrides the port number in the RTMP URL.
98 </dl>
99 <p>
100 <dl compact><dt>
101 <b>&minus;&minus;protocol &minus;l</b>&nbsp;<i>number</i>
102 <dd>
103 Overrides the protocol in the RTMP URL.
104 <pre>
105 0 = rtmp
106 1 = rtmpt
107 2 = rtmpe
108 3 = rtmpte
109 4 = rtmps
110 5 = rtmpts
111 </pre>
112 </dl>
114 <dl compact><dt>
115 <b>&minus;&minus;socks &minus;S</b>&nbsp;<i>host:port</i>
116 <dd>
117 Use the specified SOCKS4 proxy.
118 </dl>
119 </ul>
121 <h4>Connection Parameters</h4><ul>
122 These options define the content of the RTMP Connect request packet.
123 If correct values are not provided, the media server will reject the
124 connection attempt.
126 <dl compact><dt>
127 <b>&minus;&minus;app &minus;a</b>&nbsp;<i>app</i>
128 <dd>
129 Name of application to connect to on the RTMP server. Overrides
130 the app in the RTMP URL. Sometimes the rtmpdump URL parser cannot
131 determine the app name automatically, so it must be given explicitly
132 using this option.
133 </dl>
135 <dl compact><dt>
136 <b>&minus;&minus;tcUrl &minus;t</b>&nbsp;<i>url</i>
137 <dd>
138 URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath.
139 </dl>
141 <dl compact><dt>
142 <b>&minus;&minus;pageUrl &minus;p</b>&nbsp;<i>url</i>
143 <dd>
144 URL of the web page in which the media was embedded. By default no
145 value will be sent.
146 </dl>
148 <dl compact><dt>
149 <b>&minus;&minus;swfUrl &minus;s</b>&nbsp;<i>url</i>
150 <dd>
151 URL of the SWF player for the media. By default no value will be sent.
152 </dl>
154 <dl compact><dt>
155 <b>&minus;&minus;flashVer &minus;f</b>&nbsp;<i>version</i>
156 <dd>
157 Version of the Flash plugin used to run the SWF player. The
158 default is "LNX 10,0,32,18".
159 </dl>
161 <dl compact><dt>
162 <b>&minus;&minus;auth &minus;u</b>&nbsp;<i>string</i>
163 <dd>
164 An authentication string to be appended to the Connect message. Using
165 this option will append a Boolean TRUE and then the specified string.
166 This option is only used by some particular servers and is
167 deprecated. The more general
168 <b>&minus;&minus;conn</b>
169 option should be used instead.
170 </dl>
172 <dl compact><dt>
173 <b>&minus;&minus;conn &minus;C</b>&nbsp;<i>type:data</i>
174 <dd>
175 Append arbitrary AMF data to the Connect message. The type
176 must be B for Boolean, N for number, S for string, O for object, or Z
177 for null. For Booleans the data must be either 0 or 1 for FALSE or TRUE,
178 respectively. Likewise for Objects the data must be 0 or 1 to end or
179 begin an object, respectively. Data items in subobjects may be named, by
180 prefixing the type with 'N' and specifying the name before the value, e.g.
181 NB:myFlag:1. This option may be used multiple times to construct arbitrary
182 AMF sequences. E.g.
183 <pre>
184 &minus;C B:1 &minus;C S:authMe &minus;C O:1 &minus;C NN:code:1.23 &minus;C NS:flag:ok &minus;C O:0
185 </pre>
186 </dl>
187 </ul>
189 <h4>Session Parameters</h4><ul>
190 These options take effect after the Connect request has succeeded.
192 <dl compact><dt>
193 <b>&minus;&minus;playpath &minus;y</b>&nbsp;<i>path</i>
194 <dd>
195 Overrides the playpath parsed from the RTMP URL. Sometimes the
196 rtmpdump URL parser cannot determine the correct playpath
197 automatically, so it must be given explicitly using this option.
198 </dl>
200 <dl compact><dt>
201 <b>&minus;&minus;playlist &minus;Y</b>
202 <dd>
203 Issue a set_playlist command before sending the play command. The
204 playlist will just contain the current playpath.
205 </dl>
207 <dl compact><dt>
208 <b>&minus;&minus;live &minus;v</b>
209 <dd>
210 Specify that the media is a live stream. No resuming or seeking in
211 live streams is possible.
212 </dl>
214 <dl compact><dt>
215 <b>&minus;&minus;subscribe &minus;d</b>&nbsp;<i>stream</i>
216 <dd>
217 Name of live stream to subscribe to. Defaults to
218 <i>playpath</i>.
219 </dl>
221 <dl compact><dt>
222 <b>&minus;&minus;realtime &minus;R</b>
223 <dd>
224 Download approximately in realtime, without attempting to speed up via
225 Pause/Unpause commands (&quot;the BUFX hack&quot;).
226 Useful for servers that jump backwards in time at the Unpause command.
227 Resuming and seeking in realtime streams is still possible.
228 </dl>
230 <dl compact><dt>
231 <b>&minus;&minus;resume &minus;e</b>
232 <dd>
233 Resume an incomplete RTMP download.
234 </dl>
236 <dl compact><dt>
237 <b>&minus;&minus;skip &minus;k</b>&nbsp;<i>num</i>
238 <dd>
239 Skip
240 <i>num</i>
241 keyframes when looking for the last keyframe from which to resume. This
242 may be useful if a regular attempt to resume fails. The default is 0.
243 </dl>
245 <dl compact><dt>
246 <b>&minus;&minus;start &minus;A</b>&nbsp;<i>num</i>
247 <dd>
248 Start at
249 <i>num</i>
250 seconds into the stream. Not valid for live streams.
251 </dl>
253 <dl compact><dt>
254 <b>&minus;&minus;stop &minus;B</b>&nbsp;<i>num</i>
255 <dd>
256 Stop at
257 <i>num</i>
258 seconds into the stream.
259 </dl>
261 <dl compact><dt>
262 <b>&minus;&minus;buffer &minus;b</b>&nbsp;<i>num</i>
263 <dd>
264 Set buffer time to
265 <i>num</i>
266 milliseconds. The default is 36000000.
267 </dl>
269 <dl compact><dt>
270 <b>&minus;&minus;timeout &minus;m</b>&nbsp;<i>num</i>
271 <dd>
272 Timeout the session after
273 <i>num</i>
274 seconds without receiving any data from the server. The default is 120.
275 </dl>
276 </ul>
278 <h4>Security Parameters</h4><ul>
279 These options handle additional authentication requests from the server.
281 <dl compact><dt>
282 <b>&minus;&minus;token &minus;T</b>&nbsp;<i>key</i>
283 <dd>
284 Key for SecureToken response, used if the server requires SecureToken
285 authentication.
286 </dl>
288 <dl compact><dt>
289 <b>&minus;&minus;jtv &minus;j</b>&nbsp;<i>JSON</i>
290 <dd>
291 JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken
292 </dl>
294 <dl compact><dt>
295 <b>&minus;&minus;swfhash &minus;w</b>&nbsp;<i>hexstring</i>
296 <dd>
297 SHA256 hash of the decompressed SWF file. This option may be needed if
298 the server uses SWF Verification, but see the
299 <b>&minus;&minus;swfVfy</b>
300 option below. The hash is 32 bytes, and must be
301 given in hexadecimal. The
302 <b>&minus;&minus;swfsize</b>
303 option must always be used with this option.
304 </dl>
306 <dl compact><dt>
307 <b>&minus;&minus;swfsize &minus;x</b>&nbsp;<i>num</i>
308 <dd>
309 Size of the decompressed SWF file. This option may be needed if the
310 server uses SWF Verification, but see the
311 <b>&minus;&minus;swfVfy</b>
312 option below. The
313 <b>&minus;&minus;swfhash</b>
314 option must always be used with this option.
315 </dl>
317 <dl compact><dt>
318 <b>&minus;&minus;swfVfy &minus;W</b>&nbsp;<i>url</i>
319 <dd>
320 URL of the SWF player for this media. This option replaces all three
321 of the
322 <b>&minus;&minus;swfUrl</b>,
323 <b>&minus;&minus;swfhash</b>,
325 <b>&minus;&minus;swfsize</b>
326 options. When this option is used, the SWF player is retrieved from the
327 specified URL and the hash and size are computed automatically. Also
328 the information is cached in a
329 <i>.swfinfo</i>
330 file in the user's home directory, so that it doesn't need to be retrieved
331 and recalculated every time rtmpdump is run. The .swfinfo file records
332 the URL, the time it was fetched, the modification timestamp of the SWF
333 file, its size, and its hash. By default, the cached info will be used
334 for 30 days before re-checking.
335 </dl>
337 <dl compact><dt>
338 <b>&minus;&minus;swfAge &minus;X</b>&nbsp;<i>days</i>
339 <dd>
340 Specify how many days to use the cached SWF info before re-checking. Use
341 0 to always check the SWF URL. Note that if the check shows that the
342 SWF file has the same modification timestamp as before, it will not be
343 retrieved again.
344 </dl>
345 </ul>
347 <h4>Miscellaneous</h4><ul>
349 <dl compact><dt>
350 <b>&minus;&minus;flv &minus;o</b>&nbsp;<i>output</i>
351 <dd>
352 Specify the output file name. If the name is &minus; or is omitted, the
353 stream is written to stdout.
354 </dl>
356 <dl compact><dt>
357 <b>&minus;&minus;hashes &minus;#</b>
358 <dd>
359 Display streaming progress with a hash mark for each 1% of progress, instead
360 of a byte counter.
361 </dl>
363 <dl compact><dt>
364 <b>&minus;&minus;quiet &minus;q</b>
365 <dd>
366 Suppress all command output.
367 </dl>
369 <dl compact><dt>
370 <b>&minus;&minus;verbose &minus;V</b>
371 <dd>
372 Verbose command output.
373 </dl>
375 <dl compact><dt>
376 <b>&minus;&minus;debug &minus;z</b>
377 <dd>
378 Debug level output. Extremely verbose, including hex dumps of all packet data.
379 </dl>
381 <dl compact><dt>
382 <b>&minus;&minus;help &minus;h</b>
383 <dd>
384 Print a summary of command options.
385 </dl>
386 </ul>
388 <h3>EXIT STATUS</h3><ul>
390 <dl compact><dt>
391 <b>0</b>
392 <dd>
393 Successful program execution.
394 </dl>
396 <dl compact><dt>
397 <b>1</b>
398 <dd>
399 Unrecoverable error.
400 </dl>
402 <dl compact><dt>
403 <b>2</b>
404 <dd>
405 Incomplete transfer, resuming may get further.
406 </dl>
407 </ul>
409 <h3>ENVIRONMENT</h3><ul>
411 <dl compact><dt>
412 <b>HOME</b>
413 <dd>
414 The value of
415 $<b>HOME</b>
416 is used as the location for the
417 <i>.swfinfo</i>
418 file.
419 </dl>
420 </ul>
422 <h3>FILES</h3><ul>
424 <dl compact><dt>
425 <i>$HOME/.swfinfo</i>
426 <dd>
427 Cache of SWF Verification information
428 </dl>
429 </ul>
431 <h3>SEE ALSO</h3><ul>
432 <a href="../man8/rtmpgw.8"><b>rtmpgw</b></a>(8)
433 </ul>
435 <h3>AUTHORS</h3><ul>
436 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team
437 <br>
438 &lt;<a href="http://rtmpdump.mplayerhq.hu">http://rtmpdump.mplayerhq.hu</a>>
439 </ul></tbody></table></html>