rtmpgw - RTMP media gateway for Samsung TV

Here is information about customize your D series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.

demaciado
Posts: 18
Joined: Mon May 21, 2012 1:00 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by demaciado »

The high CPU load from rtmpgw when running in background is a known issue,
see for example http://stream-recorder.com/forum/rtmpgw ... 15398.html.
Insted of commenting out the whole function, I'd rather fix it like this:

Code: Select all

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();
}
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by juusso »

You`re right, man! Thanks for links and hints!

Now no more CPU overload! Doesn`t matter if i call it from shell or init script, it uses about 2% only!

Code: Select all

1468     1 root     S     7492   2%   0% rtmpgw -g 1935
:)

p.s. links fixed.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
eternalord
Posts: 9
Joined: Mon Sep 10, 2012 11:31 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by eternalord »

LInks are broken. juuso.
The selected attachment does not exist anymore.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by juusso »

Thanks. Fixed.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
eternalord
Posts: 9
Joined: Mon Sep 10, 2012 11:31 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by eternalord »

juuso i need to report a problem with rtmpe links. thats use handshaking.
I know this version2.4 is the last one who support it. but there is a problem in the release.
The rtmpgw it only works in windows with rtmpe. I dont know why.
I test rtmp links and works very good but rtmpe link in TV crash the app and In windows works good.

i have this url: http://127.0.0.1:1935/?r=rtmpe://cp1648 ... ivo&v=true

If you want to test:
this link works in Panama Country Time -5GMT from 6:00 AM to 9:00 AM, 12:00 PM to 1:30 PM, 6:00 PM to 7:30 PM, 11:00 PM To 1:00 PM

It works windows rtmpgw and opening the stream in tv.
but rtmpgw running in tv crash the application when i try to stream it..

What can be?.

Greetings.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by juusso »

what tv model do you have, what player are you using for stream play? your link is only for internal usage trough for example nstreamplayer. if you call link http://127... from your windows pc then everything is normal, you never get it working!

If you run rtmpgw on TV and need to watch stream on PC, link should be like this:

Code: Select all

http://IP_OF_TV:1935/?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
for example:

Code: Select all

http://192.168.1.202:1935/?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
EDIT: Yes, some troubles with your stream:

Code: Select all

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
Referer: http://forum.samygo.tv/viewtopic.php?f=22&t=4592&p=41725
Cookie: resolveIDs=0; PHPSESSID=6b4d020cac995578555a6158cea4e058
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: 472
DEBUG: HandShake: Client digest offset: 1383
DEBUG: HandShake: Initial client digest:
DEBUG: 0e 89 49 1a 78 60 3f d2 5e 42 2e e0 1b de 6b 67
DEBUG: 80 c8 85 25 45 b3 db 11 bf f0 2d 74 65 c0 94 51
DEBUG: HandShake: Type Answer   : 09
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
DEBUG: HandShake: Server Uptime : 669346094
DEBUG: HandShake: FMS Version   : 3.5.7.1
DEBUG: HandShake: Server DH public key offset: 465
DEBUG: HandShake: Secret key:
DEBUG: c7 c5 9a a8 d6 9a eb 62 40 2f 16 89 51 0e 28 d5
DEBUG: 09 a8 10 f0 ba af 69 74 c4 06 bf 42 48 58 fd de
DEBUG: 22 91 71 b2 58 a7 a0 e4 99 99 69 a9 19 9f e4 20
DEBUG: 6c a5 28 71 b2 4d 04 ef 68 fb 08 7a 9f 37 8f 92
DEBUG: 7c 90 5e c9 ef f7 fb cc 4f 29 dd fb 37 5a e0 66
DEBUG: af a7 c1 87 3e ae 51 ea 57 86 ee 56 f7 1b f6 d7
DEBUG: c9 1a c5 9c dd fa d7 57 12 89 de 0f e5 fd 29 7d
DEBUG: 0b 85 df 18 b4 45 d0 ab 2e c5 27 cb 8c 6b 71 61
DEBUG: RC4 Out Key:
DEBUG: 33 36 65 24 8a cc 32 1f b8 a9 36 ad cd 2f e4 9c
Segmentation fault
root@[TV] />
Anyone could help you to troubleshoot this problem...
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
eternalord
Posts: 9
Joined: Mon Sep 10, 2012 11:31 pm

Re: [SOLVED] rtmpgw - RTMP media gateway for Samsung TV

Post by eternalord »

Thanks juuso.
Im using nstreamLMod.
TV MODEL: UN40D6450
Im aware to put the IP of the device who is running rtmpgw. =)

So with other protocols like rtmp (other links) works great. Server and Client in tv.
But this link rtmpgw in tv crash the app. But if you try open rtmpgw server in pc works. Both cases opening the stream with nstreamlmod in tv.

Werd. Same version 2.4.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: rtmpgw - RTMP media gateway for Samsung TV

Post by juusso »

LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
eternalord
Posts: 9
Joined: Mon Sep 10, 2012 11:31 pm

Re: rtmpgw - RTMP media gateway for Samsung TV

Post by eternalord »

Well there is no help in rtmpdump forum to the error with the handshaking in rtmpe links.. I think we need to solve by ourselfs.

Im going to try compile it from the git.
Hagi10
Posts: 7
Joined: Sat May 11, 2013 10:01 pm

Re: rtmpgw - RTMP media gateway for Samsung TV

Post by Hagi10 »

Hi,
I am using a widget on my samsung smart tv 46es8005 called nStreamLmod. Trying to stream tv channels that works in simple tv on the samsung widget called nStreamplayer and nStreamLmod.
For example: this link works fine at simple tv:

rtmp://$OPT:rtmp-raw=rtmp://159.253.131.123/atv playpath=atv3 swfUrl=http://i.tmgrup.com.tr/p/flowplayer-3.2.10.swf?i=1 pageUrl=http://www.atv.com.tr/webtv/canli-yayin swfVfy=1 live=true

and with nStreamLmod I tried like this and it isnt working:

<channel> <title>ATV</title> <stream_url><![CDATA[rtmp://159.253.131.123/atveu/&id=atveu3&p=http://www.atv.com.tr/webtv/canli-yayin&y=1]]></stream_url> <logo_30x30></logo_30x30> <description>ATV</description> <category_id>1</category_id> </channel>

But link like this in simple tv :
rtmp://mn-l.mncdn.com/trt1/trt15

works also in nStreamLmod:
<channel> <title>TRT 1</title> <stream_url><![CDATA[rtmp://mn-l.mncdn.com/trt1/&id=trt15]]></stream_url> <logo_30x30></logo_30x30> <description>TRT1</description> <category_id>1</category_id></channel>

So playpath is &id= and you need to have '/' before it. But should i use swfUrl? pageurl? How can I make this work??

Post Reply

Return to “[D] Firmware”