Author Topic: Tutorial on using RTMPDump on mac  (Read 9721 times)

jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Tutorial on using RTMPDump on mac
« on: April 02, 2013, 05:07:04 PM »
(Topic says on mac, but this equally applies to windows and linux)

I just got rtmpdump working from my mac and wanted to share how to do this in my excitement. Hopefully this will result in a number of higher quality video's!

1- Download RTMPDUMP for mac. Some googling led me to the following site. Download the rtmpdump 2.4 package and install it. [not-spam://trick77.com/downloads/]

2. Find out your stream id and session key (see below if this is too techical for you). It looks like camXX_Y.stream?key=......Sexpire=....Ssign=........  You can easily find this in the source code of the page (Use 'view source' in your browser) and search for ".stream". You should be able to spot it fast. Each cam has a unique ID, so be careful about which you copy so you do not end up recording the wrong stream.

3. Open a terminal window.

4. type in the following command, but replace XXXX with your stream and sessionkey that you copied from the previous step:
Code: You are not allowed to view links. Register or Login
rtmpdump  -V -v  -l 2 -r "rtmpe://edge5.reallifecam.com/liveedge" -y "XXXXX" -o recording.flv -T "#Loi8iJu" -s "http://reallifecam.com/flowplayer.commercial-3.2.7.swf" -a "liveedge"

for example (note: this example will not work because i've replace the key with a dummy value):
Code: You are not allowed to view links. Register or Login
rtmpdump  -V -v  -l 2 -r "rtmpe://edge5.reallifecam.com/liveedge" -y "cam03_1.stream?key=ab123Sexpire=1364960755Ssign=19efeb764efe9e8f3b1d074b4e88da95" -o recording.flv -T "#Loi8iJu" -s "http://reallifecam.com/flowplayer.commercial-3.2.7.swf" -a "liveedge"

5. Press enter. A bunch of text will appear, but it should result in  a file called recording.flv in your homedir.



I've also created a handy bookmarklet which allows you to create the entire terminal command by simply clicking on a cam in the RLC website menu. (mostly because I dont like to type  :D ).

Create a new bookmark and copy/paste the following in it.
Open RLC, click on the bookmarklet. Nothing will appear to happen, but when you select a different cam, you should get a window displaying the terminal command.

If not, you did something wrong ;)

Code: You are not allowed to view links. Register or Login
javascript:jQuery(".galki-vpravo A").click( function() { alert( 'rtmpdump -v  -l 2 -r "rtmpe://edge6.reallifecam.com/liveedge" -y "$CAM" -o "$FILE.flv" -T "#Loi8iJu" -s "http://reallifecam.com/flowplayer.commercial-3.2.7.swf" -a "liveedge"'.replace(/\$CAM/g, this.href.replace("http://reallifecam.com/","") ).replace("$FILE",this.id ) ); } );


Since I don't have the funds for a RLC account myself at the moment, and I really appreciate you guys posting vids, this is my way of contributing since I am a quite technical guy. And hopefully, someday I'll be able to contribute vids as well.

Good luck with the tutorial!

w-who said that?

FN

  • Global Moderator
  • Full Member
  • *****
  • Posts: 113
  • Liked: 102
  • Karma: +1/-9
  • Gender: Male
Re: Tutorial on using RTMPDump on mac
« Reply #1 on: April 08, 2013, 12:49:48 PM »
Thanks alot for his guide. I'm using mac and currently have a VmWare windows machine to do all the sucking.

Hopefully i'll have the time soon to look into this, and i'll make sure to let you know how i did.

Id would be really awsome with something more GUI like method.
If you like watching this please sign up at reallifecam.com

pianeta5

  • Newbie
  • *
  • Posts: 37
  • Liked: 20
  • Karma: +1/-4
Re: Tutorial on using RTMPDump on mac
« Reply #2 on: April 09, 2013, 07:21:40 AM »
Thanks a lot! ... but it doesn't work for me (linux mint).... :( :( :(
It creates the recording.flv file... but with size 0 ! .... The rtmpdump immediatly exits with  ERROR: RTMP_ReadPacket, failed to read RTMP packet header
DEBUG: Closing connection.
Can you help me to fix ???
PLEASEEEEEEEEEEEE

jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Re: Tutorial on using RTMPDump on mac
« Reply #3 on: April 09, 2013, 07:42:31 AM »
You are not allowed to view links. Register or Login
Thanks a lot! ... but it doesn't work for me (linux mint).... :( :( :(
It creates the recording.flv file... but with size 0 ! .... The rtmpdump immediatly exits with  ERROR: RTMP_ReadPacket, failed to read RTMP packet header
DEBUG: Closing connection.
Can you help me to fix ???
PLEASEEEEEEEEEEEE

Make sure you type in the command exactly as specified in my post. Next, double triple-check you have the correct stream and session ID from your browser session. Do not use the example one as it won't work. Lastly, make sure the encryption token ID (#Lo...) is correct and inside quotes.

If it doesn't even make a connection, you may have a firewall issue or possibly an incompatible rtmpdump version. I have 2.4; check yours.

You can copy/paste your commandline + output here, I'll have a look.
w-who said that?

jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Re: Tutorial on using RTMPDump on mac
« Reply #4 on: April 09, 2013, 07:53:08 AM »
You are not allowed to view links. Register or Login
Thanks alot for his guide. I'm using mac and currently have a VmWare windows machine to do all the sucking.

Hopefully i'll have the time soon to look into this, and i'll make sure to let you know how i did.

Id would be really awsome with something more GUI like method.

I can look into creating an apple script for this, seems like a fun weekend project  ;D
w-who said that?

CamCaps.Net

Re: Tutorial on using RTMPDump on mac
« Reply #4 on: April 09, 2013, 07:53:08 AM »

pianeta5

  • Newbie
  • *
  • Posts: 37
  • Liked: 20
  • Karma: +1/-4
Re: Tutorial on using RTMPDump on mac
« Reply #5 on: April 09, 2013, 09:59:02 AM »
I've checked again...but still don't work... :(
Here what I put on command line and what I get :
rtmpdump  -V -v  -l 2 -r "rtmpe://edge5.reallifecam.com/liveedge" -y "cam04_1.stream?key=fda08Sexpire=1363332573Ssign=2426d69af7a0ecc567b407391109374e" -o recording.flv -T "#Loi8iJu" -s " http://reallifecam.com/flowplayer.commercial-3.2.7.swf" -a "liveedge"

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Parsing...
DEBUG: Parsed protocol: 2
DEBUG: Parsed host    : edge5.reallifecam.com
DEBUG: Parsed app     : liveedge
DEBUG: Protocol : RTMPE
DEBUG: Hostname : edge5.reallifecam.com
DEBUG: Port     : 1935
DEBUG: Playpath : cam04_1.stream?key=fda08Sexpire=1365532666Ssign=2444d69af7a0ecc271b407391109648e
DEBUG: tcUrl    : rtmpe://edge5.reallifecam.com:1935/liveedge
DEBUG: swfUrl   : http://reallifecam.com/flowplayer.commercial-3.2.7.swf" -a "liveedge"

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Parsing...
DEBUG: Parsed protocol: 2
DEBUG: Parsed host    : edge5.reallifecam.com
DEBUG: Parsed app     : liveedge
DEBUG: Protocol : RTMPE
DEBUG: Hostname : edge5.reallifecam.com
DEBUG: Port     : 1935
DEBUG: Playpath : cam04_1.stream?key=fda08Sexpire=1365532666Ssign=2444d69af7a0ecc271b407391109648e
DEBUG: tcUrl    : rtmpe://edge5.reallifecam.com:1935/liveedge
DEBUG: swfUrl   :

DEBUG: app      : liveedge
DEBUG: live     : yes
DEBUG: timeout  : 30 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Client type: 06
DEBUG: HandShake: DH pubkey position: 472
DEBUG: HandShake: Client digest offset: 1383
DEBUG: HandShake: Initial client digest:
DEBUG: e5 3a 8e ab 58 29 f5 7b bf b9 85 8b 0e a6 04 a6
DEBUG: 92 c7 92 df 1b 9a 46 f5 51 b6 6e d0 9a c0 35 58
DEBUG: HandShake: Type Answer   : 06
DEBUG: HandShake: Server Uptime : 1863678823
DEBUG: HandShake: FMS Version   : 3.0.2.1
WARNING: Trying different position for server digest!
DEBUG: HandShake: Server DH public key offset: 1302
DEBUG: HandShake: Secret key:
DEBUG: 2d 8c 15 e2 63 8d 16 09 15 3e 76 cf 21 fc af b9
DEBUG: 13 d5 d0 ed 27 3b cb 38 e7 e6 2e b1 d6 84 8f 94
DEBUG: 1b be 51 03 1f 91 07 24 6c f9 3a 3c f5 37 56 77
DEBUG: d5 27 2c 86 96 c9 67 c0 8c e8 e5 04 0c ee 51 4c
DEBUG: d6 9b e8 7c 54 3b 2c 90 9f 70 42 aa d6 b2 89 de
DEBUG: 49 8a 9a 20 50 da 12 69 45 36 8f 14 ba 0b 20 bc
DEBUG: a7 be 73 97 d4 8c d4 74 2a 9e 7a 57 35 60 23 b2
DEBUG: cf 85 77 73 1f 3f 11 e9 ca 18 a7 44 dc 03 05 a8
DEBUG: RC4 Out Key:
DEBUG: a8 4a 85 57 2a d5 15 77 00 0c 14 14 2d 5b 8d 6e
DEBUG: RC4 In Key:
DEBUG: 23 38 af c4 5c 44 a1 31 c9 f5 03 c8 f4 0d 20 60
DEBUG: HandShake: Calculated digest key from secure key and server digest:
DEBUG: 13 a6 c7 1f ce a9 6f 91 f1 7a 2c 1b be 6e 9e 07
DEBUG: 3c 81 7f 21 d4 0e 4c 1a b8 9c 6f c2 97 25 47 17
DEBUG: HandShake: Client signature calculated:
DEBUG: 83 55 50 5a 13 e5 bc 28 6a cd d4 d6 f0 ae ac 58
DEBUG: e7 a1 49 94 d5 f6 e7 b3 8f bd db 71 6e 14 6f b1
DEBUG: HandShake: Server sent signature:
DEBUG: 98 c5 81 90 23 2e 9a b5 9d 5d 9f cc c9 bb 98 a1
DEBUG: 36 39 86 a0 b1 22 aa 59 36 66 26 e7 af 5f 43 d0
DEBUG: HandShake: Digest key:
DEBUG: 8b 2b 89 29 95 b4 fe bf 5a a4 4c 53 fe f3 40 85
DEBUG: 7c e8 29 2e 5e 35 33 e0 a6 c9 bb 24 54 7f b5 00
DEBUG: HandShake: Signature calculated:
DEBUG: 98 c5 81 90 23 2e 9a b5 9d 5d 9f cc c9 bb 98 a1
DEBUG: 36 39 86 a0 b1 22 aa 59 36 66 26 e7 af 5f 43 d0
DEBUG: HandShake: Genuine Adobe Flash Media Server
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG: Invoking connect
INFO: Connected...
DEBUG: HandleServerBW: server BW = 2500000
DEBUG: HandleClientBW: client BW = 2500000 2
DEBUG: HandleCtrl, received ctrl. type: 0, len: 6
DEBUG: HandleCtrl, Stream Begin 0
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 349 bytes
DEBUG: (object begin)
DEBUG: (object begin)
DEBUG: Property: <Name:             fmsVer, STRING:   FMS/3,5,7,7009>
DEBUG: Property: <Name:       capabilities, NUMBER:   31.00>
DEBUG: Property: <Name:               mode, NUMBER:   1.00>
DEBUG: (object end)
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING:   status>
DEBUG: Property: <Name:               code, STRING:   NetConnection.Connect.Success>
DEBUG: Property: <Name:        description, STRING:   Connection succeeded.>
DEBUG: Property: <Name:               data, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name:            version, STRING:   3,5,7,7009>
DEBUG: (object end)
DEBUG: Property: <Name:           clientid, NUMBER:   616903097.00>
DEBUG: Property: <Name:     objectEncoding, NUMBER:   0.00>
DEBUG: Property: <Name:        secureToken, STRING:   b1abb02865a78390b2c48b049852b87971d88c25cde28aa86e003746ec1613b6574e1c91>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <connect>
DEBUG: Invoking secureTokenResponse
DEBUG: sending ctrl. type: 0x0003
DEBUG: Invoking createStream
DEBUG: FCSubscribe: cam04_1.stream?key=fda08Sexpire=1365532666Ssign=2444d69af7a0ecc271b407391109648e
DEBUG: Invoking FCSubscribe
DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <createStream>
DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: cam04_1.stream?key=fda08Sexpire=1365532666Ssign=2444d69af7a0ecc271b407391109648e
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
DEBUG: RTMP_ClientPacket, received: invoke 147 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING:   status>
DEBUG: Property: <Name:               code, STRING:   NetStream.Play.Start>
DEBUG: Property: <Name:        description, STRING:   FCSubscribe to stream cam04_1.stream.>
DEBUG: Property: <Name:           clientid, NUMBER:   616903097.00>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onFCSubscribe>
DEBUG: Invoking deleteStream
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
DEBUG: Closing connection.

jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Re: Tutorial on using RTMPDump on mac
« Reply #6 on: April 09, 2013, 01:11:24 PM »
Your session key expired: Date(1363332573000)  = Fri Mar 15 2013 08:29:33 GMT+0100 (CET)
Refresh your browser window, get a new session key & try again.

good luck!
w-who said that?

pianeta5

  • Newbie
  • *
  • Posts: 37
  • Liked: 20
  • Karma: +1/-4
Re: Tutorial on using RTMPDump on mac
« Reply #7 on: April 09, 2013, 05:12:28 PM »
Yes, my session key was expired because  i've replaced the key with a dummy value. Bydeway I've been able to make it work!
Here my new working command line:
rtmpdump  -V -v  -l 2 -r "rtmpe://edge2.reallifecam.com/private" -y "cam01_6.stream?key=6b7b4Sexpire=xxxxxxxSsign=yyyyyyyyyyyy" -o recording3.flv -T "#Loi8iJu" -s " " -a "private"

The difference is "edge2 and not "edge5" , "private" and not "liveedge" and as player flowplayer.content-3.2.8.swf


jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Re: Tutorial on using RTMPDump on mac
« Reply #8 on: April 10, 2013, 01:55:58 PM »
Quote from: pianeta5 on April 09, 2013, 05:12:28 PM
Yes, my session key was expired because  i've replaced the key with a dummy value. Bydeway I've been able to make it work!
Here my new working command line:
rtmpdump  -V -v  -l 2 -r "rtmpe://edge2.reallifecam.com/private" -y "cam01_6.stream?key=6b7b4Sexpire=xxxxxxxSsign=yyyyyyyyyyyy" -o recording3.flv -T "#Loi8iJu" -s " Quote from: pianeta5 on April 09, 2013, 05:12:28 PM
Yes, my session key was expired because  i've replaced the key with a dummy value. Bydeway I've been able to make it work!
Here my new working command line:
rtmpdump  -V -v  -l 2 -r "rtmpe://edge2.reallifecam.com/private" -y "cam01_6.stream?key=6b7b4Sexpire=xxxxxxxSsign=yyyyyyyyyyyy" -o recording3.flv -T "#Loi8iJu" -s "
" -a "private"

The difference is "edge2 and not "edge5" , "private" and not "liveedge" and as player flowplayer.content-3.2.8.swf

That's very interesting! So the private streams are on a different application! Never realised that.
As for the edge server, you can swap this around a couple of times as it is loadbalanced, but the private streams are not on all public edge servers.
Also: it seems that the flashplayer parameter is not necessary, it'll work without it as well.
« Last Edit: April 10, 2013, 02:27:54 PM by jimbos »
w-who said that?

pianeta5

  • Newbie
  • *
  • Posts: 37
  • Liked: 20
  • Karma: +1/-4
Re: Tutorial on using RTMPDump on mac
« Reply #9 on: May 07, 2013, 05:50:10 PM »
@ Jimbos:
My rtmpdump is not working any more!!! Is it the same for you? Can you check a source page to discovery any changes? I've tried to do this... I think that edge2 is changed in edge4 ... and #Loi8iJu" key is changed in #$cad8307b5ecf1baf1d6... but I'm not sure... I've done some try but no working... I'ven't an old source page to compare with the actual one....

Calang

  • Hero Member
  • *****
  • Posts: 575
  • Liked: 505
  • Karma: +5/-12
  • Gender: Male
Re: Tutorial on using RTMPDump on mac
« Reply #10 on: May 07, 2013, 08:48:24 PM »
You are not allowed to view links. Register or Login
Thanks alot for his guide. I'm using mac and currently have a VmWare windows machine to do all the sucking.

Hopefully i'll have the time soon to look into this, and i'll make sure to let you know how i did.

Id would be really awsome with something more GUI like method.

What machine is this that does all the sucking?  I'm very interested since my Shop-Vac recently quit on me, lol  ;D

FN

  • Global Moderator
  • Full Member
  • *****
  • Posts: 113
  • Liked: 102
  • Karma: +1/-9
  • Gender: Male
Re: Tutorial on using RTMPDump on mac
« Reply #11 on: July 22, 2013, 01:29:20 PM »
WOW i really suck at this.. when i typer the command (actually copy paste (with my own .stream sting)) all I get is "-bash: rtmpdump : command not found"
If you like watching this please sign up at reallifecam.com

jimbos

  • Jr. Member
  • **
  • Posts: 72
  • Liked: 41
  • Karma: +3/-15
Re: Tutorial on using RTMPDump on mac
« Reply #12 on: July 22, 2013, 08:13:06 PM »
You are not allowed to view links. Register or Login
WOW i really suck at this.. when i typer the command (actually copy paste (with my own .stream sting)) all I get is "-bash: rtmpdump : command not found"

then you don't have rtmpdump properly installed. Did you install it from the package you downloaded ?

What is the output of the following command?
Code: You are not allowed to view links. Register or Login
locate rtmpdump | grep /bin

should be something like:
Code: You are not allowed to view links. Register or Login
/usr/local/bin/rtmpdump
w-who said that?

 

DirtyBin.com Uploader

 Google Translate


SMF 2.0.8 | SMF © 2014, Simple Machines
SMFAds for Free Forums
Simple Audio Video Embedder
SMFAds for Free Forums | Powered by SMFPacks Likes Pro Mod
| Laguna Theme by SMFPacks.com
XHTML | RSS | WAP2