RTMPDump

RTMPDump is a free software project dedicated to develop a toolkit for RTMP streams. The package includes three programs, rtmpdump, rtmpsrv and rtmpsuck.

It has been reviewed as "an excellent utility for recording streams broadcasting TV and video on demand"[1] and has been used in academic research on video streaming rate selection[3] and a developmental media framework.[4] The utility has been noted for its small size and its ability to decrypt both RTMPE (Encrypted RTMP) and RTMPS (Secure RTMP) Digital Rights Management technologies.[5] Adobe Systems Inc. asserted that rtmpdump, in a 2009 Digital Millennium Copyright Act Cease and Desist order issued against SourceForge, "can be used" to infringe copyrights, without claiming actual use.[6] As of 2009, Sourceforge had removed the project files, providing the message "The project specified has been flagged as deleted".[5] As of November 2009, the toolkit was announced to be hosted as a Git repository at MplayerHQ.hu.[7]

On-demand streams

In negotiating a connection, an RTMP client sends and receives a data stream containing multiple elements, as a single command line. An on-demand stream typically includes the following elements:[8]

For a Limelight server

The foregoing are typically the only elements (or "switches") that are essential to a connection, if neither Tunnelling nor Encryption are in use by the server. Although other elements may be encountered in practice, they are normally non-essential.

Hence the following elements are typically sent by the client software[9] application, as a single command line -

rtmpdump -r rtmp://xxxxxxxx.fcod.llnwd.net
   -a path?as=data&av=data&te=data&mp=data&et=data&fmta-token=data
   -y mp4:URL/filename.mp4 -o file_mp4.flv

The parts comprising the -a (or --app) element must be incorporated in it in the order shown above, as the sequence in which its parts are received by the RTMP server is critical.

The authentication strings (et= and fmta-token=) contain session information, so will change on each fresh connection made to the server (which in practice typically means they will expire if a new session is begun, not literally on every attempt to resume a connection), but the other elements will not usually vary from session to session.

For an Akamai server

The command line is typically as above, except that the -a (or --app) element contains the following parts instead -

Hence the following elements are typically sent by the client software application,[9] as a single command line -

program.exe -r rtmp://xxxxxxx.edgefcs.net
   -a ondemand?auth=data&aifp=data&slist=data
   -y mp3:URL/filename -o file_mp3.flv

The parts comprising the -a (or --app) element must be incorporated in it in the order shown above, as the sequence in which its parts are received by the RTMP server is critical.

The authentication string (auth=) contains session information, so will change on each fresh connection made to the server (typically, if a new session is begun, e.g. the computer is restarted, not literally on every attempt to resume a connection). The other parts will not usually vary from session to session.

Note - The above describes the simplified form, whereby the stream is first saved to the user's hard disk, to be played back thereafter in a media player capable of playing an FLV encoded file (H.263 or H.264 encoding), such as GOM Player. If it's desired, instead, to play the stream directly from the RTMP server, thus giving immediate playback, additional elements will be needed in the command line including -

-f: This specifies the version of the Flash plugin installed on the user's computer. For example, -f "WIN 9,0,260,0" would indicate the user has the Windows version of Flash Player 9, release 260.

-W: The capital W command. This is the URL address of the SWF player used to play the stream, as indicated by the web page from which the stream is derived. For example, path/9player.swf?revision=18269_21576.

Live streams

The command line for an Akamai server is typically as for an Akamai on-demand stream. But the -a (or --app) element contains the following parts

Note - If the slist string contains two or more alternative streams (i.e. offers a choice of streams at alternative bitrates), the playpath element (--playpath or -y) specifies the one chosen by the user, as the identifier item.

Hence the following sequence is typically sent by the client software application,[9] as a single command line -

rtmpdump.exe --live -r rtmp://xxxxxxx.live.edgefcs.net
   -a live?auth=data&aifp=data&slist=data
   --playpath {identifier}?auth=data&aifp=data&slist=data -o output.flv

All these items are mandatory, and must be included in the order shown above. The string following the ? (question mark) in both the -a and --playpath elements will typically be identical. The identifier item will typically be a sub-set of the slist data (if the latter offers a choice), otherwise they too will be identical. The -o element can specify an output filename chosen by the user.

Specifying the complete playpath is unnecessary, as that element is constructed in memory by the client application. Typically, in memory it takes the following form -

   -y xxxxx_x_@xxxx?auth=[62 characters]&aifp=v001&slist=xxxxx_x_@xxxx,xxxxx_x_@xxxx

References

  1. 1 2 "Learning rtmpdump Through Examples". The PC Linux OS Magazine. Volume 51. April 2011.
  2. "Do you use rtmpdump?". stream-recorder.com.
  3. Huang, Te-Yuan; Handigol, Nikhil; Heller, Brandon; McKeown, Nick; Johari, Ramesh (November 2012). "Confused, Timid, and Unstable: Picking a Video Streaming Rate is Hard" (PDF). ACM Internet Measurement Conference (IMC) (Boston).(Author page)
  4. Chen, Hsiao-ting (陳孝庭) (July 13, 2011)."The Development of Efficiently Lightweight Media Framework for Media Editor and Live Video Streaming". Taiwan: National Central University. MS Thesis.
  5. 1 2 Bär, Hans (3 December 2009). "Protected Streaming und Konvertierung für die TV-Wiedergabe - (Protected Streaming and Converting for TV playback)". In German. PC Magazin. p. 3.
  6. "Adobe claims rtmpdump 'can be used' to infringe". ChillingEffects.org. May 8, 2009
  7. Compn (November 1, 2009). "2009-11-01, Sunday :: Updates". MplayerHQ News. "MPlayer is also hosting the rtmpdump project. rtmpdump is a program to download rtmp:// streams. It was previously hosted on SourceForge."
  8. RTMPdump developer page
  9. 1 2 3 RTMPdump client software

External links

This article is issued from Wikipedia - version of the Thursday, July 09, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.