Check the return value from RTMP_SendBytesReceived()
[rtmpdump.git] / rtmpdump.1
blob0d9de8d1d56df45e1350e3f3f23f0488ab108bb3
1 .TH RTMPDUMP 1 "2011-07-20" "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 \-\-resume           \-e
181 Resume an incomplete RTMP download.
183 \fB\-\-skip             \-k\fP\ \fInum\fP
184 Skip
185 .I num
186 keyframes when looking for the last keyframe from which to resume. This
187 may be useful if a regular attempt to resume fails. The default is 0.
189 \fB\-\-start            \-A\fP\ \fInum\fP
190 Start at
191 .I num
192 seconds into the stream. Not valid for live streams.
194 \fB\-\-stop             \-B\fP\ \fInum\fP
195 Stop at
196 .I num
197 seconds into the stream.
199 \fB\-\-buffer           \-b\fP\ \fInum\fP
200 Set buffer time to
201 .I num
202 milliseconds. The default is 36000000.
204 \fB\-\-timeout          \-m\fP\ \fInum\fP
205 Timeout the session after
206 .I num
207 seconds without receiving any data from the server. The default is 120.
208 .SS "Security Parameters"
209 These options handle additional authentication requests from the server.
211 \fB\-\-token            \-T\fP\ \fIkey\fP
212 Key for SecureToken response, used if the server requires SecureToken
213 authentication.
215 \fB\-\-jtv              \-j\fP\ \fIJSON\fP
216 JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken
218 \fB\-\-swfhash          \-w\fP\ \fIhexstring\fP
219 SHA256 hash of the decompressed SWF file. This option may be needed if
220 the server uses SWF Verification, but see the
221 .B \-\-swfVfy
222 option below. The hash is 32 bytes, and must be
223 given in hexadecimal. The
224 .B \-\-swfsize
225 option must always be used with this option.
227 \fB\-\-swfsize          \-x\fP\ \fInum\fP
228 Size of the decompressed SWF file. This option may be needed if the
229 server uses SWF Verification, but see the
230 .B \-\-swfVfy
231 option below. The
232 .B \-\-swfhash
233 option must always be used with this option.
235 \fB\-\-swfVfy           \-W\fP\ \fIurl\fP
236 URL of the SWF player for this media. This option replaces all three
237 of the
238 .BR \-\-swfUrl ,
239 .BR \-\-swfhash ,
241 .B \-\-swfsize
242 options. When this option is used, the SWF player is retrieved from the
243 specified URL and the hash and size are computed automatically. Also
244 the information is cached in a
245 .I .swfinfo
246 file in the user's home directory, so that it doesn't need to be retrieved
247 and recalculated every time rtmpdump is run. The .swfinfo file records
248 the URL, the time it was fetched, the modification timestamp of the SWF
249 file, its size, and its hash. By default, the cached info will be used
250 for 30 days before re-checking.
252 \fB\-\-swfAge           \-X\fP\ \fIdays\fP
253 Specify how many days to use the cached SWF info before re-checking. Use
254 0 to always check the SWF URL. Note that if the check shows that the
255 SWF file has the same modification timestamp as before, it will not be
256 retrieved again.
257 .SS Miscellaneous
259 \fB\-\-flv              \-o\fP\ \fIoutput\fP
260 Specify the output file name. If the name is \- or is omitted, the
261 stream is written to stdout.
263 .B \-\-hashes           \-#
264 Display streaming progress with a hash mark for each 1% of progress, instead
265 of a byte counter.
267 .B \-\-quiet            \-q
268 Suppress all command output.
270 .B \-\-verbose          \-V
271 Verbose command output.
273 .B \-\-debug            \-z
274 Debug level output. Extremely verbose, including hex dumps of all packet data.
276 .B \-\-help             \-h
277 Print a summary of command options.
278 .SH EXIT STATUS
280 .B 0
281 Successful program execution.
283 .B 1
284 Unrecoverable error.
286 .B 2
287 Incomplete transfer, resuming may get further.
288 .SH ENVIRONMENT
290 .B HOME
291 The value of
292 .RB $ HOME
293 is used as the location for the
294 .I .swfinfo
295 file.
296 .SH FILES
298 .I $HOME/.swfinfo
299 Cache of SWF Verification information
300 .SH "SEE ALSO"
301 .BR rtmpgw (8)
302 .SH AUTHORS
303 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team
305 <http://rtmpdump.mplayerhq.hu>