More for input buffer checks
[rtmpdump.git] / rtmpdump.1
blob7bb532824fb4cc0433fdd69c2eddae78854f37a6
1 .TH RTMPDUMP 1 "2012-07-24" "RTMPDump v2.4"
2 .\" Copyright 2011 Howard Chu.
3 .\" Copying permitted according to the GNU General Public License V2.
4 .SH NAME
5 rtmpdump \- RTMP streaming media client
6 .SH SYNOPSIS
7 .B rtmpdump
8 .BI \-r \ url
9 [\c
10 .BI \-n \ hostname\fR]
11 [\c
12 .BI \-c \ port\fR]
13 [\c
14 .BI \-l \ protocol\fR]
15 [\c
16 .BI \-S \ host:port\fR]
17 [\c
18 .BI \-a \ app\fR]
19 [\c
20 .BI \-t \ tcUrl\fR]
21 [\c
22 .BI \-p \ pageUrl\fR]
23 [\c
24 .BI \-s \ swfUrl\fR]
25 [\c
26 .BI \-f \ flashVer\fR]
27 [\c
28 .BI \-u \ auth\fR]
29 [\c
30 .BI \-C \ conndata\fR]
31 [\c
32 .BI \-y \ playpath\fR]
33 [\c
34 .BR \-Y ]
35 [\c
36 .BR \-v ]
37 [\c
38 .BI \-d \ subscription\fR]
39 [\c
40 .BR \-e ]
41 [\c
42 .BI \-k \ skip\fR]
43 [\c
44 .BI \-A \ start\fR]
45 [\c
46 .BI \-B \ stop\fR]
47 [\c
48 .BI \-b \ buffer\fR]
49 [\c
50 .BI \-m \ timeout\fR]
51 [\c
52 .BI \-T \ key\fR]
53 [\c
54 .BI \-j \ JSON\fR]
55 [\c
56 .BI \-w \ swfHash\fR]
57 [\c
58 .BI \-x \ swfSize\fR]
59 [\c
60 .BI \-W \ swfUrl\fR]
61 [\c
62 .BI \-X \ swfAge\fR]
63 [\c
64 .BI \-o \ output\fR]
65 [\c
66 .BR \-# ]
67 [\c
68 .BR \-q ]
69 [\c
70 .BR \-V ]
71 [\c
72 .BR \-z ]
73 .br
74 .B rtmpdump \-h
75 .SH DESCRIPTION
76 .B rtmpdump
77 is a tool for dumping media content streamed over RTMP.
78 .LP
79 .B rtmpdump
80 makes a connection to the specified RTMP server and plays the media
81 specified by the given
82 .IR url .
83 The url should be of the form
84 .nf
85   rtmp[t][e]://hostname[:port][/app[/playpath]]
86 .fi
88 Plain rtmp, as well as tunneled and encrypted sessions are supported.
89 .SH OPTIONS
90 .SS "Network Parameters"
91 These options define how to connect to the media server.
92 .TP
93 \fB\-\-rtmp             \-r\fP\ \fIurl\fP
94 URL of the server and media content.
95 .TP
96 \fB\-\-host             \-n\fP\ \fIhostname\fP
97 Overrides the hostname in the RTMP URL.
98 .TP
99 \fB\-\-port             \-c\fP\ \fIport\fP
100 Overrides the port number in the RTMP URL.
102 \fB\-\-protocol \-l\fP\ \fInumber\fP
103 Overrides the protocol in the RTMP URL.
105   0 = rtmp
106   1 = rtmpt
107   2 = rtmpe
108   3 = rtmpte
109   4 = rtmps
110   5 = rtmpts
113 \fB\-\-socks            \-S\fP\ \fIhost:port\fP
114 Use the specified SOCKS4 proxy.
115 .SS "Connection Parameters"
116 These options define the content of the RTMP Connect request packet.
117 If correct values are not provided, the media server will reject the
118 connection attempt.
120 \fB\-\-app              \-a\fP\ \fIapp\fP
121 Name of application to connect to on the RTMP server. Overrides
122 the app in the RTMP URL. Sometimes the rtmpdump URL parser cannot
123 determine the app name automatically, so it must be given explicitly
124 using this option.
126 \fB\-\-tcUrl            \-t\fP\ \fIurl\fP
127 URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath.
129 \fB\-\-pageUrl          \-p\fP\ \fIurl\fP
130 URL of the web page in which the media was embedded. By default no
131 value will be sent.
133 \fB\-\-swfUrl           \-s\fP\ \fIurl\fP
134 URL of the SWF player for the media. By default no value will be sent.
136 \fB\-\-flashVer \-f\fP\ \fIversion\fP
137 Version of the Flash plugin used to run the SWF player. The
138 default is "LNX 10,0,32,18".
140 \fB\-\-auth             \-u\fP\ \fIstring\fP
141 An authentication string to be appended to the Connect message. Using
142 this option will append a Boolean TRUE and then the specified string.
143 This option is only used by some particular servers and is
144 deprecated. The more general
145 .B \-\-conn
146 option should be used instead.
148 \fB\-\-conn             \-C\fP\ \fItype:data\fP
149 Append arbitrary AMF data to the Connect message. The type
150 must be B for Boolean, N for number, S for string, O for object, or Z
151 for null. For Booleans the data must be either 0 or 1 for FALSE or TRUE,
152 respectively. Likewise for Objects the data must be 0 or 1 to end or
153 begin an object, respectively. Data items in subobjects may be named, by
154 prefixing the type with 'N' and specifying the name before the value, e.g.
155 NB:myFlag:1. This option may be used multiple times to construct arbitrary
156 AMF sequences. E.g.
158   \-C B:1 \-C S:authMe \-C O:1 \-C NN:code:1.23 \-C NS:flag:ok \-C O:0
160 .SS "Session Parameters"
161 These options take effect after the Connect request has succeeded.
163 \fB\-\-playpath \-y\fP\ \fIpath\fP
164 Overrides the playpath parsed from the RTMP URL. Sometimes the
165 rtmpdump URL parser cannot determine the correct playpath
166 automatically, so it must be given explicitly using this option.
168 .B \-\-playlist         \-Y
169 Issue a set_playlist command before sending the play command. The
170 playlist will just contain the current playpath.
172 .B \-\-live             \-v
173 Specify that the media is a live stream. No resuming or seeking in
174 live streams is possible.
176 \fB\-\-subscribe        \-d\fP\ \fIstream\fP
177 Name of live stream to subscribe to. Defaults to
178 .IR playpath .
180 .B \-\-realtime \-R
181 Download approximately in realtime, without attempting to speed up via
182 Pause/Unpause commands ("the BUFX hack").
183 Useful for servers that jump backwards in time at the Unpause command.
184 Resuming and seeking in realtime streams is still possible.
186 .B \-\-resume           \-e
187 Resume an incomplete RTMP download.
189 \fB\-\-skip             \-k\fP\ \fInum\fP
190 Skip
191 .I num
192 keyframes when looking for the last keyframe from which to resume. This
193 may be useful if a regular attempt to resume fails. The default is 0.
195 \fB\-\-start            \-A\fP\ \fInum\fP
196 Start at
197 .I num
198 seconds into the stream. Not valid for live streams.
200 \fB\-\-stop             \-B\fP\ \fInum\fP
201 Stop at
202 .I num
203 seconds into the stream.
205 \fB\-\-buffer           \-b\fP\ \fInum\fP
206 Set buffer time to
207 .I num
208 milliseconds. The default is 36000000.
210 \fB\-\-timeout          \-m\fP\ \fInum\fP
211 Timeout the session after
212 .I num
213 seconds without receiving any data from the server. The default is 120.
214 .SS "Security Parameters"
215 These options handle additional authentication requests from the server.
217 \fB\-\-token            \-T\fP\ \fIkey\fP
218 Key for SecureToken response, used if the server requires SecureToken
219 authentication.
221 \fB\-\-jtv              \-j\fP\ \fIJSON\fP
222 JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken
224 \fB\-\-swfhash          \-w\fP\ \fIhexstring\fP
225 SHA256 hash of the decompressed SWF file. This option may be needed if
226 the server uses SWF Verification, but see the
227 .B \-\-swfVfy
228 option below. The hash is 32 bytes, and must be
229 given in hexadecimal. The
230 .B \-\-swfsize
231 option must always be used with this option.
233 \fB\-\-swfsize          \-x\fP\ \fInum\fP
234 Size of the decompressed SWF file. This option may be needed if the
235 server uses SWF Verification, but see the
236 .B \-\-swfVfy
237 option below. The
238 .B \-\-swfhash
239 option must always be used with this option.
241 \fB\-\-swfVfy           \-W\fP\ \fIurl\fP
242 URL of the SWF player for this media. This option replaces all three
243 of the
244 .BR \-\-swfUrl ,
245 .BR \-\-swfhash ,
247 .B \-\-swfsize
248 options. When this option is used, the SWF player is retrieved from the
249 specified URL and the hash and size are computed automatically. Also
250 the information is cached in a
251 .I .swfinfo
252 file in the user's home directory, so that it doesn't need to be retrieved
253 and recalculated every time rtmpdump is run. The .swfinfo file records
254 the URL, the time it was fetched, the modification timestamp of the SWF
255 file, its size, and its hash. By default, the cached info will be used
256 for 30 days before re-checking.
258 \fB\-\-swfAge           \-X\fP\ \fIdays\fP
259 Specify how many days to use the cached SWF info before re-checking. Use
260 0 to always check the SWF URL. Note that if the check shows that the
261 SWF file has the same modification timestamp as before, it will not be
262 retrieved again.
263 .SS Miscellaneous
265 \fB\-\-flv              \-o\fP\ \fIoutput\fP
266 Specify the output file name. If the name is \- or is omitted, the
267 stream is written to stdout.
269 .B \-\-hashes           \-#
270 Display streaming progress with a hash mark for each 1% of progress, instead
271 of a byte counter.
273 .B \-\-quiet            \-q
274 Suppress all command output.
276 .B \-\-verbose          \-V
277 Verbose command output.
279 .B \-\-debug            \-z
280 Debug level output. Extremely verbose, including hex dumps of all packet data.
282 .B \-\-help             \-h
283 Print a summary of command options.
284 .SH EXIT STATUS
286 .B 0
287 Successful program execution.
289 .B 1
290 Unrecoverable error.
292 .B 2
293 Incomplete transfer, resuming may get further.
294 .SH ENVIRONMENT
296 .B HOME
297 The value of
298 .RB $ HOME
299 is used as the location for the
300 .I .swfinfo
301 file.
302 .SH FILES
304 .I $HOME/.swfinfo
305 Cache of SWF Verification information
306 .SH "SEE ALSO"
307 .BR rtmpgw (8)
308 .SH AUTHORS
309 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team
311 <http://rtmpdump.mplayerhq.hu>