{"id":13515839,"url":"https://github.com/lu-zero/rtmpdump","last_synced_at":"2025-04-19T17:04:16.705Z","repository":{"id":1519686,"uuid":"1778526","full_name":"lu-zero/rtmpdump","owner":"lu-zero","description":"rtmpdump git mirror","archived":false,"fork":false,"pushed_at":"2016-12-09T18:34:25.000Z","size":574,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T10:34:56.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"rtmpdump.mplayerhq.hu","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lu-zero.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-05-20T21:27:47.000Z","updated_at":"2022-06-17T03:48:30.000Z","dependencies_parsed_at":"2022-07-10T18:31:14.704Z","dependency_job_id":null,"html_url":"https://github.com/lu-zero/rtmpdump","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Frtmpdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Frtmpdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Frtmpdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu-zero%2Frtmpdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lu-zero","download_url":"https://codeload.github.com/lu-zero/rtmpdump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249745457,"owners_count":21319554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:01:16.510Z","updated_at":"2025-04-19T17:04:16.672Z","avatar_url":"https://github.com/lu-zero.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"RTMP Dump v2.4\n(C) 2009 Andrej Stepanchuk\n(C) 2009-2011 Howard Chu\n(C) 2010 2a665470ced7adb7156fcef47f8199a6371c117b8a79e399a2771e0b36384090\n(C) 2011 33ae1ce77301f4b4494faaa5f609f3c48b9dcf82\nLicense: GPLv2\nlibrtmp license: LGPLv2.1\nhttp://rtmpdump.mplayerhq.hu/\n\nTo compile type \"make\" with SYS=\u003cplatform name\u003e, e.g.\n\n  $ make SYS=posix\n\nfor Linux, Unix, etc. or\n\n  $ make SYS=darwin\n\nfor MacOSX or\n\n  $ make SYS=mingw\n\nfor Windows.\n\nYou can cross-compile for other platforms using the CROSS_COMPILE variable:\n\n  $ make CROSS_COMPILE=arm-none-linux- INC=-I/my/cross/includes\n\nPlease read the Makefile to see what other make variables are used.\n\nThis code also requires you to have OpenSSL and zlib installed. You may\noptionally use GnuTLS or polarssl instead of OpenSSL if desired. You may\nalso build with just rtmpe support, and no rtmps/https support, by\nspecifying -DNO_SSL in the XDEF macro, e.g.\n\n  $ make XDEF=-DNO_SSL\n\nor\n\n  $ make CRYPTO=POLARSSL XDEF=-DNO_SSL\n\nYou may also turn off all crypto support if desired\n\n  $ make CRYPTO=\n\nA shared library is now built by default, in addition to the static\nlibrary. You can also turn it off if desired\n\n  $ make SHARED=\n\nThe rtmpdump programs still link to the static library, regardless.\n\nNote that if using OpenSSL, you must have version 0.9.8 or newer.\nFor Polar SSL you must have version 1.0.0 or newer.\n\nCredit goes to team boxee for the XBMC RTMP code originally used in RTMPDumper.\nThe current code is based on the XBMC code but rewritten in C by Howard Chu.\n\n\nSWF Verification\n----------------\n\nNote: these instructions for manually generating the SWFVerification\ninfo are provided only for historical documentation. The software can now\ngenerate this info automatically, so it is no longer necessary to\nrun the commands described here. Just use the -W (--swfVfy) option\nto perform automatic SWFVerification.\n\nDownload the swf player you want to use for SWFVerification, unzip it using\n\n $ flasm -x file.swf\n\nIt will show the decompressed filesize, use it for --swfsize\n\nNow generate the hash\n\n $ openssl sha -sha256 -hmac \"Genuine Adobe Flash Player 001\" file.swf\n\nand use the --swfhash \"01234...\" option to pass it.\n\ne.g. $ ./rtmpdump --swfhash \"123456...\" --swfsize 987...\n\n\nConnect Parameters\n------------------\n\nSome servers expect additional custom parameters to be attached to the\nRTMP connect request. The \"--auth\" option handles a specific case, where\na boolean TRUE followed by the given string are added to the request.\nOther servers may require completely different parameters, so the new\n\"--conn\" option has been added. This option can be set multiple times\non the command line, adding one parameter each time.\n\nThe argument to the option must take the form \u003ctype\u003e : \u003cvalue\u003e where\ntype can be B for boolean, S for string, N for number, and O for object.\nFor booleans the value must be 0 or 1. Also, for objects the value must\nbe 1 to start a new object, or 0 to end the current object.\n\nExamples:\n  --conn B:0 --conn S:hello --conn N:3.14159\n\nNamed parameters can be specified by prefixing 'N' to the type. Then the\nname should come next, and finally the value:\n  --conn NB:myflag:1 --conn NS:category:something --conn NN:pi:3.14159\n\nObjects may be added sequentially:\n  -C O:1 -C NB:flag:1 -C NS:status:success -C O:0 -C O:1 -C NN:time:12.30 -C O:0\nor nested:\n  -C O:1 -C NS:code:hello -C NO:extra:1 -C NS:data:stuff -C O:0 -C O:0\n\n\nBuilding OpenSSL 0.9.8k\n-----------------------\narm:\n./Configure -DL_ENDIAN --prefix=`pwd`/armlibs linux-generic32\n\nThen replace gcc, cc, ar, ranlib in Makefile and crypto/Makefile by arm-linux-* variants  and use make \u0026\u0026 make install_sw\n\nwin32:\nTry ./Configure mingw --prefix=`pwd`/win32libs -DL_ENDIAN -DOPENSSL_NO_HW\nReplace gcc, cc, ... by mingw32-* variants in Makefile and crypto/Makefile\nmake \u0026\u0026 make install_sw\n\nOpenSSL cross-compiling can be a difficult beast.\n\nPrecompiled OpenSSL binaries for Windows are available on\nhttp://www.slproweb.com/products/Win32OpenSSL.html\n\nIf you're just running a pre-built Windows rtmpdump binary, then all you\nneed is the \"Light\" installer. If you want to compile rtmpdump yourself,\nyou'll need the full installer.\n\n\nExample Servers\n---------------\nThree different types of servers are also present in this distribution:\n rtmpsrv - a stub server\n rtmpsuck - a transparent proxy\n rtmpgw - an RTMP to HTTP gateway\n\nrtmpsrv - Note that this is very incomplete code, and I haven't yet decided\nwhether or not to finish it. It is useful for obtaining all the parameters\nthat a real Flash client would send to an RTMP server, so that they can be\nused with rtmpdump. The current version now invokes rtmpdump automatically\nafter parsing a client request.\n\nrtmpsuck - proxy server. See below...\n\nAll you need to do is redirect your Flash clients to the machine running this\nserver and it will dump out all the connect / play parameters that the Flash\nclient sent. The simplest way to cause the redirect is by editing /etc/hosts\nwhen you know the hostname of the RTMP server, and point it to localhost while\nrunning rtmpsrv on your machine. (This approach should work on any OS; on\nWindows you would edit %SystemRoot%\\system32\\drivers\\etc\\hosts.)\n\nOn Linux you can also use iptables to redirect all outbound RTMP traffic. You\nneed to be running as root in order to use the iptables command.\n\nIn my original plan I would have the transparent proxy running as a special\nuser (e.g. user \"proxy\"), and regular Flash clients running as any other user.\nIn that case the proxy would make the connection to the real RTMP server. The\niptables rule would look like this:\n\niptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \\! --uid-owner proxy \\\n -j REDIRECT\n\nA rule like the above will be needed to use rtmpsuck. Note that you should\nreplace \"proxy\" in the above command with an account that actually exists\non your machine.\n\nUsing it in this mode takes advantage of the Linux support for IP redirects;\nin particular it uses a special getsockopt() call to retrieve the original\ndestination address of the connection. That way the proxy can create the\nreal outbound connection without any other help from the user. The equivalent\nfunctionality may exist on other OSs but needs more investigation.\n\n(Based on reading the BSD ipfw manpage, this rule ought to work on BSD:\n\nipfw add 40 fwd 127.0.0.1,1935 tcp from any to any 1935 not uid proxy\n\nSome confirmation from any BSD users would be nice.)\n\n(We have a solution for Windows based on a TDI driver; this is known to\nwork on Win2K and WinXP but is assumed to not work on Vista or Win7 as the\nTDI is no longer used on those OS versions. Also, none of the known\nsolutions are available as freeware.)\n\nThe rtmpsuck command has only one option: \"-z\" to turn on debug logging.\nIt listens on port 1935 for RTMP sessions, but you can also redirect other\nports to it as needed (read the iptables docs). It first performs an RTMP\nhandshake with the client, then waits for the client to send a connect\nrequest. It parses and prints the connect parameters, then makes an\noutbound connection to the real RTMP server. It performs an RTMP handshake\nwith that server, forwards the connect request, and from that point on it\njust relays packets back and forth between the two endpoints.\n\nIt also checks for a few packets that it treats specially: a play packet\nfrom the client will get parsed so that the playpath can be displayed. It\nalso handles SWF Verification requests from the server, without forwarding\nthem to the client. (There would be no point, since the response is tied to\neach session's handshake.)\n\nOnce the play command is processed, all subsequent audio/video data received\nfrom the server will be written to a file, as well as being delivered back\nto the client.\n\nThe point of all this, instead of just using a sniffer, is that since rtmpsuck\nhas performed real handshakes with both the client and the server, it can\nnegotiate whatever encryption keys are needed and so record the unencrypted\ndata.\n\nrtmpgw - HTTP gateway: this is an HTTP server that accepts requests that\nconsist of rtmpdump parameters. It then connects to the specified RTMP\nserver and returns the retrieved data in the HTTP response. The only valid\nHTTP request is \"GET /\" but additional options can be provided in normal\nURL-encoded fashion. E.g.\n  GET /?r=rtmp:%2f%2fserver%2fmyapp\u0026y=somefile HTTP/1.0\n\nis equivalent the rtmpdump parameters \"-r rtmp://server/myapp -y somefile\".\n\nNote that only the shortform (single letter) rtmpdump options are supported.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu-zero%2Frtmpdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flu-zero%2Frtmpdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu-zero%2Frtmpdump/lists"}