LinuxCommandLibrary

rtmpdump

Download RTMP streaming media

TLDR

Download RTMP stream

$ rtmpdump -r "[rtmp://server/path]" -o [output.flv]
copy
With playpath
$ rtmpdump -r "[rtmp://server/app]" -y "[playpath]" -o [output.flv]
copy
Live stream
$ rtmpdump -r "[rtmp://server/live]" -v -o [output.flv]
copy
With SWF verification
$ rtmpdump -r "[rtmp://server/path]" -W "[http://example.com/player.swf]" -o [output.flv]
copy
Resume download
$ rtmpdump -r "[rtmp://server/path]" -o [output.flv] --resume
copy
Set timeout
$ rtmpdump -r "[rtmp://server/path]" -o [output.flv] --timeout [30]
copy

SYNOPSIS

rtmpdump [-r url] [-o file] [-y playpath] [options]

DESCRIPTION

rtmpdump downloads media streams using the Real-Time Messaging Protocol (RTMP), which was originally developed by Adobe for Flash-based streaming. It connects to RTMP servers and saves the stream data to a local file, supporting both live broadcasts and on-demand video content.
The tool handles the full RTMP handshake and protocol negotiation, including SWF (Shockwave Flash) verification when servers require it. RTMP URLs consist of a server address, application path, and playpath, which may need to be specified separately. For live streams, the -v flag enables live mode where recording continues until the stream ends or the user interrupts.
Interrupted downloads can be resumed with the --resume flag, which is particularly useful for long recordings over unreliable connections. The tool outputs FLV (Flash Video) format by default, which can be converted to other formats using tools like ffmpeg.

PARAMETERS

-r URL

RTMP URL.
-o FILE
Output file.
-y PATH
Playpath.
-v, --live
Live stream.
-W URL
SWF player URL.
--resume
Resume download.
-T TOKEN
Secure token.
-s URL
SWF hash.
--timeout SECS
Timeout.
-V, --verbose
Verbose.

CAVEATS

RTMP is declining in use. Some servers require authentication. May violate terms of service.

HISTORY

rtmpdump was created as open-source RTMP client. It enabled downloading Adobe Flash video streams before modern protocols became common.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community