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?

denobis 09-04-2014 10:50 AM

Re: Customized rtmpdump binaries with patch file


 
The base code is the 2.4 with all KSV patches and some minor modifications. For testing i purged all the old code, but here the version with -K option and old compatibility included

https://www.mediafire.com/folder/nto9t7bx8pkje/rtmpdump

jhb50 09-04-2014 11:48 AM

Re: Customized rtmpdump binaries with patch file


 
@ denobis @ksv Can you guys agree on how to go forward? It would be a shame to have 2 different moded rtmpdumps.
If someone can show denobis how to make a patch, then he can make and post updates to the latest KSV, as he has done here, along with a new patch. KSV can then review the patch and incorporate it as is or with any new KSV changes in his next version.
That would at least keep it together until there is some disagreement regarding a mod.

denobis 09-04-2014 01:13 PM

Re: Customized rtmpdump binaries with patch file


 
I use the sources from git://git.ffmpeg.org/rtmpdump and the ksv patches. Now i can make a new diff with the changes here related. But for now, the relevant mod is the simplification of the channels mentioned through the new option. Not too much code so KSV could implement it and make a new patch.diff. You're right, better to have only one main mod.

nomi 09-04-2014 04:13 PM

Re: Customized rtmpdump binaries with patch file


 
can you plz find the params to play this stream, through wireshark i found out that it is invoking "soLagaDaSeStoriAga" command after connect

http://www.streamer247.com/ptvsports.php

rtmpdump -r "rtmp://46.28.48.116/live" -a "live" -f "WIN 11,5,502,135" -W "http://www.janjua.tv/resources/scripts/eplayer.swf" -p "http://www.janjua.tv/embedplayer/s247ptvpakei/2/600/400" -C "S:OK" -C "N:1" -v "yes" -y "s247ptvpakei?id=19910" -z | "C:\Program Files\VideoLAN\VLC\vlc.exe" -

jhb50 09-04-2014 08:34 PM

Re: Customized rtmpdump binaries with patch file


 
Use the revised rtmpdump and new -K parameter as posted above.

jhb50 09-11-2014 07:58 AM

Re: Customized rtmpdump binaries with patch file


 
I am unable to display page 26 of this thread. Everything up to 25 works fine, and I can see the page 26 posts while adding a reply like this. I suspect others have the same problem since there have been no new posts in the past week.

slim10 09-11-2014 09:15 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by jhb50 (Post 70451)
I am unable to display page 26 of this thread. Everything up to 25 works fine, and I can see the page 26 posts while adding a reply like this. I suspect others have the same problem since there have been no new posts in the past week.

Page 26 appears to be working for me. Before your post today, there were five on this page and yours saying "Use the revised rtmpdump and new -K parameter as posted above" was the last.

Try clearing your browser cache.

KSV 09-11-2014 09:57 AM

Re: Customized rtmpdump binaries with patch file


 
i have updated the binaries incorporating some site changes. regarding adding a custom switch for some sites i think updating the librtmp directly is more suitable especially for novice users who don't know how to find and use the custom commands. also many sites using custom commands need more complex authentication than just sending a command before play. so i am leaving it the way it is for the time being.

H3om 09-11-2014 12:46 PM

Re: Customized rtmpdump binaries with patch file


 
Hi,
i have a issue with play Live-Streams of streamnetwork.tv in VLC or XBMC. :confused: Some streams on the page use the rtmp-protocol which I have read with RTMPDumpHelper v1.21:

Code:

rtmpdump -r "rtmp://pc3oot.us.to:1935/live/" -a "live/" -f "WIN 15,0,0,152" -W "http://www.streamnetwork.tv/page/jwp.swf" -p "http://www.streamnetwork.tv/page/rtmp.php?c=sportnews&auth=2312004c8a66c6599bb1fd1881f64e3a" --live -y "sportnews" -o "2014-09-11_08-22-05_sportnews.flv"
However, I get this error message when I start the stream with last rtmpdump.exe Version:

Quote:

RTMPDump v2.4 GIT-2014-07-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
ERROR: Closing connection: NetStream.Play.Failed
My suspect is the DDos Protection on the homepage which prevents the forwarding of streams. Is it still possible to see the streams on XBMC or VLC Player.

I would be glad if someone would have a solution for the problem.

thx

denobis 09-11-2014 01:16 PM

Re: Customized rtmpdump binaries with patch file


 
Try my compiled rtmpdump with -K "UIUIUINASOWAS;TRUE"

H3om 09-11-2014 02:17 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by denobis (Post 70461)
Try my compiled rtmpdump with -K "UIUIUINASOWAS;TRUE"

I have this option added in the batch file, but the stream does not play. :(

Edit:
I tried it again and now actually running the Stream ... Thanks :)
Can you tell me where did you get the information? I have searched for several days and found nothing.

denobis 09-11-2014 02:28 PM

Re: Customized rtmpdump binaries with patch file


 
1 Attachment(s)
See attach http://stream-recorder.com/forum/att...9&d=1410467169

Only works with my compiled rtmpdump, or you need to get a new compiled one

denobis 09-11-2014 02:47 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by H3om (Post 70465)
I have this option added in the batch file, but the stream does not play. :(

Edit:
I tried it again and now actually running the Stream ... Thanks :)
Can you tell me where did you get the information? I have searched for several days and found nothing.

From the flash

freez 09-11-2014 04:42 PM

Re: Customized rtmpdump binaries with patch file


 
@KSV thanx for updating files , but why not Patch.diff is updated??!! it is zero byte & blank? so we cannot apply new patch!!!

biezom 09-11-2014 05:36 PM

Re: Customized rtmpdump binaries with patch file


 
@KSV hello and thanks for updating files. I'm agree with freez no Pach.diff update! I'm linux user and i need pach to compile thanks. (Sorry for my bad english)

jhb50 09-11-2014 07:47 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

regarding adding a custom switch for some sites i think updating the librtmp directly is more suitable especially for novice users who don't know how to find and use the custom commands. also many sites using custom commands need more complex authentication than just sending a command before play. so i am leaving it the way it is for the time being.
@KSV I agree that librtmp should continue to be updated with all your changes. We were not suggesting that you should eliminate your create stream patches or not add new ones, rather in the interest of timing and the ability to verify new keys before submitting them to you, the request is to also accept any -K parameters and apply them to the link after your changes have been processed. That way novice users are not impacted, but advanced users have increased flex. Thanks.

H3om 09-12-2014 01:34 AM

Re: Customized rtmpdump binaries with patch file


 
Hi @denobis

Quote:

Originally Posted by denobis (Post 70469)
From the flash

Can you describe in more detail how you found the command-line option for -K parameters. Do you have this additional software or tools used?:(

I would also like to know how it is possible prarmeter specify the-K in a m3u8 file, so it XBMC interpreted correctly.? I use the plugin Simple IPTV PVR addon to play the stream.

thx

denobis 09-12-2014 02:07 AM

Re: Customized rtmpdump binaries with patch file


 
Simply:

1- read the swf http://www.streamnetwork.tv/page/jwp.swf

-needed cookies

awesomeAsFuck=AzzlackzSindDoof; azzlack_ddos_intercepter=?

2- zip-decompress the swf

-gzuncompress(substr(swf,8));

3- regex the key

-NetConnection.Connect.Closed
UIUIUINASOWASAuto qualityLabel

H3om 09-12-2014 03:02 AM

Re: Customized rtmpdump binaries with patch file


 
... So the first step I understand yet. This information I can read with wireshark successfully. But from step two I'm stuck because I do not have the knowledge in PHP to build a script. If there is no easier option, I have to just live with it.

Can you tell me how I add the new option -K "command, bool" so also there run the streams in XBMC? Unfortunately XBMC does not understand this option. Your compiled rtmpdump + VLC player works perfect.

denobis 09-12-2014 03:55 AM

Re: Customized rtmpdump binaries with patch file


 
To get the command there is no other option. You can make the decompress with flasm.exe and search inside. For xbmc maybe you need the librtmp dll.

H3om 09-12-2014 05:14 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by denobis (Post 70492)
To get the command there is no other option. You can make the decompress with flasm.exe and search inside. For xbmc maybe you need the librtmp dll.

Thank you very much for your assistance. Now I have also found the command. :D

Which software do I need to create the librtmp.dll? Can you give me a link where the individual steps are described? Is it possible to use librtmp.dll from post # 251?

denobis 09-12-2014 05:27 AM

Re: Customized rtmpdump binaries with patch file


 
You need to compile the c-sources of rtmpdump with the patches. Here in the forum there is a guideline to do it, but the librtmp from #251 works for you

H3om 09-12-2014 06:12 AM

Re: Customized rtmpdump binaries with patch file


 
@denobis
I have the librtmp.dll downloaded from # 251 and copied to this path:
Code:

C:\Program Files (x86)\XBMC\system\players\dvdplayer\librtmp.dll
and the existing librtmp.dll overwritten. But xbmc.log reports the following problem:
Code:

[...]
DEBUG:SECTION:LoadDLL(special://xbmcbin/system/players/dvdplayer/librtmp.dll)
ERROR: Win32DllLoader::Load: Failed to load "C:\Program Files (x86)\XBMC\system\players\dvdplayer\librtmp.dll" with error 182:The operating system cannot run %1.
[...]

Any idea how I could fix this?

denobis 09-12-2014 09:07 AM

Re: Customized rtmpdump binaries with patch file


 
Maybe you need to update the libeay32.dll

copy

http://www.mediafire.com/download/l1...v/libeay32.dll

to xbmc\system

denobis 09-12-2014 10:16 AM

Re: Customized rtmpdump binaries with patch file


 
Oops!,

For the xbmc xml rtmpdump options -K equals to tcommand

KSV 09-12-2014 11:17 AM

Re: Customized rtmpdump binaries with patch file


 
i have updated the package to contain proper Patch.diif file and also the fix for pc3oot was updated.

@denobis
you can send the patch for -K switch if you want to get it merged. i will take a look into it over the next weekend.

hasomaso 09-12-2014 12:16 PM

Re: Customized rtmpdump binaries with patch file


 
thanks for all @KSV ;)

denobis 09-12-2014 12:44 PM

Re: Customized rtmpdump binaries with patch file


 
Hi KSV, thanks for considering it.

This is my patch.diff (between original git and all the patches, yours and mine)

http://www.mediafire.com/download/3j...ey1/patch.diff

taidosl 09-12-2014 01:43 PM

Re: Customized rtmpdump binaries with patch file


 
can anyone post one xbmc with pre-compiled build of your patch for xbmc android?

jhb50 09-12-2014 07:47 PM

Re: Customized rtmpdump binaries with patch file


 
Awesome! Why can't the rest of the world work this well together!


All times are GMT -6. The time now is 08:03 PM.