RTMPGW(8)

πŸ“¦
version 2.6 Β· 2 versions
  • 2.6 Β· alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 44, nixos 26.05, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.6 Β· nixpkgs unstable
, in alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, fedora 44, nixos 26.05, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– rtmpgw β€” the RTMP streaming media gateway πŸ’–

okay bestie, gather round, because this is rtmpgw(8) from the System Manager's Manual, and she is serving πŸ’…


✨ NAME ✨

rtmpgw β€” RTMP streaming media gateway. yes queen, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

rtmpgw [-r url] [-n hostname] [-c port] [-l protocol] [-S host:port]
[-a app] [-t tcUrl] [-p pageUrl] [-s swfUrl] [-f flashVer] [-u auth]
[-C conndata] [-y playpath] [-v] [-d subscription] [-e] [-k skip]
[-A start] [-B stop] [-b buffer] [-m timeout] [-T key] [-j JSON]
[-w swfHash] [-x swfSize] [-W swfUrl] [-X swfAge] [-D address] [-g port]
[-q] [-V] [-z]
rtmpgw -h

πŸ‘‘ DESCRIPTION πŸ‘‘

So like. rtmpgw is a server. She takes media content coming at her in RTMP and streams it out as HTTP. it's giving gateway energy, it's giving middle-man-but-make-it-fashion πŸŽ€

Here's the tea: rtmpgw sits there listening for HTTP requests that specify RTMP stream parameters, and then she hands you back the RTMP data inside the HTTP response. literally just passing the aux cord 🫢

The only valid HTTP request is "GET /" β€” that's it, that's the one β€” but you can sneak extra options in, URL-encoded style. Options you put on the command line act as defaults, and anything in the HTTP request can override them. so the CLI is like the baseline fit and the request is the accessories ✨


πŸ’… OPTIONS πŸ’…

🌈 Network Parameters

These ones define how to connect to the media server. the "who are you texting and how" section πŸ“±

  • --rtmp, -r url β€” URL of the server and media content. the main character of the URL world.
  • --host, -n hostname β€” overrides the hostname in the RTMP URL. not me just swapping the host like it's nothing πŸ’€
  • --port, -c port β€” overrides the port number in the RTMP URL.
  • --protocol, -l number β€” overrides the protocol in the RTMP URL. pick your fighter:
    • 0 = rtmp
    • 1 = rtmpt
    • 2 = rtmpe
    • 3 = rtmpte
    • 4 = rtmps
    • 5 = rtmpts
  • --socks, -S host:port β€” use the specified SOCKS4 proxy. going through a friend of a friend, lowkey πŸ•ΆοΈ

πŸ’œ Connection Parameters

These define what goes inside the RTMP Connect request packet. and fr fr, if you don't give correct values here, the media server will reject the connection attempt. no cap. she's picky and honestly? valid.

  • --app, -a app β€” name of the application to connect to on the RTMP server. Overrides the app in the RTMP URL. Sometimes the rtmpdump URL parser can't figure out the app name on its own, so you have to hand it over explicitly with this option. the parser is doing her best okay 😭
  • --tcUrl, -t url β€” URL of the target stream. Defaults to rtmp[e]://host[:port]/app/playpath.
  • --pageUrl, -p url β€” URL of the web page in which the media was embedded. By default, no value will be sent. she's shy like that πŸ™ˆ
  • --swfUrl, -s url β€” URL of the SWF player for the media. By default, no value will be sent.
  • --flashVer, -f version β€” version of the Flash plugin used to run the SWF player. The default is "LNX 10,0,32,18". vintage, iconic, no notes ✨
  • --auth, -u string β€” 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 --conn option should be used instead. yeah bestie, it's old, use --conn πŸ’€
  • --conn, -C type:data β€” 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.
-C B:1 -C S:authMe -C O:1 -C NN:code:1.23 -C NS:flag:ok -C O:0

πŸ¦‹ Session Parameters

These ones kick in after the Connect request has succeeded. the post-connection glow-up 🌸

  • --playpath, -y path β€” overrides the playpath parsed from the RTMP URL. Sometimes the rtmpdump URL parser can't determine the correct playpath automatically, so it must be given explicitly using this option.
  • --live, -v β€” specify that the media is a live stream. No resuming or seeking in live streams is possible. you get what you get, live is live, periodt πŸ’…
  • --subscribe, -d stream β€” name of live stream to subscribe to. Defaults to playpath.
  • --start, -A num β€” start at num seconds into the stream. Not valid for live streams. don't try it bestie.
  • --stop, -B num β€” stop at num seconds into the stream.
  • --buffer, -b num β€” set buffer time to num milliseconds. The default is 20000.
  • --timeout, -m num β€” timeout the session after num seconds without receiving any data from the server. The default is 120. if she ghosts you for two minutes, you're out ✌️

πŸ” Security Parameters

These handle the extra authentication requests the server throws at you. the "prove it" era πŸ•΅οΈ

  • --token, -T key β€” key for SecureToken response, used if the server requires SecureToken authentication.
  • --jtv, -j JSON β€” JSON token used by legacy Justin.tv servers. Invokes NetStream.Authenticate.UsherToken. old-school but make it work πŸ•°οΈ
  • --swfhash, -w hexstring β€” SHA256 hash of the decompressed SWF file. This option may be needed if the server uses SWF Verification, but see the --swfVfy option below. The hash is 32 bytes, and must be given in hexadecimal. The --swfsize option must always be used with this option. they're a package deal, they come as a set πŸ’ž
  • --swfsize, -x num β€” size of the decompressed SWF file. This option may be needed if the server uses SWF Verification, but see the --swfVfy option below. The --swfhash option must always be used with this option. see? told you. matching set πŸ”—
  • --swfVfy, -W url β€” URL of the SWF player for this media. This option replaces all three of the --swfUrl, --swfhash, and --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 .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. she remembers so you don't have to 🧠✨
  • --swfAge, -X days β€” 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. no double-dipping on downloads, we're efficient here πŸ“

πŸŽ€ Miscellaneous

  • --device, -D address β€” listener IP address. The default is 0.0.0.0, i.e., any IP address. she's open to everyone, main character energy πŸ‘‘
  • --sport, -g port β€” listener port. The default is 80.
  • --quiet, -q β€” suppress all command output. silent but deadly 🀫
  • --verbose, -V β€” verbose command output. tell me EVERYTHING.
  • --debug, -z β€” debug level output. Extremely verbose, including hex dumps of all packet data. like, hex dumps of everything. it's giving unhinged and we love her for it πŸ’€
  • --help, -h β€” print a summary of command options.

🌟 EXAMPLES 🌟

okay so the HTTP request:

GET /?r=rtmp:%2f%2fserver%2fmyapp&y=somefile HTTP/1.0

is equivalent to the rtrmpdump(1) invocation:

rtmpdump -r rtmp://server/myapp -y somefile
Note: only the shortform (single letter) options are supported. long options, bestie? not here. short and sweet only πŸ’…

🧚 ENVIRONMENT 🧚

  • HOME β€” the value of $HOME is used as the location for the .swfinfo file. she knows where you live πŸ πŸ’–

πŸ“ FILES πŸ“

  • $HOME/.swfinfo β€” cache of SWF Verification information.

🌈 SEE ALSO 🌈


πŸ’– AUTHORS πŸ’–

Andrej Stepanchuk, Howard Chu, The Flvstreamer Team <http://rtmpdump.mplayerhq.hu>


and that's the whole page bestie, you ate, no crumbs left πŸ’…βœ¨

This was RTMPDump v2.4, dated 2011-07-20, and she's the RTMPGW(8) page from the System Manager's Manual β€” stan forever, drink water, and don't forget your --swfsize when you use --swfhash πŸ«ΆπŸ’œ