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 01-03-2011, 05:21 PM
jcj2002 jcj2002 is offline
Junior Member
 
Join Date: Dec 2010
Posts: 10
jcj2002 is on a distinguished road
Default

How to use RTMPdump on Mac OS X


RTMPDump is a very powerful software to download/capture Flash streams. It’s incredibly useful for sites that don’t let you download Flash videos for offline usage. And you know what, it’s free to use (GPLv2)! RTMPDump is command line only though so if you’re looking for a nice user interface, RTMPDump may not be for you.

If you want to use the latest version of RTMPDump you need to compile it on the Mac as there’s no official version provided for Mac OS X. Compiling RTMPDump is pretty easy even though you need to modify a Makefile in order to build the binary. You also need a build environment like Apple Xcode. If you decide to download my binary of RTMPDump you can skip the next section about compiling it. The RTMPDump binary runs pretty well on Snow Leopard 10.6.4 but may not do so on earlier version of Mac OS X.

Compiling RTMPDump
  1. Download and extract the latest RTMPDump source tarball, open a Terminal window and cd to the directory you just extracted the sources, i.e. ./rtmpdump-2.3
  2. We need to make a small change in the Makefile in the ./librtmp directory, so you need to cd into that directory
  3. Edit Makefile in ./librtmp and replace -soname with -dylib_install_name
  4. cd ..
  5. sudo make install SYS=posix
Depending on the version you compile, the compilation output will look something like this:
Code:
Jans-Mac-Pro:rtmpdump-2.3 jan$ make SYS=posix
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c -o rtmp.o rtmp.c
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c -o log.o log.c
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c -o amf.o amf.c
In file included from amf.c:33:
bytes.h:74:2: warning: #warning "Float word order not defined, assuming the same as byte order!"
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c -o hashswf.o hashswf.c
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL  -O2 -fPIC   -c -o parseurl.o parseurl.c
ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
gcc -shared -Wl,-dylib_install_name,librtmp.so.0  -o librtmp.so.0 rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz
ln -sf librtmp.so.0 librtmp.so
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpdump.o rtmpdump.c
gcc -Wall  rtmpdump.o librtmp/librtmp.a  -o rtmpdump -lssl -lcrypto -lz
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpgw.o rtmpgw.c
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o thread.o thread.c
gcc -Wall  rtmpgw.o thread.o librtmp/librtmp.a  -o rtmpgw -lpthread -lssl -lcrypto -lz
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpsrv.o rtmpsrv.c
gcc -Wall  rtmpsrv.o thread.o librtmp/librtmp.a  -o rtmpsrv -lpthread -lssl -lcrypto -lz
gcc -Wall   -DRTMPDUMP_VERSION=\"v2.3\"   -O2   -c -o rtmpsuck.o rtmpsuck.c
gcc -Wall  rtmpsuck.o thread.o librtmp/librtmp.a  -o rtmpsuck -lpthread -lssl -lcrypto -lz
Now there should be a rtmpdump executable in your /usr/local/bin directory.

Using RTMPdump

Let's say you want to download one of the free promo tutorials from Kelbytraining.com for offline viewing. The following command stores Joe McNally’s Elinchrom Quadra sample directly on your desktop:
Code:
./rtmpdump -r "rtmpe://flashmedia.kelbymediagroup.com/vod/mp4:promos/mcnally_quadra/day1.flv" -W "http://media.kelbymediagroup.com/players/player-4.6-licensed.swf" -o $HOME/Desktop/mcnally_quadra.flv
 
RTMPDump v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:   duration              251.75
INFO:   width                 852.00
INFO:   height                480.00
INFO:   videodatarate         768.00
INFO:   canSeekToEnd          TRUE
INFO:   videocodecid          4.00
INFO:   audiodatarate         64.00
INFO:   audiocodecid          2.00
INFO:   framerate             12.00
INFO:   creationdate          Thu Apr 08 17:17:38 2010
INFO:   Encoded_By            Paul Wilder
INFO:   Encoded_By            Sorenson Squeeze
INFO:   Encoded_With          Sorenson Squeeze
6174.913 kB / 251.67 sec (99.9%)
Download complete
By the way, on some sites RTMP stream URLs are pretty well hidden and it can be quite a challenge to find them.
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 09:26 PM.


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