Hi, i have some question which i got from one of users on SamyGO forum. I compiled latest version of rtmpdump from git, applied patch to get rid out of high CPU overload even on idle when rtmpgw is detached from shell.
Code:
TFTYPE
controlServerThread(void *unused)
{
char ich;
int istty;
if (istty=isatty(0))
printf("the standard input is from a terminal\n");
else
printf("the standard input is NOT from a terminal\n");
while (1)
{
if (istty) {
ich = getchar();
switch (ich)
{
case 'q':
RTMP_LogPrintf("Exiting\n");
stopStreaming(httpServer);
exit(0);
break;
default:
RTMP_LogPrintf("Unknown command \'%c\', ignoring\n", ich);
}
}
else sleep(1);
}
TFRET();
}
Now we get problems with rtmpge streams, rtmpgw crashes while handshaking:
Code:
root@[TV] /> rtmpgw -g 1935 -Vz
HTTP-RTMP Stream Gateway v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL
the standard input is from a terminal
Streaming on http://0.0.0.0:1935
DEBUG: serverThread: accepted connection from 192.168.1.100
DEBUG: processTCPrequest: header: GET /?r=rtmpe://cp164868.live.edgefcs.net/live/&y=1_wuzizfve_1@89762&W=http://cdnbakmi.kaltura.com/p/1199011/sp/119901100/flash/kdp3/v3.6.17/kdp3.swf&p=http://www.tvn-2.com/envivo&v=true HTTP/1.1
Host: 192.168.1.202:1935
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: resolveIDs=0; PHPSESSID=3332cf7acea986f1585f239e60ae13e4
Connection: keep-alive
DEBUG: processTCPrequest: Request header: /?r=rtmpe://cp164868.live.edgefcs.net/live/&y=1_wuzizfve_1@89762&W=http://cdnbakmi.kaltura.com/p/1199011/sp/119901100/flash/kdp3/v3.6.17/kdp3.swf&p=http://www.tvn-2.com/envivo&v=true
DEBUG: processTCPrequest: parameter: r, arg: rtmpe://cp164868.live.edgefcs.net/live/
DEBUG: Parsing...
DEBUG: Parsed protocol: 2
DEBUG: Parsed host : cp164868.live.edgefcs.net
DEBUG: Parsed app : live
DEBUG: processTCPrequest: parameter: y, arg: 1_wuzizfve_1@89762
DEBUG: processTCPrequest: parameter: W, arg: http://cdnbakmi.kaltura.com/p/1199011/sp/119901100/flash/kdp3/v3.6.17/kdp3.swf
DEBUG: processTCPrequest: parameter: p, arg: http://www.tvn-2.com/envivo
DEBUG: processTCPrequest: parameter: v, arg: true
DEBUG: Setting buffer time to: 20000ms
DEBUG: Protocol : RTMPE
DEBUG: Hostname : cp164868.live.edgefcs.net
DEBUG: Port : 1935
DEBUG: Playpath : 1_wuzizfve_1@89762
DEBUG: tcUrl : rtmpe://cp164868.live.edgefcs.net:1935/live
DEBUG: swfUrl : http://cdnbakmi.kaltura.com/p/1199011/sp/119901100/flash/kdp3/v3.6.17/kdp3.swf
DEBUG: pageUrl : http://www.tvn-2.com/envivo
DEBUG: app : live
DEBUG: live : yes
DEBUG: timeout : 120 sec
DEBUG: SWFSHA256:
DEBUG: 63 59 fd 9a 21 37 92 97 ec 94 3f 18 76 1f 41 ff
DEBUG: d5 5c 87 79 a8 36 0d 89 00 b9 e4 42 c0 08 5c af
DEBUG: SWFSize : 790825
Connecting ... port: 1935, app: live/
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Client type: 06
DEBUG: HandShake: DH pubkey position: 33
DEBUG: HandShake: Client digest offset: 846
DEBUG: HandShake: Initial client digest:
DEBUG: 66 14 9f b4 c7 25 d3 e9 b4 00 b0 4e 9e 68 4a 9f
DEBUG: 0c 78 dd 93 e6 c3 d8 15 a6 f1 77 73 a0 af 4d 2a
DEBUG: HandShake: Type Answer : 09
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
DEBUG: HandShake: Server Uptime : 516377919
DEBUG: HandShake: FMS Version : 4.5.2.1
DEBUG: HandShake: Server DH public key offset: 479
DEBUG: HandShake: Secret key:
DEBUG: 7b 0c 01 86 ce 04 94 b1 41 e2 c7 c7 82 0f 03 49
DEBUG: f1 d9 67 ba 5b 9d 98 b4 85 14 15 52 0e d7 1f 13
DEBUG: e4 65 b7 de 1a 35 58 f5 9c 80 7b 5a 81 dd ca 76
DEBUG: 1c 49 37 6d 28 25 c9 84 4e c9 23 63 26 09 5d c6
DEBUG: 11 7a 7d 17 fe 66 dd 22 9f c5 32 33 84 60 12 5a
DEBUG: 83 af 38 46 67 79 96 78 32 f6 6b 6e c4 92 b1 c7
DEBUG: ef 58 77 57 11 2f 5c 54 87 45 13 51 df 39 01 d6
DEBUG: 2e 6f 2b ea 58 7f ee fe a2 54 68 f7 e1 27 0b 8f
DEBUG: RC4 Out Key:
DEBUG: e2 b5 bf 88 60 7c 6e c7 2b 87 be af 75 bc 8e 5c
Segmentation fault
root@[TV] />
Perhaps anyone knows what is the issue and maybe some hints for solution?
Also you can visit rtmpgw
related thread on samygo.tv forum.
Thanks in advance. juzis.