Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

Customized rtmpdump binaries with patch file

(http://stream-recorder.com/forum/showthread.php?t=16103)

RedPenguin 08-28-2014 12:09 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by denobis (Post 69989)
I've added the site 3dbuzz.com to the c-sources. If you want to make a pacth to update the rtmpdump here the notes:

1- the site uses tea-decryption to make a secure response but not in the usual way. The token is received under name "r2"

2- before derypting it you must calculate it through a trivial conversions to make it a hex number.

So the code were something like

1- getting r2 property and calculating it, something like (text=r2 property)

Code:

dbufft(char *text)
                {                                                                                       
                  int local8,local3,r2size;                 
                  char *chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijklmnopqrstuvwxyzabcdefghijklm";                 
                  char *local6 = text;
                  r2size = strlen(local6);                 
                  char local2[r2size];       
                 
                  local3 = 0;
               
                  while (local3 < r2size)
                    {                   
                    local8 = local6[local3];
                                                                                                                     
                    char *b = strchr (chars, local8);
                    int pos = pos ? b - chars : -1;
                                                                                                 
                    if (pos>-1)
                      {local8=chars[pos + 13];}
                     
                    char local52[2];
                    memcpy( local52, &local8, 1 );
                    local2[local3]=local52[0];
                                                   
                    local3++;
                    }
                   
                memcpy(text, local2, r2size);
                }

2- apply it the DecodeTea algorithm and send the response

Code:

     
else        if (strstr(host, "3dbuzz.com") || strstr(pageUrl, "3dbuzz.com"))
                {
                  AVal av_rr = AVC("rr");
                  AVal av_re = AVC(decrypted);
                  SAVC(av_rr);
                 
                  enc = pbuf;               
                  enc = AMF_EncodeString(enc, pend, &av_rr);
                  enc = AMF_EncodeNumber(enc, pend, 0);
                  *enc++ = AMF_NULL;
                  enc = AMF_EncodeString(enc, pend, &av_re);
                  av_Command.av_val = pbuf;
                  av_Command.av_len = enc - pbuf;
                    SendInvoke(r, &av_Command, FALSE);     
                  RTMP_SendCreateStream(r);
                  }

i don't know how to make patches, so you're invited.

I could make a patch but not being a programmer, I'm not completely sure where to place those in the code and in which file.

I know how make a patch though.

msdos 08-31-2014 06:40 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by RedPenguin (Post 70121)
I could make a patch but not being a programmer, I'm not completely sure where to place those in the code and in which file.

I know how make a patch though.

hello can share the source code to compile thanks

mckv 09-02-2014 04:32 AM

Re: Customized rtmpdump binaries with patch file


 
Code:

--- src/rtmpdump-ksv/librtmp/rtmp.c        2014-09-02 13:28:09.918373926 +0300
+++ src/rtmpdump-ksv/librtmp/rtmp.c.new        2014-09-02 13:28:54.201460552 +0300
@@ -3162,7 +3162,7 @@
            }
          else if (strstr(pageUrl, "ezcast.tv"))
            {
-              SendCommand(r, "jaSakamCarevataKerka", TRUE);
+              SendCommand(r, "iUsteJaSakamCarevataKerka", TRUE);
              RTMP_SendCreateStream(r);
            }
          else if (strstr(pageUrl, "liveflash.tv"))


jhb50 09-03-2014 05:41 PM

Re: Customized rtmpdump binaries with patch file


 
@KSV

Would it be possible for you to add the folllowing to your next compile along with that for zenex as provided by Red Penguin?

I am a major user of your moded rtmpdump in my Serviio Web site plugins where I have a script for each source, so a better solution would be to have an rtmpdump parameter that accepts a "Create" string just like I use the "Conn" string when required.

Any chance of adding that parameter support to your mods as well so we can stop bugging you?

Without this mod I am DOA when playing news channels such as http://www.zahipedia.net/2009/07/02/...e-news-online/

+ else if (strstr(pageUrl, "janjua.tv"))
+ {
+ SendCommand(r, "soLagaDaSeStoriAga", TRUE);
+ RTMP_SendCreateStream(r);
+ }

Thank you for all your support!

KSV 09-04-2014 01:46 AM

Re: Customized rtmpdump binaries with patch file


 
i haven't looked into rtmpdump for quite sometime. if somebody could provide all the required fixes from last few pages in one post i can try to incorporate them in next binary release.

denobis 09-04-2014 05:10 AM

Re: Customized rtmpdump binaries with patch file


 
Hi,

for all the sites which send special commands there is no need recompile every time with the new parameters. In general, the sites supported with only this instructions

Code:

SendCommand(r, "something", TRUE);
                      SendGetStreamLength(r);
                      RTMP_SendCreateStream(r);

can go together. More, you don't need to specify the site but only the presence of the command line option related, for example

Code:

          else if (r->Link.tcomm.av_len) 
                  {
                param_count = strsplit(r->Link.tcomm.av_val, FALSE, ';', &params);
                SendCommand(r, params[0], params[1]);
                SendGetStreamLength(r);
                RTMP_SendCreateStream(r);                 
                }

where tcomm is the command-line option passed to rtmpdump with -K option in the form "command,bool". For ucaster,

-K "vujkoMiLazarBarakovOdMonospitovo;TRUE"

so the rtmpdump command would be

Code:

rtmpdump -r "rtmp://212.7.209.16/live/tvccomp?id=72042" -a "live" -f "WIN 14,0,0,179" -p "http://www.ucaster.eu/embedded/tvccomp/1/620/382" -W

"http://www.ucaster.eu/static/scripts/fplayer.swf" -K "vujkoMiLazarBarakovOdMonospitovo;TRUE" -y "tvccomp?id=72042" -m "5000" -o "tvcpuebla1.flv" -C S:OK

this applies to

TRUE
// pc3oot.us.to "StreamPiraten"
// ezcast.tv "iUsteJaSakamCarevataKerka"
// liveflash.tv "kaskatija"
// mips.tv "gaolVanus"
// ucaster.eu "vujkoMiLazarBarakovOdMonospitovo"
// yukons.net "trxuwaaLahRKnaechb"
// yycast.com "trajkoProkopiev"
// "streamify.tv") || strstr(pageUrl, "zenex.tv" "trajkoProkopiev" keGoVidishStambolSoseBardovci
// janjua.tv "soLagaDaSeStoriAga"

FALSE

// strstr(host, "streamscene.cc") || strstr(pageUrl, "streamscene.cc")
|| strstr(host, "tsboard.tv") || strstr(pageUrl, "teamstream.in")
|| strstr(host, "hdstreams.tv") || strstr(pageUrl, "teamstream.to")
|| strstr(pageUrl, "istreams.to") || strstr(pageUrl, "axcast.com")
|| strstr(pageUrl, "dhmediahosting.com") "r"
// axcast.com "requestData"
// dhmediahosting.com "netStreamEnable"

The advantages seem obvious cause you can change the command parameter and support new sites automatically.

I've just compiled this version

http://www.mediafire.com/download/xu...d/rtmpdump.exe

mckv 09-04-2014 06:02 AM

Re: Customized rtmpdump binaries with patch file


 
mips.tv is gaolVanusPobeleVoKosata

denobis 09-04-2014 08:33 AM

Re: Customized rtmpdump binaries with patch file


 
Testing site

Code:

rtmpdump -r "rtmp://77.92.76.182/live" -a "live" -f "WIN 11,5,502,146" -W "http://www.janjua.tv/resources/scripts/eplayer.swf" -p "http://www.janjua.tv/embedplayer/disney2021/1/600/385" -C S:OK  -y "disney2021?id=15838" -K "soLagaDaSeStoriAga;TRUE" -o "disney.flv"
with the compiled rtmpdump

denobis 09-04-2014 08:43 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by mckv (Post 70246)
mips.tv is gaolVanusPobeleVoKosata

Could you test mips.tv with the -K option?

jhb50 09-04-2014 10:21 AM

Re: Customized rtmpdump binaries with patch file


 
Outstanding! Confirmed mips and janjua work with -K
Have you left old code for compat purposes if -K is not specified?
Also is the base code rtmpdump 2.4?


All times are GMT -6. The time now is 03:00 AM.