[rtmpdump] rtmpsuck file?

Howard Chu hyc at highlandsun.com
Tue Jan 5 03:36:32 CET 2010


Dan Schmidt wrote:
> Thanks for you help, but it still does not work.  It just hangs instead of
> giving the information rtmpsrv gives:

You're running it as the wrong user, so its outbound connection attempt is
being redirected. If you use "proxy" in your redirect rule, then you must su
to proxy to run rtmpsuck.

Note that whatever user you choose needs to have a sane value for $HOME. It
also writes its files in the current working directory, whatever that is, so
it needs to have write access to that directory too.

> dan at dan-desktop:~$ svn co svn://svn.mplayerhq.hu/rtmpdump/trunk rtmpdump
> Checked out revision 188.
> dan at dan-desktop:~$ sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner
> \! --uid-owner proxy -j REDIRECT
> [sudo] password for dan:
> dan at dan-desktop:~$ cd rtmpdump
> dan at dan-desktop:~/rtmpdump$ make clean
> rm -f *.o rtmpdump streams rtmpsrv rtmpsuck
> dan at dan-desktop:~/rtmpdump$ make linux
> make[1]: Entering directory `/home/dan/rtmpdump'
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o log.o log.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o rtmp.o rtmp.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o amf.o amf.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o rtmpdump.o rtmpdump.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o parseurl.o parseurl.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o hashswf.o hashswf.c
> gcc -Wall  log.o rtmp.o amf.o rtmpdump.o parseurl.o hashswf.o -o rtmpdump
> -lcrypto -lz
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o streams.o streams.c
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o thread.o thread.c
> gcc -Wall  log.o rtmp.o amf.o streams.o parseurl.o hashswf.o thread.o -o
> streams -lpthread -lcrypto -lz
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o rtmpsrv.o rtmpsrv.c
> gcc -Wall  log.o rtmp.o amf.o rtmpsrv.o thread.o -o rtmpsrv -lpthread -lcrypto -lz
> gcc -Wall   -DRTMPDUMP_VERSION=\"2.1b\" -O2   -c -o rtmpsuck.o rtmpsuck.c
> gcc -Wall  log.o rtmp.o amf.o rtmpsuck.o hashswf.o thread.o -o rtmpsuck
> -lpthread -lcrypto -lz
> make[1]: Leaving directory `/home/dan/rtmpdump'
> dan at dan-desktop:~/rtmpdump$ ./rtmpsuck -z
> RTMP Proxy Server 2.1b
> (c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL
> 
> Streaming on rtmp://0.0.0.0:1935
> DEBUG: serverThread: accepted connection from <My IP> to 68.142.74.197
> 
> DEBUG: SHandShake: Type Requested : 03
> DEBUG: SHandShake: Client Uptime : 247060
> DEBUG: SHandShake: Player Version: -128.0.3.2
> DEBUG: SHandShake: Handshaking finished....
> DEBUG2: RTMP_ReadPacket: fd=4
>   0000:  03 00 00 00 00 01 7a 14  00 00 00 00               ......z.....     
>   0000:  02 00 07 63 6f 6e 6e 65  63 74 00 3f f0 00 00 00   ...connect.?.... 
>   0010:  00 00 00 03 00 03 61 70  70 02 00 09 61 31 38 36   ......app...a186 
>   0020:  33 2f 6f 36 2f 00 08 66  6c 61 73 68 56 65 72 02   3/o6/..flashVer. 
>   0030:  00 0e 4c 4e 58 20 31 30  2c 30 2c 34 32 2c 33 34   ..LNX 10,0,42,34 
>   0040:  00 06 73 77 66 55 72 6c  02 00 39 68 74 74 70 3a   ..swfUrl..9http: 
>   0050:  2f 2f 77 77 77 2d 74 63  2e 70 62 73 2e 6f 72 67   //www-tc.pbs.org 
>   0060:  2f 76 69 64 65 6f 2f 6d  65 64 69 61 2f 73 77 66   /video/media/swf 
>   0070:  2f 50 42 53 50 6c 61 79  65 72 2e 73 77 66 3f 31   /PBSPlayer.swf?1 
> DEBUG2: RTMP_ReadPacket: fd=4
>   0000:  c3                                                 .                
>   0000:  33 32 34 31 00 05 74 63  55 72 6c 02 00 28 72 74   3241..tcUrl..(rt 
>   0010:  6d 70 3a 2f 2f 70 62 73  2e 66 63 6f 64 2e 6c 6c   mp://pbs.fcod.ll 
>   0020:  6e 77 64 2e 6e 65 74 3a  31 39 33 35 2f 61 31 38   nwd.net:1935/a18 
>   0030:  36 33 2f 6f 36 2f 00 04  66 70 61 64 01 00 00 0c   63/o6/..fpad.... 
>   0040:  63 61 70 61 62 69 6c 69  74 69 65 73 00 40 2e 00   capabilities. at .. 
>   0050:  00 00 00 00 00 00 0b 61  75 64 69 6f 43 6f 64 65   .......audioCode 
>   0060:  63 73 00 40 a8 ee 00 00  00 00 00 00 0b 76 69 64   cs. at .........vid 
>   0070:  65 6f 43 6f 64 65 63 73  00 40 6f 80 00 00 00 00   eoCodecs. at o..... 
> DEBUG2: RTMP_ReadPacket: fd=4
>   0000:  c3                                                 .                
>   0000:  00 00 0d 76 69 64 65 6f  46 75 6e 63 74 69 6f 6e   ...videoFunction 
>   0010:  00 3f f0 00 00 00 00 00  00 00 07 70 61 67 65 55   .?.........pageU 
>   0020:  72 6c 02 00 37 68 74 74  70 3a 2f 2f 76 69 64 65   rl..7http://vide 
>   0030:  6f 2e 70 62 73 2e 6f 72  67 2f 76 69 64 65 6f 2f   o.pbs.org/video/ 
>   0040:  31 32 38 36 34 33 37 35  35 30 2f 70 72 6f 67 72   1286437550/progr 
>   0050:  61 6d 2f 39 37 39 33 35  39 36 36 34 00 0e 6f 62   am/979359664..ob 
>   0060:  6a 65 63 74 45 6e 63 6f  64 69 6e 67 00 40 08 00   jectEncoding. at .. 
>   0070:  00 00 00 00 00 00 00 09  01 00                     ..........       
> DEBUG: ServePacket, received packet type 14, size 378 bytes
> DEBUG: ServePacket, received: invoke 378 bytes
> DEBUG: (object begin)
> DEBUG: Property: <Name:                  no-name., STRING:    connect>
> DEBUG: Property: <Name:                  no-name., NUMBER:    1.00>
> DEBUG: Property: <Name:                  no-name., OBJECT>
> DEBUG: (object begin)
> DEBUG: Property: <Name:                       app, STRING:    a1863/o6/>
> DEBUG: Property: <Name:                  flashVer, STRING:    LNX 10,0,42,34>
> DEBUG: Property: <Name:                    swfUrl, STRING:   
> http://www-tc.pbs.org/video/media/swf/PBSPlayer.swf?13241>
> DEBUG: Property: <Name:                     tcUrl, STRING:   
> rtmp://pbs.fcod.llnwd.net:1935/a1863/o6/>
> DEBUG: Property: <Name:                      fpad, BOOLEAN:    FALSE>
> DEBUG: Property: <Name:              capabilities, NUMBER:    15.00>
> DEBUG: Property: <Name:               audioCodecs, NUMBER:    3191.00>
> DEBUG: Property: <Name:               videoCodecs, NUMBER:    252.00>
> DEBUG: Property: <Name:             videoFunction, NUMBER:    1.00>
> DEBUG: Property: <Name:                   pageUrl, STRING:   
> http://video.pbs.org/video/1286437550/program/979359664>
> DEBUG: Property: <Name:            objectEncoding, NUMBER:    3.00>
> DEBUG: (object end)
> DEBUG: (object end)
> DEBUG: ServeInvoke, client invoking <connect>
> Processing connect
> app: a1863/o6/
> flashVer: LNX 10,0,42,34
> swfUrl: http://www-tc.pbs.org/video/media/swf/PBSPlayer.swf?13241
> tcUrl: rtmp://pbs.fcod.llnwd.net:1935/a1863/o6/
> pageUrl: http://video.pbs.org/video/1286437550/program/979359664
> DEBUG: RTMP_Connect, ... connected, handshaking
> DEBUG: HandShake: Client type: 03
> 
> DEBUG: HandShake: Client digest offset: 580
> DEBUG: HandShake: Initial client digest:
> 5B 19 FD 79 BD 55 CE FE A7 E2 F7 63 A5 E9 93 F0 F0 57 1A 92 C0 65 D2 F8 F0 4F
> 18 7E 35 56 73 B1
> <Hangs Here!>
> 
> Howard Chu wrote:
>> Dan Schmidt wrote:
>>> I was able to get the required mp4 path information from rtmpsrv and I 
>>> was able to download the program.  I am curious why rtmpsuck did not work?
>>
>> No idea. Can you try again with the 2.1b source that was just released today?
>>


-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/


More information about the rtmpdump mailing list