rtmpdump command line parameters

name

rtmpdump-(RTMP streaming media client) RTMP streaming media client

Overview

rtmpdump -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] [-Y] [-v] [-R] [-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] [-o output] [-#] [-q] [-V] [-z]
rtmpdump -h

description

rtmpdump is a tool that can download streaming media through the RTMP protocol.
rtmpdump establishes a connection to the specified RTMP server through the given URL. The URL should be as follows:

rtmp[t][e]://hostname[:port][/app[/playpath]]

Support regular and encrypted RTMP sessions

Options

Network parameters

These options define how to connect to the server

command meaning
–rtmp -r url URL to connect to the server
–host -n hostname Override the host address of the RTMP URL
–Port -c port Override the port number of the RTMP URL
–protocol -l number Protocol to override RTMP URL 0 = rtmp1 = rtmpt2 = rtmpe3 = rtmpte4 = rtmps5 = rtmpts
–socks -S host:port Use designated SOCKS4 proxy
Connection parameters

These options define the content of the data packet that RTMP requests to connect. If the correct value is not provided, the server will reject the connection attempt

command meaning
–app -a app The name of the application connected to RTMP overwrites the app in the RTMP URL. Sometimes the rtmpdump URL cannot resolve the app name correctly and automatically. This option must be used at this time
–tcUrl -t url The URL of the target stream. The default format rtmp[e]: //host[:port]/app/playpath
–PageUrl -p url The URL where the media is embedded in the web page, which has no value to be sent by default
–swfUrl -s url The URL of the media swf player. By default, no value is sent
–flashVer -f version The Flash version used by the swf player. The default is "LNX 10,0,32,18"
–auth -u string The authentication string added to connect. Using this option will add a bool value of TRUE, and then the specified string. This option is only used for some specific servers and is outdated. More generally, the -conn option should be used instead.
–conn -C type:data Arbitrary AMF data is appended to connect, type description, B Boolean N Number S String O Object Z Null For Boolean type, it must be 0 or 1 as FALSE or TRUE, and for object data, 0 or 1 must be used as the end and start tags, respectively. Control, add the prefix type N before the data item in the sub-object, and specify the value name, for example: -CB:1 -CS:authMe -CO:1 -C NN:code:1.23 -C NS:flag:ok -CO:0
Session options

These options take effect after a successful connection

command meaning
–playpath -y path Override the playpath of RTMP URL parsing. Sometimes rtmpdump cannot be parsed correctly. This option is used to make it clear
–playlist -Y The set_playlist command occurs before the play command. Otherwise the playlist will contain playpath in value
–live -v The specified media is a real-time stream. No recovery and search in the live stream
–subscribe -d stream The name of the subscribed real-time stream. Default playpath
–realtime -R Try to use the pause and resume commands ("the BUFX hack") during real-time download. The server can be transferred to the back and then use the resume command. Resume and search can still be achieved in the real-time stream.
–resume -e Recover an incomplete rtmp streaming download
–Skip -k num Search for the number of key frames skipped in the last key frame when restoring. This may be useful if you frequently try to recover and fail. The default
–start -A num The number of seconds from the start of the stream, the real-time stream is invalid
–stop -B num The number of seconds the stream has stopped
–buffer -b num Set the buffer time in milliseconds. The default is 36000000
–timeout -m num No data is received after num seconds, the session timed out, the default value is 120
Safety parameters

这些选项处理额外的身份验证,来自服务器的请求
–token -T key
输入安全令牌响应,如果服务器需要使用安全令牌验证
–jtv -j JSON
JSON令牌用于传统Justin.tv服务器 ,调用NetStream.Authenticate.UsherToken
–swfhash -w hexstring
swf文件的SHA256 hash 数值. 如果服务器使用swf验证,该选项会被用到, 看下面 --swfVfy 选项. 该哈希值是32字节,并且必须以十六进制表示. 始终与 --swfsize 选项一起使用.
–swfsize -x num
解压后SWF文件大小. 服务器swf验证时可能需要此选项,看下面–swfVfy 选项.始终与 --swfhash 选项一起使用.
–swfVfy -W url
swf播放器的URL,此选项将替换所以三个–swfUrl, --swfhash, and --swfsize选项。使用此选项时,swf播放器将从指定URL检索,并自动计算哈希和大小。此外信息缓存在一个swfinfo文件在用户主目录,所以它在每次rtmpdump运行时,并不需要检索和重新计算。swfinfo记录URL,生成时间,修改SWF文件时间,它的大小,它的哈希,默认情况下,缓冲信息用于30天,然后重新检测。
–swfAge -X days
指定使用缓存的swf信息天数,然后重新检查,使用0为经常检查,如果检查显示swf具有相同的修改时间戳,它不会被再次检索

杂项
命令 含义
–flv -o output 指定输出文件名,如果这个名字是-或被省略,流写入到stdout
–hashes -# 显示流进度,一个哈希标记没1%进度,而不是字节计数器
–quiet -q 制止所以命令的输出
–verbose -V 详细输出
–debug -z debug输出等级,最详细可输出所有分组数据
–help -h 打印命令选项摘要

退出状态
0
程序成功运行
1
不可知错误
2
不完全转移,可能会得到进一步恢复

Guess you like

Origin blog.csdn.net/weixin_37921201/article/details/89743706