View Single Post
  #1  
Old 01-27-2011, 06:26 PM
josan josan is offline
Junior Member
 
Join Date: Jan 2011
Posts: 10
josan is on a distinguished road
Default

Problems using rtmpsuck & rtmpsrv as RTMP server for streaming H.264 .FLV files


Hello ~~
Sorry to bother you again~~
But I got some problems about rtmpsuck & rtmpsrv!!

I have downloaded rtmpdump 2.3 and compiled them successfully in Linux environment.

Try to make some testing of rtmpsrv / rtmpsuck. So far, it seems... "connect" is OK, but can't "play" file!! Please kindly give me some advice

Thank you very much~~

Here are my testing scenario & log!

Step1. Use command "iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT" on Linux
Step2. Run ./rtmpsuck -z (debug mode) on Linux (Be a RTMP server to publish this file ->testh264.flv)
Step3. Installing Apached2.2 on Windows (Be a local web server)
Step4. Using JW player to write a simple HTML file as below:
(This test.html is on Apached server, will be the viewer of testh264.flv)

HTML Code:
<html>
<body>
<script type='text/javascript' src='swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
  var so = new SWFObject('player.swf','mpl','640','360','9');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');   
  so.addVariable('file','testh264');
  so.addVariable('streamer','rtmp://192.168.81.3:1935/app/');
  so.write('mediaspace');
</script>
</body>
</html>
And...
Here are my debug log file of rtmpsuck & rtmpsrv:

log of rtmpsuck:
Code:
RTMP Proxy Server v2.3
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935
DEBUG: serverThread: accepted connection from 192.168.81.61 to 192.168.81.3

DEBUG: SHandShake: Type Requested : 03
DEBUG2: 01 c2 8e c5 80 00 07 02 2c 4e a1 d3 e9 cf 07 fe
...
DEBUG2: 3c 98 31 5c 32 69 af 6c 0b 0f a6 1d d0 ac d0 a2
DEBUG: SHandShake: Server digest offset: 430
DEBUG: SHandShake: Initial server digest: 
DEBUG: 6c f8 11 61 90 09 bb 24 3d fc 3b 34 d3 4d ad c6
DEBUG: b6 95 ba 07 f0 d8 a1 aa b0 72 26 5b f1 62 8a fd
DEBUG2: Serversig: 
DEBUG2: fe e7 f6 05 03 05 01 01 67 45 8b 6b c6 23 7b 32
...
DEBUG2: 44 d8 c9 6e ee ea 49 5c 9b f4 4a 06 bc 46 7c 39
DEBUG: SHandShake: Client Uptime : 29527749
DEBUG: SHandShake: Player Version: 128.0.7.2
WARNING: Trying different position for client digest!
DEBUG: SHandShake: Calculated digest key from secure key and server digest: 
DEBUG: 10 e6 5d bc 2d 46 50 f3 1a 1f a7 0e 6b 1b b3 7b
DEBUG: 33 1e 31 8b ce 5e 17 34 80 9b 1a db 6f 2b eb b9
DEBUG: SHandShake: Server signature calculated:
DEBUG: 2b ec dd 24 a4 03 95 eb 74 e7 a1 58 50 23 45 ff
DEBUG: 74 f3 13 36 60 51 f4 73 04 4e 93 a3 94 b2 d4 0a
DEBUG2: SHandShake: Sending handshake response: 
DEBUG2: 01 c2 8e c5 80 00 07 02 2c 4e a1 d3 e9 cf 07 fe
...
DEBUG2: 74 f3 13 36 60 51 f4 73 04 4e 93 a3 94 b2 d4 0a
DEBUG2: SHandShake: 2nd handshake: 
DEBUG2: a5 fc 11 59 71 ae 7f 23 11 e8 c6 74 50 c0 a1 8d
DEBUG2: c0 bb 63 1e bc af d5 ee 74 21 29 49 1c 13 f5 c4
...
DEBUG2: 30 88 28 c2 cc a0 af a5 f8 17 ea 3f 48 11 78 d4
DEBUG2: 91 cf b2 59 29 ca 03 38 20 ad 56 65 1a f2 1c 51
DEBUG: SHandShake: Client sent signature:
DEBUG: 30 88 28 c2 cc a0 af a5 f8 17 ea 3f 48 11 78 d4
DEBUG: 91 cf b2 59 29 ca 03 38 20 ad 56 65 1a f2 1c 51
DEBUG: SHandShake: Digest key: 
DEBUG: 2c 7f f1 1c 7f 7d 7f 7f ed 42 07 d1 e4 79 2e a3
DEBUG: 11 55 ce e2 c1 ae 3b 7f 3d f2 ae d5 6a 8c 9f 26
DEBUG: SHandShake: Signature calculated:
DEBUG: 30 88 28 c2 cc a0 af a5 f8 17 ea 3f 48 11 78 d4
DEBUG: 91 cf b2 59 29 ca 03 38 20 ad 56 65 1a f2 1c 51
DEBUG: SHandShake: Genuine Adobe Flash Player
DEBUG: SHandShake: Handshaking finished....
DEBUG2: RTMP_ReadPacket: fd=7
DEBUG2:   0000:  03 00 00 00 00 01 2c 14  00 00 00 00               ......,.....      
DEBUG2:   0000:  02 00 07 63 6f 6e 6e 65  63 74 00 3f f0 00 00 00   ...connect.?....  
DEBUG2:   0010:  00 00 00 03 00 03 61 70  70 02 00 04 61 70 70 2f   ......app...app/  
DEBUG2:   0020:  00 08 66 6c 61 73 68 56  65 72 02 00 0d 57 49 4e   ..flashVer...WIN  
DEBUG2:   0030:  20 31 30 2c 31 2c 38 35  2c 33 00 06 73 77 66 55    10,1,85,3..swfU  
DEBUG2:   0040:  72 6c 02 00 1b 68 74 74  70 3a 2f 2f 31 32 37 2e   rl...http://127.  
DEBUG2:   0050:  30 2e 30 2e 31 2f 70 6c  61 79 65 72 2e 73 77 66   0.0.1/player.swf  
DEBUG2:   0060:  00 05 74 63 55 72 6c 02  00 1d 72 74 6d 70 3a 2f   ..tcUrl...rtmp:/  
DEBUG2:   0070:  2f 31 39 32 2e 31 36 38  2e 38 31 2e 33 3a 31 39   /192.168.81.3:19  
DEBUG2: RTMP_ReadPacket: fd=7
DEBUG2:   0000:  c3                                                 .                 
DEBUG2:   0000:  33 35 2f 61 70 70 2f 00  04 66 70 61 64 01 00 00   35/app/..fpad...  
DEBUG2:   0010:  0c 63 61 70 61 62 69 6c  69 74 69 65 73 00 40 6d   .capabilities.@m  
DEBUG2:   0020:  e0 00 00 00 00 00 00 0b  61 75 64 69 6f 43 6f 64   ........audioCod  
DEBUG2:   0030:  65 63 73 00 40 a8 ee 00  00 00 00 00 00 0b 76 69   ecs.@.........vi  
DEBUG2:   0040:  64 65 6f 43 6f 64 65 63  73 00 40 6f 80 00 00 00   deoCodecs.@o....  
DEBUG2:   0050:  00 00 00 0d 76 69 64 65  6f 46 75 6e 63 74 69 6f   ....videoFunctio  
DEBUG2:   0060:  6e 00 3f f0 00 00 00 00  00 00 00 07 70 61 67 65   n.?.........page  
DEBUG2:   0070:  55 72 6c 02 00 1a 68 74  74 70 3a 2f 2f 31 32 37   Url...http://127  
DEBUG2: RTMP_ReadPacket: fd=7
DEBUG2:   0000:  c3                                                 .                 
DEBUG2:   0000:  2e 30 2e 30 2e 31 2f 74  65 73 74 2e 68 74 6d 6c   .0.0.1/test.html  
DEBUG2:   0010:  00 0e 6f 62 6a 65 63 74  45 6e 63 6f 64 69 6e 67   ..objectEncoding  
DEBUG2:   0020:  00 00 00 00 00 00 00 00  00 00 00 09               ............      
DEBUG: ServePacket, client sent packet type 14, size 300 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:	app/>
DEBUG: Property: <Name:           flashVer, STRING:	WIN 10,1,85,3>
DEBUG: Property: <Name:             swfUrl, STRING:	http://127.0.0.1/player.swf>
DEBUG: Property: <Name:              tcUrl, STRING:	rtmp://192.168.81.3:1935/app/>
DEBUG: Property: <Name:               fpad, BOOLEAN:	FALSE>
DEBUG: Property: <Name:       capabilities, NUMBER:	239.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://127.0.0.1/test.html>
DEBUG: Property: <Name:     objectEncoding, NUMBER:	0.00>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: ServeInvoke, client invoking <connect>
Processing connect
app: app/
flashVer: WIN 10,1,85,3
swfUrl: http://127.0.0.1/player.swf
ERROR: RTMP_HashSWF: connection lost while downloading swfurl http://127.0.0.1/player.swf
tcUrl: rtmp://192.168.81.3:1935/app/
pageUrl: http://127.0.0.1/test.html
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: RTMPSockBuf_Fill, recv returned -1. GetSockError(): 11 (Resource temporarily unavailable)
ERROR: RTMP_Connect1, handshake failed.
DEBUG2: RTMP_ReadPacket: fd=7
Sorry, it's too long~ exceed the limitation~
I will post log of rtmpsrv again!

Josan
Reply With Quote