PDA

View Full Version : rtmpdump - freeware RTMP stream downloader (MacOS X, Linux, Windows)


Stream Recorder
04-08-2009, 07:13 PM
rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) - freeware CLI application (Mac OS X, Linux, Windows). It allows you to dump RTMP streams onto your hard drive.


I had to start the program several times using "--resume" option:
rtmpdump -r "rtmp://host.com/dir/file.flv" -o filename.flv --resume
when I saw errors like the following one:
DEBUG: Checked keyframe successfully!
DEBUG: Found keyframe with resume-keyframe timestamp!
ERROR: ReadN, RTMP recv error 10060
ERROR: ReadPacket, failed to read RTMP packet header
WARNING: Download may be incomplete, try --resume!
Closing connection... done!



See also:
Software and services for helping to download videos with rtmpdump
How to use RTMPDump? - rtmp dump tutorials
Where can I download the latest version of rtmpdump (source + binaries)?
GUI's for rtmpsrv/rtmpdump : Rtmp Explorer, ...
RTMPDump - how do I compile source code in Linux like Ubuntu?
RTMP Flash stream recorders (http://all-streaming-media.com/record-video-stream/record-streaming-video-Adobe-Flash-FLV-videos.htm).

any ANONYMOUS forum user
06-02-2009, 05:38 AM
The author of rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) has received a DMCA removal request via Sourceforge for rtmpdump which is was hosted by them. Adobe continues to fight with the developers of programs supporting secure RTMP measures. This is rather curious because Adobe could introduce stronger protection or DRM instead. And this is very stupid, because rtmpdump was an open source project and many people downloaded the latest source code supporting RTMPE and SWF verification which means that there will be more and more stream recorders supporting secure RTMP measures. At least lawyers occupied by Adobe should be happy :D

The program is hosted by many web-sites so download your copy of the latest version of rtmpdump, because most probably it will be available on bittorrent trackers and file download web-sites only.

p.s. I always wonder why big companies like Adobe do stupid and futile things like that.

Milardo
06-10-2009, 01:35 PM
Does anybody know how to correctly use rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) in windows? Please reply with stepbystep directions maybe even using the rtmpe code from the following youtube video
HX0SI4Vf-E4

I've tried to use it but I haven't been successful in using it.

By the way, does anybody have the last version of rtmpdump for windows? Thanks in advance.

noob2001204
06-16-2009, 11:59 PM
i'm using rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm)

besides rtmp:// stream URL, what about the data needed...?
swfurl,tcurl,pageurl...?
are they needed to download the stream?
also,i tried several streams,but they all failed

Stream Recorder
06-17-2009, 12:14 AM
i'm using rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm)

besides rtmp:// stream URL, what about the data needed...?
swfurl,tcurl,pageurl...?
are they needed to download the stream?
also,i tried several streams,but they all failed

Do you use rtmpdump 1.6 for Windows?

Could you please post some URLs that rtmpdump wasn't able to download?

rtmpdump is not the best rtmp:// downloader
With the --resume switch I can continue the capturing, but only with errors ....
And then it stops again... So I had to manually resume the capturing about 10-15 times, resulting in corrupt stream data, where the download sessions begin and end.
VLC player can still play the output file, but with audio/video artefacts every few seconds ...

noob2001204
06-17-2009, 12:18 AM
i tried some live stream,such as justin.tv,cams.com,cam4.com,livejasmin.com,etc
but rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) failed to capture all of them

but i know rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) 1.6 is able to capture live stream
also,i cant get most of normal rtmp video streams

Stream Recorder
06-17-2009, 12:46 AM
i tried some live stream,such as justin.tv,cams.com,cam4.com,livejasmin.com,etc
but rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) failed to capture all of them
Live streams are harder to record. Sometimes I have problems with them even when using my favorite Replay Media Catcher (http://all-streaming-media.com/record-video-stream/Replay-Media-Catcher-HTTP-RTMP-FLV-MP3-ripper-recorder.htm) and Jaksta (http://all-streaming-media.com/record-video-stream/Jaksta-Streaming-Media%20Recorder-and-Converter.htm).

Stream Recorder
06-17-2009, 07:36 AM
what about the data needed...?
swfurl,tcurl,pageurl...? are they needed to download the stream?
from rtmpdump help
--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

If you don't pass parameters for swfUrl, pageUrl, app or auth these properties will not be included in the connect packet.

flysub
06-17-2009, 09:50 AM
I just trying to download from a website with rtmpe and swf verification and i received the following :

"warning: handleping: Ignoring swfvrification request, use --swfhash and swfzise! "
"failed to play stream not found"

the strange is for others website it's working

any ideas??

Stream Recorder
06-19-2009, 07:50 AM
I just trying to download from a website with rtmpe and swf verification and i received the following :

"warning: handleping: Ignoring swfvrification request, use --swfhash and swfzise! "
"failed to play stream not found"

the strange is for others website it's working

any ideas??

According to rtmpdump 1.6 readme by Andrej Stepanchuk:
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...

lester
06-21-2009, 12:40 AM
despite its limitations--the worst being typing "resume" every few seconds to continue downloading--this little program is the only one out of many that's been able to download rtmpe streams. ;)

Stream Recorder
06-21-2009, 11:17 PM
Batch file using rtmpdump 1.4 or 1.5 for downloading from ABC iView (by sge)
@ECHO OFF
setlocal ENABLEDELAYEDEXPANSION

::Change to 1.5 if you have problems
SET RTMPVER=1.4
SET USEPROXY=OFF

::Much better than other methods of downloading though.
::Connects to ABC servers to retrieve a authentication token (which is part of the streams URI)
::Select a channel, then retrieves possible episodes from it.
::Follow the prompts and it should download.

CLS
ECHO.
ECHO ABC iView Downloader by sge
ECHO This script simplifies the process of downloading streams off ABC iView.
ECHO.

ECHO Removing any existing temp files... old authentication tokens... old channel list...
ECHO.
:Start
If exist authenticationtoken.xml del authenticationtoken.xml
If exist channel.xml del channel.xml
SET TOKEN=
SET HOST=
SET ISP=
SET FREE=
SET DOWNLOADER=
SET Choice=
SET DLPATH=
SET TEMPFILENAME=
SET FILENAME=
set LINE=
set LINEOFSHOW=
set SHOW=
set ANSWER=

:RetrieveToken
ECHO.
::No more IP geoblocking now even our friends from overseas can download videos/watch ABC iView. Just enter a proxy in Australia. Uses a Akamai token, but it makes no difference here.
::There isn't much point, but someone will use it.... I bet there is a aussie expat somewhere, that need their fix of Gardening Australia and will thank me :P)
if /i {%USEPROXY%}=={ON} (
ECHO BEWARE OF POTENTIAL PROXY
set http_proxy=114.127.246.36:8080
)
ECHO Using wget to retrieve an XML file from ABC's servers...
ECHO.
::wget.exe -O authenticationtoken.xml http://www2b.abc.net.au/iView/Services/iViewHandshaker.asmx/isp
::Fixed IP.
wget.exe -O authenticationtoken.xml http://202.125.43.119/iview.asmx/isp
ECHO.

ECHO Parsing XML... Retrieving Authentication Token...
for /f "tokens=3 delims=<>" %%a in ('type authenticationtoken.xml ^| find "<token>"') do set TOKEN=%%a
for /f "tokens=3 delims=<>" %%a in ('type authenticationtoken.xml ^| find "<host>"') do set HOST=%%a
for /f "tokens=3 delims=<>" %%a in ('type authenticationtoken.xml ^| find "<isp>"') do set ISP=%%a
for /f "tokens=3 delims=<>" %%a in ('type authenticationtoken.xml ^| find "<free>"') do set FREE=%%a
if /i {%HOST%}=={Akamai} (set DOWNLOADER=alt)

ECHO.
ECHO Authentication token recived from ABC: "%TOKEN%"
ECHO You are using iView host: "%host%" through ISP: "%ISP%"
ECHO.
if /i {%FREE%}=={no} (
ECHO iView is NOT unmetered on your connection. Beware.
)

if /i {%DOWNLOADER%}=={alt} goto :AkamaiToken
IF NOT {%DOWNLOADER%}=={alt} goto :RegularToken
:AkamaiToken
ECHO.
ECHO Your host: %host% uses a different style authentication token.
ECHO You need to do another step.
ECHO.
ECHO Attempting to parse Akamai authentication token...
ECHO.
for /f "usebackq tokens=3 delims=<>" %%a in (`type authenticationtoken.xml ^| find "<token>"`) do echo %%a>token.tmp
for /f "usebackq tokens=1,3 delims=&;" %%a in (`more token.tmp`) do set token=%%a^&%%b
del /q token.tmp
ECHO Parsed authentication token: "%token%"
ECHO.
pause
goto :ChannelPick

:RegularToken
ECHO Your host: "%host%" with authentication: "%TOKEN%" uses the regular downloading command.
ECHO.
pause
goto :ChannelPick

:ChannelPick
CLS
ECHO Which channel do you wish to browse:
ECHO.
ECHO A. Catchup (Recent ABC TV)
ECHO.
ECHO B. News
ECHO.
ECHO C. Arts
ECHO.
ECHO D. Shop (Preview ABC shows)
ECHO.
ECHO E. Docs
ECHO.
ECHO F. The Australia Network (English educational materials)
ECHO.
ECHO G. New Stuff (Recent Kids Shows)
ECHO.
ECHO H. Kazam (Action animation for all ages)
ECHO.
ECHO I. Faves (Great Australian drama series)
ECHO.

ECHO Z. Manually enter path
ECHO.
ECHO.

SET /P Choice=Type the letter and press Enter:
:: The syntax in the next line extracts the substring starting at 0 (the beginning) and 1 character long
IF NOT '%Choice%'=='' SET Choice=%Choice:~0,1%
ECHO.
IF /I '%Choice%'=='A' SET URL=http://www.abc.net.au/playback/xml/input/catchup.xml
IF /I '%Choice%'=='B' SET URL=http://www.abc.net.au/playback/xml/input/news.xml
IF /I '%Choice%'=='C' SET URL=http://www.abc.net.au/playback/xml/input/arts.xml
IF /I '%Choice%'=='D' SET URL=http://www.abc.net.au/iview/xml/shop.xml
IF /I '%Choice%'=='E' SET URL=http://www.abc.net.au/playback/xml/input/docs.xml
IF /I '%Choice%'=='F' SET URL=http://www.abc.net.au/playback/xml/input/australianetwork.xml
IF /I '%Choice%'=='G' SET URL=http://www.abc.net.au/playback/xml/input/newstuff.xml
IF /I '%Choice%'=='H' SET URL=http://www.abc.net.au/playback/xml/input/kazam.xml
IF /I '%Choice%'=='I' SET URL=http://www.abc.net.au/playback/xml/input/faves.xml
IF /I '%Choice%'=='Z' GOTO ManualDLPATH
ECHO.
ECHO.

If exist PossibleShowsTEMP del PossibleShowsTEMP
wget.exe -O channel.xml %URL%
ECHO.
ECHO.
ECHO Possible Shows to download are:
ECHO.

::Parsing channel.xml... Echoing shows on screen in format "LINE. SHOW"... Outputting batch friendly show list...
for /f "tokens=3 delims=<>" %%a in ('type channel.xml ^| find "<url>"') do (
set /A LINE=!LINE! + 1
echo !line!. %%a
echo [!LINE!]%%a[/!LINE!] >> PossibleShowsTEMP
)

if /i {%CHOICE%}=={Z} goto :ManualDLPATH
IF NOT {%CHOICE%}=={Z} goto :AutoDLPATH
:ManualDLPATH
ECHO.
ECHO Manually enter download path
ECHO.
ECHO You must get the paths from iView XML (links in the batch file) or from PossibleShowsTEMP
ECHO.
set /p DLPATH=Enter path to download. For Example: catch_up/chaser_09_03_01 (WITHOUT the .flv part):
ECHO.
ECHO You entered: "%DLPATH%"
ECHO.
:ChooseOutput
set /p FILENAME=Enter Filename to Output:
ECHO You typed: "%FILENAME%"
ECHO.
pause
goto :WhichDownloader

:AutoDLPATH
ECHO.
set /p LINEOFSHOW=Which show do you wish to download (Enter number ONLY)
for /f "tokens=2 delims=[]." %%a in ('type PossibleShowsTEMP ^| find "[%LINEOFSHOW%]"') do set DLPATH=%%a
ECHO.
ECHO Episode Found: %DLPATH%
ECHO.
::Gets a filename from the download path
set TEMPFILENAME=%DLPATH%.flv
for /f "tokens=2 delims=/" %%I in ('echo %TEMPFILENAME% ^| find "/"') do (
set FILENAME=%%I
)
ECHO Output Filename: %FILENAME%
ECHO.
pause

:WhichDownloader
if /i {%DOWNLOADER%}=={alt} goto :AlternativeDownloadCommand
IF NOT {%DOWNLOADER%}=={alt} goto :RegularDownloadCommand

:AlternativeDownloadCommand
CLS
ECHO You are using the alternative downloader:
ECHO.
ECHO Ok, you will be requesting "%DLPATH%" using the authentication token "%TOKEN%" from ABC iView servers and saving the stream with the filename "%FILENAME%" using the alternative download command with RTMPdump%RTMPver%.
ECHO.
pause
ECHO.
rtmpdump-WIN32-%RTMPVER%.exe -r rtmp://cp53909.edgefcs.net////flash/playback/_definst_/%DLPATH% -t rtmp://cp53909.edgefcs.net/ondemand?auth="%TOKEN%" -o "%FILENAME%"
goto EndMessage

:RegularDownloadCommand
CLS
ECHO You are using the regular downloader:
ECHO.
ECHO Ok, you will be requesting "%DLPATH%" using the authentication token "%TOKEN%"
ECHO from ABC iView servers and saving the stream with the filename "%FILENAME%"
ECHO Using the regular download command with RTMPdump%RTMPver%.
ECHO.
pause
ECHO.
rtmpdump-WIN32-%RTMPVER%.exe -r rtmp://203.18.195.10/ondemand?auth="%TOKEN%" -y %DLPATH% -o "%FILENAME%"
goto :EndMessage

:EndMessage
ECHO If all went well, "%DLPATH%.flv" should have been downloaded as "%FILENAME%"
ECHO It can be played with VLC
ECHO You must force 16:9 aspect or it looks squished
ECHO.
ECHO If the download didn't begin, try another stream.
ECHO.
SET /P ANSWER=Do you wish to download another file? (Y/N)?
echo You chose: %ANSWER%
if /i {%ANSWER%}=={y} (goto :Start)
if /i {%ANSWER%}=={yes} (goto :Start)
goto :CleanUp

:CleanUp
ECHO.
ECHO Removing temp files...
If exist authenticationtoken.xml del authenticationtoken.xml
If exist channel.xml del channel.xml
ECHO.
ECHO Done! Quitting...
pause

compn
07-19-2009, 06:22 PM
Now generate the hash
$ openssl sha -sha256 -hmac "Genuine Adobe Flash Player001" file.swf

does the hash come from the decompressed swf or the original swf?

any ANONYMOUS forum user
07-20-2009, 11:59 AM
does the hash come from the decompressed swf or the original swf?


You need a software called flasm

flasm -x file.swf

borboleta
07-20-2009, 05:36 PM
Thanks for the info, I have Flasm and OpenSSL applications installed. Now, My problem is with RTMPE downloads from Hulu. All the sniffers I use are not detecting any RTMP and RTMPE links to be used by RTMPDUMP.It tseems they went to a Hulu version 3, I see lots of http entries and xml tags. Any help is appreciated.

any ANONYMOUS forum user
07-21-2009, 01:32 AM
Thanks for the info, I have Flasm and OpenSSL applications installed. Now, My problem is with RTMPE downloads from Hulu. All the sniffers I use are not detecting any RTMP and RTMPE links to be used by RTMPDUMP.It tseems they went to a Hulu version 3, I see lots of http entries and xml tags. Any help is appreciated.
How to find RTMPE stream URLs

rookie
08-24-2009, 05:10 AM
can someone please help me? I get the error:

problem accessing the DNS. (addr: cp534.edgefcs.net)
Failed to connect!

I'm trying to download the following url using this command:

rtmpdump\1.6.exe rtmpdump -r "rtmpe://cp534.edgefcs.net/ondemand/mtvnorigin/gsp.vhonecomstor/vh1.com/shows/for_the_love_of_ray_j/vh_rt163716_ftlorj_109_hl_s1_640x480_1600.mp4" -o 9pt1.flv

But it's not able to download! because of the error of course. I tried to use the resume fuction AND even PLAY the video while trying to download (not a live stream) here is the vh1 url if someone is able to help:

http://www.vh1.com/video/play.jhtml?id=1608134

I got the rtmpe url from urlsnooper, thanks SOO much if anyone is able to help!! :D

ps - I tried the resume fuction as well and same error yet again occured..

Stream Recorder
08-24-2009, 10:17 AM
rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) seems to be a very good program, but for whatever reason I haven't seen any decent tutorials for it. It so hard to use it.

Also there are other RTMPE recorders. Some of them are GUI applications, so they may be much easier to use.

Sam123
08-30-2009, 09:50 AM
Hey guys,
it seems like I've got what I wanted and tried the rtmpe url I was trying to dump. No luck there -- it's not surprising because Adobe has been working hard to get rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) erased from history.

Stream Recorder
08-30-2009, 11:13 PM
Hey guys,
it seems like I've got what I wanted and tried the rtmpe url I was trying to dump. No luck there -- it's not surprising because Adobe has been working hard to get rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) erased from history.

Try GUI RTMPE recorders. The major problem with rtmpdump is that it is very hard to provide all the necessary parameters correctly.

filou
09-30-2009, 06:56 AM
hi :)

i cant download rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) here is it possible to have a link for windows???

Stream Recorder
09-30-2009, 07:05 AM
i cant download rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) here is it possible to have a link for windows???
Where can I download rtmpdump.exe 1.6 (Windows, Linux, Mac OS) with source code

Stream Recorder
11-17-2009, 07:08 AM
rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) 1.9 is available. And it is hosted by mplayer. I wonder whether it has any RTMPE support or not.

tdselgas
11-21-2009, 01:49 PM
To compile rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) v 1.9 on Mac OSX 10.6 Snow Leopard you will need to do the following:
1) Install Xcode 3.2 from the Snow Leopard Installation DVD
2) Edit the "streams.cpp" file in the "rtmpdump-1.9" folder by replacing all (two) occurrences of "MSG_NOSIGNAL" with "SO_NOSIGPIPE".

You can now run the command: "make osx" and successfully compile the rtmpdump file :)

DJGreenleaf
12-01-2009, 03:28 AM
I've been ripping RTMPE .mp4s/.flvs with RTMPdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) for a couple of days, since I've figured out how. I ripped the Ray J. video that was mentioned by rookie earlier in the thread. If you need any proof of the skills, PM me. I can help, just let me know what you need.

compn
12-02-2009, 06:24 AM
here is a simple rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) howto for Ubuntu 9.10:
Compiling rtmpdump and downloading RTMP Flash media with rtmpdump (Ubuntu 9.10) (http://constantcuriousity.blogspot.com/2009/11/downloading-rtmp-flash-media-with.html)

Stream Recorder
12-02-2009, 06:58 AM
here is a simple rtmpdump (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) howto for Ubuntu 9.10:
Compiling rtmpdump and downloading RTMP Flash media with rtmpdump (Ubuntu 9.10) (http://constantcuriousity.blogspot.com/2009/11/downloading-rtmp-flash-media-with.html)


Great tutorial!

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 (http://all-streaming-media.com/record-video-stream/rtmpdump-freeware-console-RTMP-downloading-application.htm) ...

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 (http://linuxcentre.net/getiplayer/download) 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 (http://www.ubuntu.com/) 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.
sudo apt-get install build-essential gcc make subversion libssl0.9.8 libssl-dev libssl0.9.8Now check out the latest code from the Subversion (http://subversion.tigris.org/) repository:
svn co svn://svn.mplayerhq.hu/rtmpdump rtmpdumpIf you prefer a stable version, run this instead:
wget http://rtmpdump.mplayerhq.hu/rtmpdump-1.9.tgz
tar xfz rtmpdump-1.9.tgz
mv rtmpdump-1.9 rtmpdumpI'm sure the impatient are looking forward to completing this ASAP so here's the final step in setting up rtmpdump on your computer:
cd rtmpdump
make linuxThe 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 (http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol) 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 (http://videolectures.net/bootcamp07_keller_bss/). 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 (http://lists.mplayerhq.hu/pipermail/rtmpdump/2009-November/000053.html).

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:
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!
./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 ffa4f0c469cfbe1f449ec42462e8c3ba16600f5a4b311980bb 626893ca81f388 -x 53910 -o test.flvThe -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 (http://en.wikipedia.org/wiki/Hash_function) and size in bytes. So lets get them:
wget http://media.videolectures.net/jw-player/player.swf
sha256sum player.swf
ls -l player.swfSupply 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:
For anyone curious, I found that wisevid is using plain RTMP with SWF
verification.

This invocation works for me:

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

<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> But for the same site there's very little extra work.

Hope you lasted this long, be seeing ya!

any ANONYMOUS forum user
12-16-2009, 10:57 PM
In simple cases you should not need to use the -a option; rtmpdump ought to parse the application name out of the rtmp url itself. Sometimes it gets it wrong though, especially with the more obfuscated sites.

helpdeskdan
12-24-2009, 11:17 PM
Thanks for the guide, the referenced blog is already taken down. Too bad there are not more guides and scripts.

compn
12-25-2009, 04:31 AM
it moved here: http://constcuriosity.blogspot.com/2009/11/downloading-rtmp-flash-media-with.html

guardianx
12-27-2009, 12:45 AM
well the website make things ez because everything is out in the open..

marsm
09-16-2010, 08:21 AM
I've been trying to compile the latest version of RTMP in Centos, 64-bit... keep getting errors - can someone please point me in the right direction...

I type in make sys-linux

I then get this back:

# make sys=linux
make[1]: Entering directory `/rtmpdump/librtmp'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/rtmpdump/librtmp'
gcc -Wall -o rtmpgw rtmpgw.o thread.o -Llibrtmp -lrtmp -lssl -lcrypto -lz
thread.o: In function `ThreadCreate':
thread.c:(.text+0x46): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
make: *** [rtmpgw] Error 1

Any help would be massively appreciated.

marsm
09-16-2010, 08:23 AM
PS - I've also done this:

# make linux
make: *** No rule to make target `linux'. Stop.

helpdeskdan
09-17-2010, 08:33 PM
Not sure why you're posting here; this thread hasn't had any posts since last year.

$ less README:

$ make SYS=posix

Stream Recorder
03-25-2011, 12:18 PM
Version History:

30 June 2010, v2.3
- fix RC4 cleanup for GnuTLS/gcrypt
- declare RTMP_Write buf as const
- cleanup Makefile
- replace all use of bool with int
- add RTMP_Socket() and RTMP_Pause() APIs
- add ping/pong message handling
- add basic shared library support
- fix RTMP_ParseURL extension skipping
- fix bad switch() from -r477 in RTMP_Read
- fix rtmpsrv to always use .flv extension on output
- fix crash on socket failure while RTMP_Read() is reading header
- fix RTMP_ReadPacket signed/unsigned chars for m_nChannel
- license cleanup, use current FSF address
- fix RTMP_SetupURL tcUrl generation
- ignore multiple spaces between URL options
- only send CheckBW request once per session

29 May 2010, v2.2e
- port to Xbox
- add explicit URL scheme for rtmpts
- fix rtmpt clientID NUL-termination
- use BufferEmpty trick in rtmpdump but not by default in librtmp
- add librtmp manpage
- fix RTMP_Read, return 0 on EOF, not -1
- change RTMP_Read to return 1 packet at a time, fix buffer mgmt
- fix request/result queue, fix server compatibility for Publishing
- add RTMP_EnableWrite to enable Publishing

29 April 2010, v2.2d
- add RTMP_Alloc, RTMP_Free APIs
- add optional support for polarssl instead of OpenSSL
- add option to build crypto support without SSL/TLS
- tweak handshake offset checking
- add RTMP set_playlist command
- check for (and fix) broken timestamps in FLV packets
- fix tcUrl and playpath parsing in rtmpsrv and rtmpsuck
- change internal boolean flags to bitmasks

14 April 2010, v2.2c
- internal restructuring, fix #undef CRYPTO builds
- add RTMP_SetupURL, RTMP_SetOpt APIs
- add logging callback

22 March 2010, v2.2b
- fix v2.2a crashes in rtmpsrv/rtmpsuck
- fix v2.2a .swfinfo location on Windows
- fix typo for --auth parameter in manpages
- add FP10 handshake support for rtmpsrv/rtmpsuck
- avoid GNUMake vs BSDMake incompatibilities
- add pkgconfig file for librtmp
- more library cleanup

20 March 2010, v2.2a
- fix C++ compatibility for librtmp
- misc library restructuring
- add client support for tunneling: rtmpt, rtmpte, rtmps
- fix rtmpdump/rtmpgw FLV header dataType
- implement RTMP_Read() and RTMP_Write() to simplify library use
- fix SendPacket timestamps
- add optional support for GnuTLS/Gcrypt instead of OpenSSL
- use $HOMEPATH on Windows instead of $HOME for .swfinfo

4 March 2010, v2.2
- move RTMP code into library librtmp
- relicense RTMP code under LGPL v2.1
- add rtmpdump manpage
- fix AMF_LONG_STRING handling
- more FlashPlayer 10 handshake support
- in rtmpsrv fix Play Start/Stop messages
- rename "streams" program to "rtmpgw"

20 February 2010, v2.1d
- extend .swfinfo file format, add --swfAge rtmpdump parameter
old file should be replaced or manually updated: copy the
"date:" line and rename it to "ctim:"

- fix MacOSX builds - just use "make posix" now for all Unix-derived systems
- more explicit error checks in HTTP_get()
- in rtmpsrv spawn rtmpdump automatically
- fix bug in retry/resume of audio-only streams
- other minor misc. fixes

9 January 2010, v2.1c
- cleanup rtmpsrv output
- fix crash in 2.1b hashswf
- fix parseurl to url-decode PlayPath
- fix parseurl to recognize extensions followed by URL params
- fix Makefile, inadvertently dropped 'v' from version string
- in rtmpdump try Reconnect if ToggleStream doesn't work on timeouts
- in rtmpsuck use chunk-based I/O for better latency
- in rtmpsuck support lists of streams
- in rtmpsuck use raw client connect packet to workaround unsupported features
- support arbitrary AMF data appended to connect requests

4 January 2010, v2.1b
- fix url matching in .swfinfo lookup
- fix resume parsing in rtmpdump
- minor code cleanup (CRYPTO dependencies, logging)
- add getStreamLength recognition to rtmpsrv
- add close processing in rtmpsuck

1 January 2010, v2.1a
- fix socket receive timeouts for WIN32
- add streams description to README

29 December 2009, v2.1
- AMF cleanup: bounds checking for all encoders, moved AMF_EncodeNamed* from rtmp.c
- added SecureToken support
- added automatic SWF hash calculation
- added server-side handshake processing
- added rtmpsrv stub server example
- added rtmpsuck proxy server
- tweaks for logging
- renamed more functions to cleanup namespace for library use
- tweaks for server operation: objectEncoding, chunksize changes

16 December 2009, v2.0
- rewrote everything else in C, reorganized to make it usable again as a library
- fixed more portability bugs
- plugged memory leaks

2 December 2009, v1.9a
- fix auth string typo
- handle FCUnsubscribe message
- don't try retry on live streams
- SIGPIPE portability fix
- remove "not supported" comment for RTMPE

13 November 2009, v1.9
- Handle more signals to reduce risk of unresumable/corrupted partially streamed files
- Fixed >2GB file handling
- Added --hashes option for a hash progress bar instead of byte counter
- Fix to allow win32 to use binary mode on stdout.
- Added auto-unpause for buffer-limited streams

1 November 2009, v1.7

- added --subscribe option for subscribing to a stream
- added --start / --stop options for specifying endpoints of a stream
- added --debug / --quiet / --verbose options for controlling output

- added SOCKS4 support (by Monsieur Video)

- restructured to support auto-restart of timed-out streams

- rewritten byteswapping, works on all platforms

- fixed errors in command / result parsing

- support functions rewritten in C to avoid g++ compiler bugs on ARM

- support for 65600 channels instead of just 64

- fixed signature buffer overruns

17 May 2009, v1.6

- big endian alignment fix, should fix sparc64 and others

- moved timestamp handling into RTMP protocol innings, all packets have
absolute timestamps now, when seeking the stream will start with timestamp 0
even if seeked to a later position!

- fixed a timestamp bug (should fix async audio/video problems)

30 Apr 2009, v1.5a

- fixed host name resolution bug (caused unexpected crashes if DNS resolution
was not available)

- also using the hostname in tcUrl instead of the IP turns out to give much
better results

27 Apr 2009, v1.5

- RTMPE support (tested on Adobe 3.0.2,3.0.3,3.5.1, Wowza)

- SWFVerification (tested on Adobe 3.0.2,3.0.3,3.5.1)

- added AMF3 parsing support (experimental feauture, only some primitives, no references)

- added -o - option which allows the stream to be dumped to stdout
(debug/error messages go to stderr)

- added --live option to enable download of live streams

- added support for (Free)BSD and Mac (untested, so might need more fixing,
especially for PPC/sparc64)

- fixed a bug in url parsing

- added a useful application: streams, it will start a streaming server and
using a request like http://localhost/?r=rtmp://.... you can restream the
content to your player over http

11 Mar 2009, v1.4

- fixed resume bug: when the server switches between audio/video packets and FLV
chunk packets (why should a server want to do that? some actually do!) and rtmpdump
was invoked with --resume the keyframe check prevented rtmpdump from continuing

- fixed endianness

- added win32 and arm support (you can cross-compile it onto your Windows box
or even PDA)

- removed libboost dependency, written a small parser for rtmp urls, but it is
more of a heuristic one since the rtmp urls can be ambigous in some
circumstances. The best way is to supply all prameters using the override
options like --play, --app, etc.

- fixed stream ids (from XBMC tree)

19 Jan 2009, v1.3b

- fixed segfault on Mac OS/BSDdue to times(0)

- Makefile rewritten

16 Jan 2009, v1.3a

- fixed a bug introduced in v1.3 (wrong report bytes count), downloads won't
hang anymore

10 Jan 2009, v1.3

- fixed audio only streams (rtmpdump now recognizes the stream and writes a
correct tag, audio, video, audio+video)

- improved resume function to wait till a the seek is executed by the server.
The server might send playback data before seeking, so we ignore up to e.g. 50
frames and keep waiting for a keyframe with a timestamp of zero.

- nevertheless resuming does not always work since the server sometimes
doesn't resend the keyframe, seeking in flash is unreliable

02 Jan 2009, v1.2a

- fixed non-standard rtmp urls (including characters + < > ; )

- added small script get_hulu which can download hulu.com streams (US only)
(many thanks to Richard Ablewhite for the help with hulu.com)

01 Jan 2009, v1.2:

- fixed FLV streams (support for resuming extended)

- fixed hanging download at the end

- several minor bugfixes

- changed parameter behaviour: not supplied parameters are omitted from the
connect packet, --auth is introduced (was automatically obtained from url
before, but it is possible to have an auth in the tcurl/rtmp url only without
an additional encoded string in the connect packet)

28 Dec 2008, v1.1a:

- fixed warnings, added -Wall to Makefile

28 Dec 2008, v1.1:

- fixed stucking downloads (the buffer time is set to the duration now,
so the server doesn't wait till the buffer is emptied

- added a --resume option to coninue incomplete downloads

- added support for AMF_DATE (experimental, no stream to test so far)

- fixed AMF parsing and several small bugs (works on 64bit platforms now)

24 Dec 2008, v1.0:

- First release

Pamparamtus
10-31-2011, 11:36 AM
Hello
I was trying to download a file from 4oD but I am not able to get through with it. I am entering into rtmpdump:

"C:\temp\rtmpdump.exe" -r rtmpe://ll.securestream.channel4.com/a4174/e1/mp4:xcuassets/CH4_08_02_900_51437008001001_001.mp4 -a a4174/e1/mp4:xcuassets/CH4_08_02_900_51437008001001_001.mp4 -y mp4:xcuassets/CH4_08_02_900_51437004001001_002.mp4 -p http://www.channel4.com/programmes/goks-clothes-roadshow/4od#3179371 -W http://www.channel4.com/static/programmes/asset/flash/swf/4odplayer-11.8.5.swf -v -o "C:\temp\proba.flv"

and the error msg I am getting is NetStream.Play.StreamNotFound. Am begging for help or I will have a heart attack from fighting with it...

txjohn69
05-23-2012, 05:39 AM
Is there a way to add to the rtmpdump syntax for rtmpexplorer?

I need to add the -v and -b for a download

Bahman
08-07-2012, 06:46 AM
@KSV
Why rtmpdump doesn't allow us to download a stream that is more than 4GB?:confused:
When reaches 4GB, it stops downloading!
Is there any solution for this limitation?;)

karlo2105
08-07-2012, 08:44 AM
@KSV
Why rtmpdump doesn't allow us to download a stream that is more than 4GB?:confused:
When reaches 4GB, it stops downloading!
Is there any solution for this limitation?;)

Maybe because your hard drive is FAT 32 instead of NTFS. FAT 32 doesn't support files bigger than 4 GB.

Bahman
08-07-2012, 09:28 AM
Oh my god, Who uses FAT32 nowadays?
No, My HDD is formatted as NTFS!

svnpenn
08-07-2012, 06:05 PM
Oh my god, Who uses FAT32 nowadays?
No, My HDD is formatted as NTFS!

More genius commentary from karlo2105

karlo2105
08-09-2012, 08:44 AM
Oh my god, Who uses FAT32 nowadays?
No, My HDD is formatted as NTFS!

On some laptops produced by Acer you could find hard drives formatted in FAT. I bought external hard drive two years ago (500 gb) formatted in FAT. Nowadays, all USB stick still use FAT. :D

Bahman
08-09-2012, 10:05 AM
Boy, How did you buy a formatted External HDD? It was second hand for sure! because when you buy a new one, it is raw and you must format it in order to use it! ;)
Acer is genius then! :D
You call it USB Stick, not HDD! :D
Anyway, KSV, is there any reply to my post?

karlo2105
08-23-2012, 03:30 AM
Boy, How did you buy a formatted External HDD? It was second hand for sure! because when you buy a new one, it is raw and you must format it in order to use it! ;)
Acer is genius then! :D
You call it USB Stick, not HDD! :D
Anyway, KSV, is there any reply to my post?

Trust me it was new one it was written formatted on the box.
I made differences between USB sticks and external hard drives. All I said is that USB sticks too are also formatted in FAT32.