LinuxCommandLibrary

rtmpdump

Download streaming media from RTMP servers

TLDR

Download a file

$ rtmpdump [[-r|--rtmp]] [rtmp://example.com/path/to/video] [[-o|--flv]] [file.ext]
copy

Download a file from a Flash player
$ rtmpdump [[-r|--rtmp]] [rtmp://example.com/path/to/video] [[-W|--swfVfy]] [http://example.com/player] [[-f|--flashVer]] "[LNX 10,0,32,18]" [[-o|--flv]] [file.ext]
copy

Specify connection parameters if they are not detected correctly
$ rtmpdump [[-r|--rtmp]] [rtmp://example.com/path/to/video] [[-a|--app]] [app_name] [[-y|--playpath]] [path/to/video] [[-o|--flv]] [file.ext]
copy

Download a file from a server that requires a referrer
$ rtmpdump [[-r|--rtmp]] [rtmp://example.com/path/to/video] [[-p|--pageUrl]] [http://example.com/webpage] [[-o|--flv]] [file.ext]
copy

SYNOPSIS

rtmpdump [options]

PARAMETERS

-r, --rtmp <url>
    Specifies the full RTMP URL of the stream to connect to, including application and playpath.

-o, --output <file>
    Sets the name of the output file where the captured stream will be saved. Commonly an FLV file.

-a, --app <app>
    Defines the RTMP application name. This is often part of the URL but can be specified separately.

-y, --playpath <path>
    Specifies the stream's playpath, which identifies the specific media resource within the application.

-W, --swfUrl <url>
    Provides the URL of the SWF (Flash) player that plays the stream. Used for server-side authentication or verification.

-p, --pageUrl <url>
    Supplies the URL of the web page that originally embedded the RTMP player. Also for verification.

-C, --connect <arg>
    Allows passing custom AMF (Action Message Format) connection arguments to the RTMP server.

-f, --flashVer <version>
    Sets the emulated Flash player version string for the server handshake (e.g., 'LNX 11,2,202,233').

-L, --live
    Indicates that the stream is a live broadcast, implying it's not a video-on-demand (VOD) asset.

-z, --resume
    Attempts to resume a previously interrupted download from where it left off, if the server supports it.

-v, --verbose
    Increases the verbosity of the output, showing more details about the connection and download process.

--debug
    Enables extensive debug output, providing detailed insights for troubleshooting connection or stream issues.

--flv
    Forces the output file to be in FLV (Flash Video) format, regardless of the specified file extension.

DESCRIPTION

rtmpdump is a command-line utility designed to interact with the Real Time Messaging Protocol (RTMP). It acts as an RTMP client, capable of connecting to RTMP servers, receiving streaming audio and video data, and saving it to a local file, typically in the FLV (Flash Video) format. This tool was historically invaluable for capturing and archiving live or on-demand content delivered via RTMP, especially when direct download links were unavailable or when browser plugins were insufficient. It supports various RTMP variants, including RTMP, RTMPE (encrypted), RTMPT (tunneled over HTTP), RTMPTE (tunneled and encrypted), and RTMPS (secure RTMP over SSL). While less relevant for modern streaming protocols like HLS or DASH, it remains useful for legacy RTMP-based content or specific server interactions.

CAVEATS

rtmpdump is no longer actively developed and is considered largely superseded by more modern and versatile tools like yt-dlp or ffmpeg, which support a wider array of streaming protocols (e.g., HLS, DASH) and platforms.
It does not handle DRM-protected content.
Its effectiveness is limited strictly to RTMP streams and may not work with some contemporary streaming platforms that employ advanced anti-dumping measures or have fully transitioned to newer protocols.

OUTPUT FORMAT

By default, rtmpdump saves the captured stream into an FLV (Flash Video) container file. This format is natively compatible with RTMP streams and older Flash players, but may require conversion for broader compatibility with modern media players if they do not directly support FLV playback.

HISTORY

Developed primarily between 2008 and 2010, rtmpdump emerged as a crucial tool for capturing Real Time Messaging Protocol (RTMP) streams, which were prevalent for delivering video content via Adobe Flash Player. It addressed the growing need to download or archive content that was only accessible through live or on-demand streaming. Its development largely ceased as the internet transitioned away from Flash and RTMP towards HTML5-based video and more modern streaming protocols like HLS and DASH. Despite its age, it remains functional for legacy RTMP sources.

SEE ALSO

ffmpeg(1), yt-dlp(1), vlc(1)

Copied to clipboard