1<HTML> 2<HEAD> 3<title>RTMPGW(8): </title></head> 4<table> 5<thead> 6<tr><td>RTMPGW(8)<td align="center"><td align="right">RTMPGW(8) 7</thead> 8<tfoot> 9<tr><td>RTMPDump v2.4<td align="center">2011-07-20<td align="right">RTMPGW(8) 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> 15 16<h3>NAME</h3><ul> 17rtmpgw − RTMP streaming media gateway 18</ul> 19 20<h3>SYNOPSIS</h3><ul> 21<b>rtmpgw</b> 22[<b>−r</b><i> url</i>] 23[<b>−n</b><i> hostname</i>] 24[<b>−c</b><i> port</i>] 25[<b>−l</b><i> protocol</i>] 26[<b>−S</b><i> host:port</i>] 27[<b>−a</b><i> app</i>] 28[<b>−t</b><i> tcUrl</i>] 29[<b>−p</b><i> pageUrl</i>] 30[<b>−s</b><i> swfUrl</i>] 31[<b>−f</b><i> flashVer</i>] 32[<b>−u</b><i> auth</i>] 33[<b>−C</b><i> conndata</i>] 34[<b>−y</b><i> playpath</i>] 35[<b>−v</b>] 36[<b>−d</b><i> subscription</i>] 37[<b>−e</b>] 38[<b>−k</b><i> skip</i>] 39[<b>−A</b><i> start</i>] 40[<b>−B</b><i> stop</i>] 41[<b>−b</b><i> buffer</i>] 42[<b>−m</b><i> timeout</i>] 43[<b>−T</b><i> key</i>] 44[<b>−j</b><i> JSON</i>] 45[<b>−w</b><i> swfHash</i>] 46[<b>−x</b><i> swfSize</i>] 47[<b>−W</b><i> swfUrl</i>] 48[<b>−X</b><i> swfAge</i>] 49[<b>−D</b><i> address</i>] 50[<b>−g</b><i> port</i>] 51[<b>−q</b>] 52[<b>−V</b>] 53[<b>−z</b>] 54<br> 55<b>rtmpgw −h</b> 56</ul> 57 58<h3>DESCRIPTION</h3><ul> 59<b>rtmpgw</b> 60is a server for streaming media content from RTMP out to HTTP. 61<p> 62<b>rtmpgw</b> 63listens for HTTP requests that specify RTMP stream parameters and 64then returns the RTMP data in the HTTP response. The only valid 65HTTP request is "GET /" but additional options can be provided 66in URL-encoded fashion. Options specified on the command line will 67be used as defaults, which can be overridden by options in the HTTP 68request. 69</ul> 70 71<h3>OPTIONS</h3><ul> 72</ul> 73 74<h4>Network Parameters</h4><ul> 75These options define how to connect to the media server. 76<p> 77<dl compact><dt> 78<b>−−rtmp −r</b> <i>url</i> 79<dd> 80URL of the server and media content. 81</dl> 82<p> 83<dl compact><dt> 84<b>−−host −n</b> <i>hostname</i> 85<dd> 86Overrides the hostname in the RTMP URL. 87</dl> 88<p> 89<dl compact><dt> 90<b>−−port −c</b> <i>port</i> 91<dd> 92Overrides the port number in the RTMP URL. 93</dl> 94<p> 95<dl compact><dt> 96<b>−−protocol −l</b> <i>number</i> 97<dd> 98Overrides the protocol in the RTMP URL. 99<pre> 100 0 = rtmp 101 1 = rtmpt 102 2 = rtmpe 103 3 = rtmpte 104 4 = rtmps 105 5 = rtmpts 106</pre> 107</dl> 108<p> 109<dl compact><dt> 110<b>−−socks −S</b> <i>host:port</i> 111<dd> 112Use the specified SOCKS4 proxy. 113</dl> 114</ul> 115 116<h4>Connection Parameters</h4><ul> 117These options define the content of the RTMP Connect request packet. 118If correct values are not provided, the media server will reject the 119connection attempt. 120<p> 121<dl compact><dt> 122<b>−−app −a</b> <i>app</i> 123<dd> 124Name of application to connect to on the RTMP server. Overrides 125the app in the RTMP URL. Sometimes the rtmpdump URL parser cannot 126determine the app name automatically, so it must be given explicitly 127using this option. 128</dl> 129<p> 130<dl compact><dt> 131<b>−−tcUrl −t</b> <i>url</i> 132<dd> 133URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath. 134</dl> 135<p> 136<dl compact><dt> 137<b>−−pageUrl −p</b> <i>url</i> 138<dd> 139URL of the web page in which the media was embedded. By default no 140value will be sent. 141</dl> 142<p> 143<dl compact><dt> 144<b>−−swfUrl −s</b> <i>url</i> 145<dd> 146URL of the SWF player for the media. By default no value will be sent. 147</dl> 148<p> 149<dl compact><dt> 150<b>−−flashVer −f</b> <i>version</i> 151<dd> 152Version of the Flash plugin used to run the SWF player. The 153default is "LNX 10,0,32,18". 154</dl> 155<p> 156<dl compact><dt> 157<b>−−auth −u</b> <i>string</i> 158<dd> 159An authentication string to be appended to the Connect message. Using 160this option will append a Boolean TRUE and then the specified string. 161This option is only used by some particular servers and is 162deprecated. The more general 163<b>−−conn</b> 164option should be used instead. 165</dl> 166<p> 167<dl compact><dt> 168<b>−−conn −C</b> <i>type:data</i> 169<dd> 170Append arbitrary AMF data to the Connect message. The type 171must be B for Boolean, N for number, S for string, O for object, or Z 172for null. For Booleans the data must be either 0 or 1 for FALSE or TRUE, 173respectively. Likewise for Objects the data must be 0 or 1 to end or 174begin an object, respectively. Data items in subobjects may be named, by 175prefixing the type with 'N' and specifying the name before the value, e.g. 176NB:myFlag:1. This option may be used multiple times to construct arbitrary 177AMF sequences. E.g. 178<pre> 179 −C B:1 −C S:authMe −C O:1 −C NN:code:1.23 −C NS:flag:ok −C O:0 180</pre> 181</dl> 182</ul> 183 184<h4>Session Parameters</h4><ul> 185These options take effect after the Connect request has succeeded. 186<p> 187<dl compact><dt> 188<b>−−playpath −y</b> <i>path</i> 189<dd> 190Overrides the playpath parsed from the RTMP URL. Sometimes the 191rtmpdump URL parser cannot determine the correct playpath 192automatically, so it must be given explicitly using this option. 193</dl> 194<p> 195<dl compact><dt> 196<b>−−live −v</b> 197<dd> 198Specify that the media is a live stream. No resuming or seeking in 199live streams is possible. 200</dl> 201<p> 202<dl compact><dt> 203<b>−−subscribe −d</b> <i>stream</i> 204<dd> 205Name of live stream to subscribe to. Defaults to 206<i>playpath</i>. 207</dl> 208<p> 209<dl compact><dt> 210<b>−−start −A</b> <i>num</i> 211<dd> 212Start at 213<i>num</i> 214seconds into the stream. Not valid for live streams. 215</dl> 216<p> 217<dl compact><dt> 218<b>−−stop −B</b> <i>num</i> 219<dd> 220Stop at 221<i>num</i> 222seconds into the stream. 223</dl> 224<p> 225<dl compact><dt> 226<b>−−buffer −b</b> <i>num</i> 227<dd> 228Set buffer time to 229<i>num</i> 230milliseconds. The default is 20000. 231</dl> 232<p> 233<dl compact><dt> 234<b>−−timeout −m</b> <i>num</i> 235<dd> 236Timeout the session after 237<i>num</i> 238seconds without receiving any data from the server. The default is 120. 239</dl> 240</ul> 241 242<h4>Security Parameters</h4><ul> 243These options handle additional authentication requests from the server. 244<p> 245<dl compact><dt> 246<b>−−token −T</b> <i>key</i> 247<dd> 248Key for SecureToken response, used if the server requires SecureToken 249authentication. 250</dl> 251<p> 252<dl compact><dt> 253<b>−−jtv −j</b> <i>JSON</i> 254<dd> 255JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken 256</dl> 257<p> 258<dl compact><dt> 259<b>−−swfhash −w</b> <i>hexstring</i> 260<dd> 261SHA256 hash of the decompressed SWF file. This option may be needed if 262the server uses SWF Verification, but see the 263<b>−−swfVfy</b> 264option below. The hash is 32 bytes, and must be 265given in hexadecimal. The 266<b>−−swfsize</b> 267option must always be used with this option. 268</dl> 269<p> 270<dl compact><dt> 271<b>−−swfsize −x</b> <i>num</i> 272<dd> 273Size of the decompressed SWF file. This option may be needed if the 274server uses SWF Verification, but see the 275<b>−−swfVfy</b> 276option below. The 277<b>−−swfhash</b> 278option must always be used with this option. 279</dl> 280<p> 281<dl compact><dt> 282<b>−−swfVfy −W</b> <i>url</i> 283<dd> 284URL of the SWF player for this media. This option replaces all three 285of the 286<b>−−swfUrl</b>, 287<b>−−swfhash</b>, 288and 289<b>−−swfsize</b> 290options. When this option is used, the SWF player is retrieved from the 291specified URL and the hash and size are computed automatically. Also 292the information is cached in a 293<i>.swfinfo</i> 294file in the user's home directory, so that it doesn't need to be retrieved 295and recalculated every time rtmpdump is run. The .swfinfo file records 296the URL, the time it was fetched, the modification timestamp of the SWF 297file, its size, and its hash. By default, the cached info will be used 298for 30 days before re-checking. 299</dl> 300<p> 301<dl compact><dt> 302<b>−−swfAge −X</b> <i>days</i> 303<dd> 304Specify how many days to use the cached SWF info before re-checking. Use 3050 to always check the SWF URL. Note that if the check shows that the 306SWF file has the same modification timestamp as before, it will not be 307retrieved again. 308</dl> 309</ul> 310 311<h4>Miscellaneous</h4><ul> 312<p> 313<dl compact><dt> 314<b>−−device −D</b> <i>address</i> 315<dd> 316Listener IP address. The default is 0.0.0.0, i.e., any IP address. 317</dl> 318<p> 319<dl compact><dt> 320<b>−−sport −g</b> <i>port</i> 321<dd> 322Listener port. The default is 80. 323</dl> 324<p> 325<dl compact><dt> 326<b>−−quiet −q</b> 327<dd> 328Suppress all command output. 329</dl> 330<p> 331<dl compact><dt> 332<b>−−verbose −V</b> 333<dd> 334Verbose command output. 335</dl> 336<p> 337<dl compact><dt> 338<b>−−debug −z</b> 339<dd> 340Debug level output. Extremely verbose, including hex dumps of all packet data. 341</dl> 342<p> 343<dl compact><dt> 344<b>−−help −h</b> 345<dd> 346Print a summary of command options. 347</dl> 348</ul> 349 350<h3>EXAMPLES</h3><ul> 351The HTTP request 352<pre> 353 GET /?r=rtmp:%2f%2fserver%2fmyapp&y=somefile HTTP/1.0 354</pre> 355is equivalent to the 356<a href="../man1/rtrmpdump.1"><b>rtrmpdump</b></a>(1) 357invocation 358<pre> 359 rtmpdump −r rtmp://server/myapp −y somefile 360</pre> 361<p> 362Note that only the shortform (single letter) options are supported. 363</ul> 364 365<h3>ENVIRONMENT</h3><ul> 366<p> 367<dl compact><dt> 368<b>HOME</b> 369<dd> 370The value of 371$<b>HOME</b> 372is used as the location for the 373<i>.swfinfo</i> 374file. 375</dl> 376</ul> 377 378<h3>FILES</h3><ul> 379<p> 380<dl compact><dt> 381<i>$HOME/.swfinfo</i> 382<dd> 383Cache of SWF Verification information 384</dl> 385</ul> 386 387<h3>SEE ALSO</h3><ul> 388<a href="../man1/rtmpdump.1"><b>rtmpdump</b></a>(1) 389</ul> 390 391<h3>AUTHORS</h3><ul> 392Andrej Stepanchuk, Howard Chu, The Flvstreamer Team 393<br> 394<<a href="http://rtmpdump.mplayerhq.hu">http://rtmpdump.mplayerhq.hu</a>> 395</ul></tbody></table></html> 396