Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 05-03-2009, 08:59 AM
jace89 jace89 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 9
jace89 is on a distinguished road
Default

How to use RTMPDump? - rtmp dump tutorials


How to use rtmpdump? I don't understand it. Can someone post instructions?
Reply With Quote
  #2  
Old 05-04-2009, 12:27 AM
Stream Recorder
 
Posts: n/a
Default

Re: How do you use rtmp dump (rtmpdump tutorials)?


In Windows Run Command Prompt, go to the directory with rtmpdump.exe using cd command and run rtmpdump.exe .

rtmpdump basic usage
Code:
rtmpdump -r "rtmp://host/dir/file.flv" -o filename.flv
rtmpdump parameters
Code:
--help|-h               Prints this help screen.
--rtmp|-r url           URL (e.g. rtmp//hotname[:port]/path)
--host|-n hostname      Overrides the hostname in the rtmp url
--port|-c port          Overrides the port in the rtmp url
--protocol|-l           Overrides the protocol in the rtmp url (0 - RTMP, 3 - RTMPE)
--playpath|-y           Overrides the playpath parsed from rtmp url
--swfUrl|-s url         URL to player swf file
--tcUrl|-t url          URL to played stream (default: "rtmp://host[:port]/app")
--pageUrl|-p url        Web URL of played programme
--app|-a app            Name of player used
--swfhash|-w hexstring  SHA256 hash of the decompressed SWF file (32 bytes)
--swfsize|-x num        Size of the decompressed SWF file, required for SWFVerification
--auth|-u string        Authentication string to be appended to the connect string
--flashVer|-f string    Flash version string
--live|-v               Save a live stream, no --resume (seeking) of live strems possible
--flv|-o string         FLV output file name, if the file name is - print stream to stdout
--resume|-e             Resume a partial RTMP download
--timeout|-m num        Timeout connection num seconds 
--buffer|-b             Buffer time in milliseconds, this option makes only sense in stdout mode 
--skip|-k num           Skip num keyframes when looking for last keyframe to resume from. Useful if resume fails

SWF Verification
Download the swf player you want to use for SWFVerification, unzip it using
Code:
$ flasm -x file.swf
It will show the decompressed filesize, use it for --swfsize

Now generate the hash
Code:
$ openssl sha -sha256 -hmac "Genuine Adobe Flash Player 001" file.swf
and use the --swfhash "01234..." option to pass it. e.g.
Code:
$ ./rtmpdump --swfhash "123456..." --swfsize 987...
Reply With Quote
  #3  
Old 05-04-2009, 03:45 AM
jace89 jace89 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 9
jace89 is on a distinguished road
Default

Re: How do you use rtmp dump?


Quote:
Originally Posted by Stream Recorder View Post
Run Command Prompt, go to the directory with rtmpdump.exe using cd command and run rtmpdump.exe .
i know that. Im talking about how can i download a rtmp stream.
Do i need any other programs to find the links or anything.
Reply With Quote
  #4  
Old 05-04-2009, 11:19 AM
Stream Recorder
 
Posts: n/a
Default

Re: How do you use rtmp dump (rtmpdump tutorials)?


Yes, you need other programs to find RTMP URLs, find RTMPE stream URLs.

You may also need to find additional parameters. Sometimes you can find them from the source of the web-page. You can also use two additional server programs, rtmpsrv and rtmpsuck that come with rtmpdump 2.1:

rtmpsrv is a stub for a server; it logs the connect and play parameters from a regular client that connects to it. These parameters can then be used with rtmpdump to retrieve a stream.

rtmpsuck is a transparent proxy; it intercepts connections from a client and then makes an outbound connection to the real server. After all handshaking is complete and encryption keys with both sides are negotiated, it records the cleartext stream data into files while relaying the data from the server to the client.
Reply With Quote
  #5  
Old 05-04-2009, 12:50 PM
jace89 jace89 is offline
Junior Member
 
Join Date: Sep 2008
Posts: 9
jace89 is on a distinguished road
Default

Re: How do you use rtmp dump?


Quote:
Originally Posted by Stream Recorder View Post
Yes, you need other programs to find RTMP URLs.
i have the urls now what?

Also i found a new program called flazr
I don't know how to use that either maybe you can help.
Reply With Quote
  #6  
Old 05-04-2009, 03:43 PM
Stream Recorder
 
Posts: n/a
Default

Re: How do you use rtmp dump (rtmpdump tutorials)?


Quote:
Originally Posted by jace89 View Post
i have the urls now what?
Tutorial on using rtmpdump:
Quote:
Originally Posted by constantcuriousity.blogspot.com
Today I attended a lecture/demo session on "hacking" various media sites like YouTube, Hulu, last.fm. Essentially it was a practical demonstration of the cat and mouse game hackers play with content pedlars on the internet....

One of the tools mentioned was rtmpdump ...

I decided to compile it myself from the most recent development version. If you're lazy and brave enough to trust compiled binaries and packages from third parties, go to LinuxCentre and install flvstreamer for your operating system. These programs were once one and so far they use the same commands. Read: they work the same.
(Editor's note: flvstreamer doesn't support RTMPE secure streams)

These instrucitons work on Ubuntu 9.10 (karmic) but please be aware things change rapidly so the following might not work forever.

First of all install the tools needed for accessing the code and compilation.
Code:
sudo apt-get install build-essential gcc make subversion libssl0.9.8 libssl-dev libssl0.9.8
Now check out the latest code from the Subversion repository:
Code:
svn co svn://svn.mplayerhq.hu/rtmpdump rtmpdump
If you prefer a stable version, run this instead:
Code:
wget http://rtmpdump.mplayerhq.hu/rtmpdump-1.9.tgz
tar xfz rtmpdump-1.9.tgz
mv rtmpdump-1.9 rtmpdump
I'm sure the impatient are looking forward to completing this ASAP so here's the final step in setting up rtmpdump on your computer:
Code:
cd rtmpdump
make linux
The program now lies in the same folder and you can only run it by telling your shell (like bash) exactly where it is. If you're in the same folder, running it is as simple as ./rtmpdump but ./ is only short for the current folder and it gets expanded to (in my case) /home/jasa/rtmpdump/rtmpdump.

Great! Now we need a media site which uses a Adobe's RTMP server. I think I won't get in trouble if I use VideoLectures.net as an example.

Lets say I'm interested in probability and statistics. And I want to watch these lectures offline, on a train or wherever.

Unfortunately this isn't a straightforward process and quite a bit of work is required. It is derived from a mailing list thread.

I need to see the source code of the web page above, not the rendered output of the web browser. In Firefox press Ctrl+U. Now I need some hard data to pass to rtmpdump. Search for a javascript section which launches the flash video player. For the statistics video this is the interesting section:
Code:
var flashvars = {
     
streamer: "rtmp://oxy.videolectures.net/video",
file: "2007/pascal/bootcamp07_vilanova/keller_mikaela/bootcamp07_keller_bss_01.flv",
     
height: '288',
autostart: "true",
bufferlength: '5',


image: "http://media.videolectures.net/play.png",
  
id: "FlvPlayer" // last line, no colon ',' !
};
swfobject.embedSWF("http://media.videolectures.net/jw-player/player.swf", "video_embed", "384", "307", "9.0.0", "http://media.videolectures.net/swfobject/expressInstall.swf", flashvars, params, attributes);
Generally searching (Ctrl+F) for flashvars should get you near the required data. The line swfobject.embedSWF(...) causes the video player to load inside your browser and display the correct media. This media rests on a different server than the webpage and I will use rtmpdump to connect to that server instead of the flash player. Now Adobe has put some roadblocks into the process but lucky for me I have a flying car.

I'll just give you the final command now and explain later!
Code:
./rtmpdump -r rtmp://oxy.videolectures.net/video/ -y 2007/pascal/bootcamp07_vilanova/keller_mikaela/bootcamp07_keller_bss_01 -a video -s http://media.videolectures.net/jw-player/player.swf -w ffa4f0c469cfbe1f449ec42462e8c3ba16600f5a4b311980bb626893ca81f388 -x 53910 -o test.flv
The -r switch requires an argument which is the URL of the media server and is found in the variable streamer in the JavaScript source code above.

The -y switch needs the playpath and that is found in the JavaScript variable file, (minus the extension .flv or .mp4).

The -a switch is the name of the used player and usually automatically inferred from the URL. Defining it manually works by copying the part after the server name in the streamer.

The -s switch defines the flash video player which normally connects to the media server. In the example it is the first argument of the function embedSWF.

Here's where things get even more complicated. The media server wants some extra data about this player, specifically its sha256 hash-sum and size in bytes. So lets get them:
Code:
wget http://media.videolectures.net/jw-player/player.swf
sha256sum player.swf
ls -l player.swf
Supply the sha356sum to switch -w and the file size to the -x switch.

Anything else? Yeah, I need to specify where to save the video with -o.

Run the longest command ever and get yourself a beer (you've earned it)!

I admit that doing this for every video gets time consuming but unfortunately it is a procedure specific to every site. Look at the mailing list thread link again to see different javascript:
Quote:
For anyone curious, I found that wisevid is using plain RTMP with SWF
verification.

This invocation works for me:

Code:
rtmpdump -r rtmp://stream1.wisevid.com/flvs -s http://wisevid.com/player.swf -y 82330 -a flvs -z -o xxx -w e09b300f1f1e2cc75878ab11258ba4c17f28a315ea9df26f67b37c7f59332737 -x 110543
Starting from this web page
Code:
http://www.wisevid.com/view_video.php?viewkey=0052slrjt6n74lz84848
The relevant information from that page is in this bit of javascript

Code:
<script type="text/javascript">
var player = null;
function playerReady(thePlayer) { player = window.document[thePlayer.id]; }
var so = new SWFObject('player.swf','mpl','570','340','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('wmode','transparent');
so.addParam('flashvars','&file=82330.flv&streamer=rtmp://stream1.wisevid.com/flvs&skin=http://wisevid.com/modieus1.swf&stretching=exactfit&autostart=true&abouttext=WiseVid.com&aboutlink=http://wisevid.com');
so.write('player');
</script>
Reply With Quote
  #7  
Old 07-26-2009, 08:34 AM
compn compn is offline
Stream recording expert
 
Join Date: Sep 2006
Posts: 128
compn has a spectacular aura aboutcompn has a spectacular aura aboutcompn has a spectacular aura about
Default

Re: How do you use rtmp dump?


here is a command line using mtv's website as an example:

Code:
rtmpdump.exe  --swfhash 1155163cece179766c97fedce8933ccfccb9a553e47c1fabbb5faeacc4e8ad70 --swfsize 563963 --swfUrl "http://media.mtvnservices.com/player/release/?v=3.14.0" -r rtmp://cp10740.edgefcs.net/ondemand/mtvcomstor/_!/mtv.com/onair/the_stew/comp_reel/mt_71824_stew_26_320.flv -o mt_71824_stew_26_320.flv
to find the rtmp url i used URL Snooper
the swfhash and swfsize were generated by:

Quote:
Download the swf player you want to use for SWFVerification, unzip it using

$ flasm -x file.swf

It will show the decompressed filesize, use it for --swfsize

Now generate the hash

$ openssl sha -sha256 -hmac "Genuine Adobe Flash Player 001" file.swf

and use the --swfhash "01234..." option to pass it.

e.g. $ ./rtmpdump --swfhash "123456..." --swfsize 987...
Reply With Quote
  #8  
Old 08-13-2009, 03:34 AM
rtmpe rtmpe is offline
Junior Member
 
Join Date: Feb 2009
Posts: 10
rtmpe is on a distinguished road
Default

Re: How do you use rtmp dump?


For rtmpdump users,
New RTMPE and SWF Auth method was released from Adobe.

Does anyone can get this hyper protected flv by using rtmpdump ?
www.dai2ntv.jp: How to download RTMPE stream with SWF Authentication (Adobe Flash)
Reply With Quote
  #9  
Old 01-09-2010, 04:47 AM
any ANONYMOUS forum user any ANONYMOUS forum user is offline
any user of the forum who preferred to post anonymously
 
Join Date: Aug 2011
Location: Server of stream-recorder.com
Posts: 211
any ANONYMOUS forum user is on a distinguished road
Default

Re: How do you use rtmp dump (rtmpdump tutorials)?


How to download flash video RTMP/RTMPE streams with freeware rtmpdump and URL Snooper.
  1. Start URL Snooper select the the "General Options" tab and click "Auto Determine Network Adapter Now" or choose the Network Adapter manually.



  2. Select the "Search" tab and paste the url to your video page at the bottom. Then press the "Download" button.
  3. Search for RTMP or RTMPE in the "Protocol" column.
  4. Right click on the URL and select "Copy selected URL (Strip all args)".



    If you don't find any RTMP streams then click on the "Sniff Network" button in the URL Snooper and start playing your video stream in your browser. Wait until you see an RTMP link.
  5. After you copying the RTMP/RTMPE URL, use the RTMPDump command line tool. Download rtmpdump.exe and save it into the C:\rtmpdump folder, for example. Then start the "Command Prompt" (Start->Programs->Accessories->Command Prompt) and in the command line type:
    Code:
    "C:\rtmpdump\rtmpdump.exe" -r "rtmpe://fl11.c90909.cdn.qbrick.com/90909/_definst_/kluster/20091027/geose_PG-1131239-010A-TRUEBLOOD1" -o "c:\downloads\video.flv"
    and replace the "rtpme://"-stream with the one you copied from URLSnooper. Right click in the command prompt to Paste.



  6. If it works, RTMPDump will start downloading the RTMP/RTMPE video stream and will save it as "c:\downloads\video.flv"



Please note that RTMP/RTMPE streams that use SWF Verification are supported by rtmpdump, but you need to provide some additional parameters.

Related:
FLV Players: How to play captured .FLV videos
Reply With Quote
  #10  
Old 01-15-2010, 07:51 AM
Stream Recorder
 
Posts: n/a
Default

Re: How do you use rtmp dump (rtmpdump tutorials)?


rtmpdump 2.1 parameters
Code:
--help|-h               Prints this help screen.
--rtmp|-r url           URL (e.g. rtmp//hotname[:port]/path)
--host|-n hostname      Overrides the hostname in the rtmp url
--port|-c port          Overrides the port in the rtmp url
--socks|-S host:port    Use the specified SOCKS proxy
--protocol|-l           Overrides the protocol in the rtmp url (0 - RTMP, 3 - RTMPE)
--playpath|-y           Overrides the playpath parsed from rtmp url
--swfUrl|-s url         URL to player swf file
--tcUrl|-t url          URL to played stream (default: "rtmp://host[:port]/app")
--pageUrl|-p url        Web URL of played programme
--app|-a app            Name of player used
--swfhash|-w hexstring  SHA256 hash of the decompressed SWF file (32 bytes)
--swfsize|-x num        Size of the decompressed SWF file, required for SWFVerification
--swfVfy|-W url         URL to player swf file, compute hash/size automatically
--auth|-u string        Authentication string to be appended to the connect string
--flashVer|-f string    Flash version string (default: "LNX 10,0,22,87")
--live|-v               Save a live stream, no --resume (seeking) of live streams possible
--subscribe|-d string   Stream name to subscribe to (otherwise defaults to playpath if live is specifed)
--flv|-o string         FLV output file name, if the file name is - print stream to stdout
--resume|-e             Resume a partial RTMP download
--timeout|-m num        Timeout connection num seconds (default: 120)
--start|-A num          Start at num seconds into stream (not valid when using --live)
--stop|-B num           Stop at num seconds into stream
--token|-T key          Key for SecureToken response
--hashes|-#             Display progress with hashes, not with the byte counter
--buffer|-b             Buffer time in milliseconds (default: 36000000), this option makes only sense in stdout mode (-o -)
--skip|-k num           Skip num keyframes when looking for last keyframe to resume from. Useful if resume fails (default: 0)

--quiet|-q              Supresses all command output.
--verbose|-V            Verbose command output.
--debug|-z              Debug level command output.
If you don't pass parameters for swfUrl, pageUrl, app or auth these propertiews will not be included in the connect packet.

SWF Verification and rtmpdump 2.1
Unlike previous versions, rtmpdump 2.1 can compute hash/size of an SWF player automatically. You don't need to download the player, unpack it and compute its hash anymore. Just provide the URL to the SWF player by using the -W parameter:
Code:
--swfVfy|-W url         URL to player swf file, compute hash/size automatically
Reply With Quote
Reply Post New Thread
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 01:30 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons