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 04-23-2013 09:58 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61778)
@RedPenguin
your problem seems more like server configuration issue because the same response is accepted by other servers without any problem. anyway i have disabled it in my patches for compatibility reasons.

Thanks again for the info and all your work combined. Still nice to see some folks working on rtmpdump as it seems the official project seems almost stalled, LoL.

Anyway, I figured at first maybe they were trying to purposely break rtmpdump but I think your answer makes more sense.

Stream Ripper 04-23-2013 11:34 PM

Re: Customized rtmpdump binaries with patch file


 
Thanks as always KSV :)

gorilla.maguila 04-24-2013 07:33 AM

Re: Customized rtmpdump binaries with patch file


 
More info on the crash I've found:

After deeper debugging, I've found that the crash is happening in calloc:

Code:

RTMPPacket_Alloc(RTMPPacket *p, int nSize)
{
  //Crash in calloc
  char *ptr = calloc(1, nSize + RTMP_MAX_HEADER_SIZE);
  if (!ptr)
    return FALSE;
  p->m_body = ptr + RTMP_MAX_HEADER_SIZE;
  p->m_nBytesRead = 0;
  return TRUE;
}


That memory corruption pointed me to run with valgrind, that showed the culprit:

Code:

==22473== Invalid write of size 1
==22473==    at 0x4E421DC: HandleInvoke (rtmp.c:3333)
==22473==    by 0x4E4368D: RTMP_ClientPacket (rtmp.c:1361)
==22473==    by 0x4E43849: RTMP_ConnectStream (rtmp.c:1152)
==22473==    by 0x403BFA: main (rtmpdump.c:1374)
==22473==  Address 0x61e1c67 is 0 bytes after a block of size 39 alloc'd
==22473==    at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22473==    by 0x4E42189: HandleInvoke (rtmp.c:3328)
==22473==    by 0x4E4368D: RTMP_ClientPacket (rtmp.c:1361)
==22473==    by 0x4E43849: RTMP_ConnectStream (rtmp.c:1152)
==22473==    by 0x403BFA: main (rtmpdump.c:1374)

Full valgrind output http://pastebin.com/9bAXB9W9

So it seems that the memory corruption exists due to AMF_DecodeInt24 returning incorrect size:

Code:

packet->m_nBodySize = AMF_DecodeInt24(header + 3);
and then allocating the memory, the crash occurs.

Code:

if (!RTMPPacket_Alloc(packet, packet->m_nBodySize))
Maybe KSV can enlighten me here, but I think the proof is that allocating more memory avoids the crash:

Code:

if (!RTMPPacket_Alloc(packet, 2*packet->m_nBodySize))

KSV 04-24-2013 12:07 PM

Re: Customized rtmpdump binaries with patch file


 
try updating the relevant block with following code.

Code:

          if (code == 302 && RTMP_FindFirstMatchingProperty(&obj2, &av_redirect, &p))
            {
              AMFProp_GetString(&p, &redirect);
              r->Link.redirected = TRUE;

              char *playpath = "//playpath";
              int len = redirect.av_len + strlen(playpath);
              char *url = malloc(len + 1);
              memcpy(url, redirect.av_val, redirect.av_len);
              memcpy(url + redirect.av_len, playpath, strlen(playpath));
              url[len] = '\0';
              r->Link.tcUrl.av_val = url;
              r->Link.tcUrl.av_len = redirect.av_len;
              RTMP_ParseURL(url, &r->Link.protocol, &r->Link.hostname, &parsedPort, &r->Link.playpath0, &r->Link.app);
              if (parsedPort)
                r->Link.port = parsedPort;
            }
        }


gorilla.maguila 04-24-2013 01:29 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61840)
try updating the relevant block with following code.

Code:

          if (code == 302 && RTMP_FindFirstMatchingProperty(&obj2, &av_redirect, &p))
            {
              AMFProp_GetString(&p, &redirect);
              r->Link.redirected = TRUE;

              char *playpath = "//playpath";
              int len = redirect.av_len + strlen(playpath);
              char *url = malloc(len + 1);
              memcpy(url, redirect.av_val, redirect.av_len);
              memcpy(url + redirect.av_len, playpath, strlen(playpath));
              url[len] = '\0';
              r->Link.tcUrl.av_val = url;
              r->Link.tcUrl.av_len = redirect.av_len;
              RTMP_ParseURL(url, &r->Link.protocol, &r->Link.hostname, &parsedPort, &r->Link.playpath0, &r->Link.app);
              if (parsedPort)
                r->Link.port = parsedPort;
            }
        }



Thanks KSV, it's SOLVED.

Do you think it's worthy to look at the possible memory leaks pointed out by valgrind, like the

Code:

char *url = malloc(len + 1)
Never being freed, or they're false positive?

Thanks again

RedPenguin 04-25-2013 01:26 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by flocked (Post 61767)
Could anyone please compile it for mac? thanks!!

This has been done, at least if you are running x86 32 or 64.

http://www.mediafire.com/#x4cvp5hl4m9xr (look under Newer - ATV1+MacOS).

I can make PPC versions if necessary but right now my cross-compilers are x86-based.

KSV 04-25-2013 10:06 AM

Re: Customized rtmpdump binaries with patch file


 
Changes:
Code:

1. added onFCSubscribe response to rtmpsrv to detect more streams
2. show complete debug info in rtmpsuck when connection is closed
3. fixed a small bug in redirect handling (allocating 1 byte less than required)

first post updated with latest package.

KSV 04-25-2013 10:11 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by gorilla.maguila (Post 61842)
Do you think it's worthy to look at the possible memory leaks pointed out by valgrind, like the

Code:

char *url = malloc(len + 1)
Never being freed, or they're false positive?

we are using the same buffer for tcUrl so it can't be freed right away. it will not be worth making a copy because memory consumption would be same in that case.

alexanderd 04-25-2013 11:30 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61791)
no, it has nothing to do with RTMPDump Helper. make sure new binaries are in the same folder as RTMPDump Helper.

I tried capturing on my parents' old computer. And it worked well! The timestamp has been added to filename!
The main difference between my both computer and notebook (the problem is on both) and my parents' comp - is OS. Mine are worked under Win7 Ultimate SP1 (with updates). Parents' - under WinXP.
And what OS do you use, KSV?

KSV 04-26-2013 02:02 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by alexanderd (Post 61860)
Mine are worked under Win7 Ultimate SP1 (with updates). Parents' - under WinXP.
And what OS do you use, KSV?

it doesn't have anything to do with OS. can anyone else confirm this on a different OS than XP?

diablo888 04-26-2013 08:16 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61871)
it doesn't have anything to do with OS. can anyone else confirm this on a different OS than XP?

i can confirm adding timestamps doesnt work here either, win 7 ultimate

latest rtmpsuck and rtmpdump
Code:

RTMP Proxy Server v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
Processing connect
      app : NxServer
  flashVer : WIN 11,5,502,110
    swfUrl : http://www.myfreecams.com/mfc2/flash/MfcVideo121228.swf
    tcUrl : rtmp://video100.myfreecams.com:1935/NxServer
  pageUrl : http://www.myfreecams.com/mfc2/static/player.html?broadcaster_id=0&
cache_id=1365466682&target=main
      live : no
  Playpath : mfc_107297555
 Saving as : mfc_107297555.flv
WARNING: ignoring too small audio packet: size: 0

edit: runnin it with rtmpdumphelper, and as poster before said: it WORKS on WindowsXP here... strangely enough...NOT on win7, i started a new folder from scratch on both machines, winxp works, win7 didnt :/

RedPenguin 04-27-2013 06:36 PM

Re: Customized rtmpdump binaries with patch file


 
I have compiled Linux 32/64, MacOS x86 32/64, and iOS (figured maybe somebody needs) of this release for anybody who needs them.

http://www.mediafire.com/?x4cvp5hl4m9xr it's under the Newer folder and then pick your OS/Arch

chap 04-27-2013 10:54 PM

Re: Customized rtmpdump binaries with patch file


 
RedPenguin
Thanks:cool:

CLran619 04-28-2013 01:02 AM

Re: Customized rtmpdump binaries with patch file


 
up until today i have been using rtmpsrv to capture adult swim content from xbmc. how ever all of a sudden this happens every time......any help. i cant resume the download
Code:

RTMP Server v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu; license: GPL

Streaming on rtmp://0.0.0.0:1935

rtmpdump -r "rtmpe://cp219687.edgefcs.net/ondemand" -a "ondemand?auth=daEcMaWaJb
xbpd_cMcQcQaQdLd4akaMara3-brFmFV-hca-rmLuHCIsA&aifp=v001&slist=protected/2013-04
/ASOE1004241300054570_B1R1" -y "mp4:protected/2013-04/ASOE1004241300054570_B1R1"
 -o "ASOE1004241300054570_B1R1.flv"

Closing connection... done!

RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
ERROR: HandleCtrl: Ignoring SWFVerification request, use --swfVfy!
Starting download at: 0.000 kB
INFO: Metadata:
INFO:  duration                694.10
INFO:  moovPosition            40.00
INFO:  width                  1280.00
INFO:  height                  720.00
INFO:  videocodecid            avc1
INFO:  audiocodecid            mp4a
INFO:  avcprofile              77.00
INFO:  avclevel                40.00
INFO:  aacaot                  2.00
INFO:  videoframerate          29.97
INFO:  audiosamplerate        48000.00
INFO:  audiochannels          2.00
INFO: trackinfo:
INFO:  length                  20822802.00
INFO:  timescale              30000.00
INFO: sampledescription:
INFO:  sampletype              avc1
INFO:  length                  33316864.00
INFO:  timescale              48000.00
INFO: sampledescription:
INFO:  sampletype              mp4a
INFO:  length                  694101.00
INFO:  timescale              1000.00
INFO: sampledescription:
INFO:  sampletype              tx3g
INFO:  displayflags            0.00
INFO:  horizontaljustification 1.00
INFO:  verticaljustification  255.00
INFO:  backgroundcolor        0.00
INFO: defaulttextbox:
INFO:  top                    0.00
INFO:  left                    0.00
INFO:  bottom                  720.00
INFO:  right                  1280.00
INFO: defaultstyle:
INFO:  startchar              0.00
INFO:  endchar                0.00
INFO:  fontid                  1.00
INFO:  facestyleflags          0.00
INFO:  fontsize                18.00
INFO:  textcolor              4294967295.00
70853.618 kB / 297.33 sec (42.8%)
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
71214.892 kB / 298.20 sec (42.9%)
Download may be incomplete (downloaded about 42.90%), try resuming


KSV 04-28-2013 02:17 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by diablo888 (Post 61877)
runnin it with rtmpdumphelper, and as poster before said: it WORKS on WindowsXP here... strangely enough...NOT on win7, i started a new folder from scratch on both machines, winxp works, win7 didnt :/

That's pretty strange issue. i will look into this in a day or two.

Quote:

Originally Posted by CLran619 (Post 61891)
up until today i have been using rtmpsrv to capture adult swim content from xbmc. how ever all of a sudden this happens every time......any help. i cant resume the download

Code:

ERROR: HandleCtrl: Ignoring SWFVerification request, use --swfVfy!
isn't it clear enough? you should have used -W | --swfVfy switch. what's the problem with resume? post the debug log after adding following to rtmpdump command.
Code:

-z 2> Debug.txt

CLran619 04-28-2013 04:32 AM

Re: Customized rtmpdump binaries with patch file


 
hmmmmm. lil new to this whole thing so i don't catch on to error codes being spit out at me. ik last week it worked fine and now it doesnt lol. as far as --swfvfy command i wouldn't know where to work that in. sorry for the newbish-ness lol

CLran619 04-28-2013 04:49 AM

Re: Customized rtmpdump binaries with patch file


 
again sorry for my newb comments but ive got to learn somewhere. after an hour or so on the wiki and studying how to properly use some of the commands ive figuered out both of my issues thx KSV for compiling this :) also just a question. are u involved with teamXBMC at all? i feel like ive seen ur name in their forums b4

flocked 04-28-2013 06:12 AM

Re: Customized rtmpdump binaries with patch file


 
Should this one work with chaturbate?
Because I only get "Model status is error" on mac.

alexanderd 05-04-2013 05:40 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61892)
That's pretty strange issue. i will look into this in a day or two.

Any luck with rtmpsuck+win7 issue?

KSV 05-07-2013 03:29 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by alexanderd (Post 61971)
Any luck with rtmpsuck+win7 issue?

i have found and fixed the issue. timestamp buffer was 1 byte less than required. it was working as expected on XP but causing trouble on some other platforms. first post is updated with new package.

@All:

when you thank me for my contribution don't forget that it also contain patches from Xeebo. so spread your thanks evenly :D.

alexanderd 05-07-2013 05:19 AM

Re: Customized rtmpdump binaries with patch file


 
So many thanks!!! To both of you, guys!

flocked 05-09-2013 02:42 PM

Re: Customized rtmpdump binaries with patch file


 
KSV or anyone else:
Could you please take a look why I get a "Model status is error message" with a for Mac compiled rtmpdump version. I try to use it with chaturbate.
I already tried this customized rtmpdump, as well as the other KSV version. - I compiled it probably 100 times and downloaded precompiled mac versions. I simply can't find the error.

I use the same rtmpdump command with Windows and it works without any error codes:
Code:

rtmpdump -r "rtmp://edge9-a.stream.highwebmedia.com/live-edge" -W "http://chaturbate.com/static/flash/CBV_2p634.swf" -p "http://chaturbate.com/water741/" -C S:MY_USERNAME -C S:water741 -C S:2.634 -C S:PASSWORD_HASH --live -y "anything_here" -o "AAA.flv"

jonnyv 05-10-2013 11:25 AM

Re: Customized rtmpdump binaries with patch file


 
I have been directed to your thread as you may be able to help. I am running android with version 4.2.2 on tablet.

I use xbmc for my media. IPlayer tvcatchup and mutiple add ons are working fine. But 4od demand 5, itv player and others it goes to load video then nothing happens.

The log can be seen here
http://xbmclogs.com/show.php?id=17072

And the current thread I am on where I have been directed here is here http://forum.xbmc.org/showthread.php?tid=162307&page=12
As there is more information there.

Thanks. Any help would be much appreciated.

KSV 05-10-2013 11:47 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by jonnyv (Post 62108)
I have been directed to your thread as you may be able to help. I am running android with version 4.2.2 on tablet.

You are not using the updated librtmp. make sure you replace it in correct location. some devices also replace the modified librtmp with stock one considering it as tampered file on reboot.

Code:

19:04:52 T:1745806312  DEBUG: SECTION:LoadDLL(librtmp.so)
19:04:52 T:1745806312  DEBUG: Loading: /data/app-lib/org.xbmc.xbmc-1/librtmp.so


jonnyv 05-11-2013 04:49 AM

Re: Customized rtmpdump binaries with patch file


 
Right just updated librtmp and still same thing.

Log here http://xbmclogs.com/show.php?id=17856

chap 05-11-2013 03:06 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by jonnyv (Post 62119)
Right just updated librtmp and still same thing.
Quote:

FALLBACK None : 'u'playURL: rtmpe://ak.ps3-securestream.channel4.com/ondemand/?ovpfv=1.1&auth=da_akaIbybAdzd5bOd6cSamadbwalb7ajc W-brJIrr-4q-Y1g-oVpbpYrSjhrfnbmRnSmUkesas7sSjdn7n8qVocrTkUsWoRl6nU mSk6s7sbraj8oRn7pdparWkercoSmX&aifp=v002&slist=PS3/CH4_25_02_25_56666003001001_001.mp4 app=ondemand/?ovpfv=1.1&auth=da_akaIbybAdzd5bOd6cSamadbwalb7ajc W-brJIrr-4q-Y1g-oVpbpYrSjhrfnbmRnSmUkesas7sSjdn7n8qVocrTkUsWoRl6nU mSk6s7sbraj8oRn7pdparWkercoSmX&aifp=v002&slist=PS3/CH4_25_02_25_56666003001001_001.mp4 playpath=mp4:PS3/CH4_25_02_25_56666003001001_001.mp4?auth=da_akaIby bAdzd5bOd6cSamadbwalb7ajcW-brJIrr-4q-Y1g-oVpbpYrSjhrfnbmRnSmUkesas7sSjdn7n8qVocrTkUsWoRl6nU mSk6s7sbraj8oRn7pdparWkercoSmX&aifp=v002&slist=PS3/CH4_25_02_25_56666003001001_001.mp4 swfurl=http://ps3.channel4.com/swf/ps3player-9.0.124-1.27.2.swf swfvfy=true pageurl=http://www.channel4.com''

rightly so
Code:

rtmpdump -r "rtmpe://ak.ps3-securestream.channel4.com:1935/ondemand/" -a "ondema
nd/?ovpfv=1.1&auth=da_bjcxa8b5d_ascYc.d6dqdkaEbQdZbXch-brJRbV-4q-73f-jdqhmbsSkUl
bsVqWjdkWmXlSs7qetVm7j8q9m9rfkWmWrapajcj7lflRtXqatSnVj7ren8rek8m1s0qZ&aifp=v002&
slist=PS3/CH4_25_02_25_56666003001001_001.mp4" -f "WIN 11,6,602,180" -W "http://
ps3.channel4.com/swf/ps3player-9.0.124-1.27.2.swf" -p "http://ps3.channel4.com/"
 -C Z: -y "mp4:PS3/CH4_25_02_25_56666003001001_001.mp4" -o "2013-05-11_11-56-05_
CH4_25_02_25_56666003001001_001.flv"

Code:

RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:  duration                2781.10
INFO:  moovPosition            32.00
INFO:  width                  640.00
INFO:  height                  360.00
INFO:  videocodecid            avc1
INFO:  audiocodecid            mp4a
INFO:  avcprofile              100.00
INFO:  avclevel                41.00
INFO:  aacaot                  2.00
INFO:  videoframerate          25.00
INFO:  audiosamplerate        24000.00
INFO:  audiochannels          2.00
INFO: trackinfo:
INFO:  length                  69525000.00
INFO:  timescale              25000.00
INFO:  language                eng
INFO: sampledescription:
INFO:  sampletype              avc1
INFO:  length                  66746368.00
INFO:  timescale              24000.00
INFO:  language                eng
INFO: sampledescription:
INFO:  sampletype              mp4a
1282.570 kB / 11.96 sec (0.4%)


Mossy 05-11-2013 04:24 PM

Re: Customized rtmpdump binaries with patch file


 
The URL/parameters from Jonny's log works too, just not on Android apparently.

E.g.
Code:

rtmpdump --rtmp "rtmpe://ak.ps3-securestream.channel4.com/ondemand/?ovpfv=1.1&auth=da_c8blcycbb.cDb.cFcJb8bgdKdicKdaa_-brJRWu-4q-Y2d-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pfp9reqTkVmbkRlXo6kem3tfmVlXp2k2&aifp=v002&slist=PS3/CH4_25_02_25_8343003001002_001.mp4"
-o "absolutely.s01e003.flv" --app "ondemand/?ovpfv=1.1&auth=da_c8blcycbb.cDb.cFcJb8bgdKdicKdaa_-brJRWu-4q-Y2d-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pfp9reqTkVmbkRlXo6kem3tfmVlXp2k2&aifp=v002&slist=PS3/CH4_25_02_25_8343003001002_001.mp4"
--playpath "mp4:PS3/CH4_25_02_25_8343003001002_001.mp4?auth=da_c8blcycbb.cDb.cFcJb8bgdKdicKdaa_-brJRWu-4q-Y2d-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pfp9reqTkVmbkRlXo6kem3tfmVlXp2k2&aifp=v002&slist=PS3/CH4_25_02_25_8343003001002_001.mp4"
--swfVfy "http://ps3.channel4.com/swf/ps3player-9.0.124-1.27.2.swf" --pageUrl "http://www.channel4.com"

results in...

Code:

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
Starting download at: 0.000 kB
INFO: Metadata:
INFO:  duration              2134.10
INFO:  moovPosition          32.00
INFO:  width                640.00
INFO:  height                360.00
INFO:  videocodecid          avc1
INFO:  audiocodecid          mp4a
INFO:  avcprofile            100.00
INFO:  avclevel              41.00
INFO:  aacaot                2.00
INFO:  videoframerate        25.00
INFO:  audiosamplerate      24000.00
INFO:  audiochannels        2.00
INFO: trackinfo:
INFO:  length                53350000.00
INFO:  timescale            25000.00
INFO:  language              eng
INFO: sampledescription:
INFO:  sampletype            avc1
INFO:  length                51218432.00
INFO:  timescale            24000.00
INFO:  language              eng
INFO: sampledescription:
INFO:  sampletype            mp4a
4711.501 kB / 42.64 sec (1.9%)


jonnyv 05-11-2013 04:29 PM

Re: Customized rtmpdump binaries with patch file


 
Sorry I am new to all this...

Am I meant to put this code somewhere?

yetanotherday 05-12-2013 06:41 PM

Re: Customized rtmpdump binaries with patch file


 
KSV your last version of rtmp messed up things for me , cant get chaturbate videos work on totem video player also the dumped files has bad quality with vlc , i use rtmpsuck tool since i cant get rtmpdump work on ubuntu

its seem that i'm not able to download

WARNING: ignoring too small audio packet: size: 0

Totem : Could not decode stream :(

KSV 05-19-2013 12:25 PM

Re: Customized rtmpdump binaries with patch file


 
Changes:
Code:

1. added support for featve.com changes
2. added support for wfctv.com


breaks 05-19-2013 03:03 PM

Re: Customized rtmpdump binaries with patch file


 
http://www.mediafire.com/file/y40qsc...mpdump-2.4.zip returns an error. Please re-upload.

KSV 05-20-2013 03:51 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by breaks (Post 62273)
http://www.mediafire.com/file/y40qsc...mpdump-2.4.zip returns an error. Please re-upload.

package re-uploaded.

freez 05-20-2013 05:19 PM

Re: Customized rtmpdump binaries with patch file


 
Thanx ksv every thing works ok with latest patched files

jhb50 05-21-2013 08:52 PM

Re: Customized rtmpdump binaries with patch file


 
Has anyone compiled ffmpeg for windows with the librtmp provided by KSV, that they would be willing to share?

mariner 05-26-2013 12:46 AM

Re: Customized rtmpdump binaries with patch file


 
Greetings KSV. Thanks for the updates. Appreciate if you can help with a few problems using the latest patch.

Code:

rtmpdump -r "rtmp://88.212.206.42:1935/archive" -a "archive" -f "WIN 11,7,700,202" -W "http://echomsk.onlinetv.ru/hd/player.swf" -p "http://echomsk.onlinetv.ru/hd/kaz_14052013_5/" -y "mp4:filarmonia/kaz_14052013_5hd.mp4" -o "14052013_5hd.flv"
1. The download keeps getting interrupted after a few minutes. It would resume recording from the beginning but write to the same file, rendering the file unusable. Using the -v flag seems to get around this issue. Any idea?

2. The downloaded file size reported appears to be incorrect. Getting consistent file size seems to be a hit and miss affair. How does one determine if the downloaded file size is correct?

Code:

rtmpdump -r "rtmp://88.212.206.42:193
5/archive" -a "archive" -f "WIN 11,7,700,202" -W "http://echomsk.onlinetv.ru/hd/
player.swf" -p "http://echomsk.onlinetv.ru/hd/kaz_14052013_5/" -y "mp4:filarmoni
a/kaz_14052013_5hd.mp4" -o "14052013_5hd.flv" -v
RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: trackinfo:
INFO:  timescale              90000.00
INFO:  length                  784149216.00
INFO:  language                eng
INFO: sampledescription:
INFO:  sampletype              mp4a
INFO:  timescale              90000.00
INFO:  length                  784148384.00
INFO:  language                eng
INFO: sampledescription:
INFO:  sampletype              avc1
INFO:  audiochannels          2.00
INFO:  audiosamplerate        90000.00
INFO:  videoframerate          25.00
INFO:  aacaot                  2.00
INFO:  avclevel                40.00
INFO:  avcprofile              77.00
INFO:  audiocodecid            mp4a
INFO:  videocodecid            avc1
INFO:  width                  1280.00
INFO:  height                  720.00
INFO:  frameWidth              1280.00
INFO:  frameHeight            720.00
INFO:  displayWidth            1280.00
INFO:  displayHeight          720.00
INFO:  framerate              25.00
INFO:  moovposition            28.00
INFO:  duration                8712.77
-455236.327 kB / 8712.75 sec (99.9%))
Download complete

3. At times rtmpdump would report the following error and crash.

Code:

ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 20671
ERROR: WriteN, RTMP send error 10038 (5 bytes)
ERROR: WriteN, RTMP send error 10038 (5 bytes)
.
.

Many thanks and best regards.

rtmpdumper1 05-27-2013 06:36 PM

Re: Customized rtmpdump binaries with patch file


 
I just compiled this again on Mac OSX, applying the KSV patch following KSV's instructions, when I run it it shows me this :

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL


If it's correctly patched, is this what I should see?


I notice in the post before me it also says "GIT-2012-12-30 (Compiled by KSV)", but, perhaps this is because I am on a different OS?

marktr 05-27-2013 06:44 PM

Re: Customized rtmpdump binaries with patch file


 
@rtmpdumper1 The credits aren't in the patch itself but were in the windows binaries last time I checked. there is not a single reference to "(Compiled by KSV)" in it, if you look into it. After all, it is instead compiled by you ;)

You should look at the output of the patch command to check whether it patched correctly. Then, if you build and install it system-wide, make sure that any existing librtmp in your system is superseded by this patched version.

rtmpdumper1 05-27-2013 08:02 PM

Re: Customized rtmpdump binaries with patch file


 
@marktr I looked through the patch and didn't see it, so I figured things were correct but wanted to make sure.

When I applied the patch, it patched each file and didn't throw an error, so I'm pretty sure it worked.

When you say to make sure any librtmp on the system is superseded by the patched version, I assume you mean the librtmp that gets installed into /usr/local/lib? I cd'd into the directory and this is what I found:

librtmp.0.dylib librtmp.a librtmp.dylib pkgconfig

How would I tell if that version is patched?


EDIT:
Just saw you posted over on the other thread. Seems everything is working as expected now. Thanks!

marktr 05-27-2013 08:27 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by rtmpdumper1 (Post 62440)

(...snip...)

librtmp.0.dylib librtmp.a librtmp.dylib pkgconfig

How would I tell if that version is patched?

1) timestamp of the rtmp related files should suffice

2) if not, as you realized, if a feature the patch enables over stock rtmpdump starts working, it is a good enough indicator

paxo 05-28-2013 10:48 AM

Re: Customized rtmpdump binaries with patch file


 
Latest KSV-rtmpdump causes an "Access denied" error in some US based servers. The latest version sends two bytes less in the connect packet than the previous one (sizes 495 vs 497.)

Code:

DEBUG: Parsed protocol: 0
DEBUG: Parsed host    : cp48590.edgefcs.net
DEBUG: Parsed app    : ondemand/?auth=daEajbbdbd4bNcPcTavc7bTb_aCdudOdPab-brPnSq-h0-NaxPdXpe&aifp=v001&slist=video/temp_hd_gallery_video/CBS_Production_Outlet_VMS/1024/887
DEBUG: Protocol : RTMP
DEBUG: Hostname : cp48590.edgefcs.net
DEBUG: Port    : 1935
DEBUG: Playpath : mp4:video/temp_hd_gallery_video/CBS_Production_Outlet_VMS/1024/887/CBS_LETTERMAN_3857_CONTENT_CIAN_764.mp4
DEBUG: tcUrl    : rtmp://cp48590.edgefcs.net:1935/ondemand/?auth=daEajbbdbd4bNcPcTavc7bTb_aCdudOdPab-brPnSq-h0-NaxPdXpe&aifp=v001&slist=video/temp_hd_gallery_video/CBS_Production_Outlet_VMS/1024/887
DEBUG: app      : ondemand/?auth=daEajbbdbd4bNcPcTavc7bTb_aCdudOdPab-brPnSq-h0-NaxPdXpe&aifp=v001&slist=video/temp_hd_gallery_video/CBS_Production_Outlet_VMS/1024/887
DEBUG: live    : no
DEBUG: timeout  : 30 sec
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Type Answer  : 03
DEBUG: HandShake: Server Uptime : 1503316640
DEBUG: HandShake: FMS Version  : 4.5.2.1
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG2: RTMP_SendPacket: fd=1844, size=495
DEBUG2:  0000:  03 00 00 00 00 01 ef 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 94 6f 6e 64 65  ......app...onde
DEBUG2:  0020:  6d 61 6e 64 2f 3f 61 75  74 68 3d 64 61 45 61 6a  mand/?auth=daEaj
DEBUG2:  0030:  62 62 64 62 64 34 62 4e  63 50 63 54 61 76 63 37  bbdbd4bNcPcTavc7
DEBUG2:  0040:  62 54 62 5f 61 43 64 75  64 4f 64 50 61 62 2d 62  bTb_aCdudOdPab-b
DEBUG2:  0050:  72 50 6e 53 71 2d 68 30  2d 4e 61 78 50 64 58 70  rPnSq-h0-NaxPdXp
DEBUG2:  0060:  65 26 61 69 66 70 3d 76  30 30 31 26 73 6c 69 73  e&aifp=v001&slis
DEBUG2:  0070:  74 3d 76 69 64 65 6f 2f  74 65 6d 70 5f 68 64 5f  t=video/temp_hd_
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  67 61 6c 6c 65 72 79 5f  76 69 64 65 6f 2f 43 42  gallery_video/CB
DEBUG2:  0010:  53 5f 50 72 6f 64 75 63  74 69 6f 6e 5f 4f 75 74  S_Production_Out
DEBUG2:  0020:  6c 65 74 5f 56 4d 53 2f  31 30 32 34 2f 38 38 37  let_VMS/1024/887
DEBUG2:  0030:  00 08 66 6c 61 73 68 56  65 72 02 00 0e 57 49 4e  ..flashVer...WIN
DEBUG2:  0040:  20 31 30 2c 30 2c 33 32  2c 31 38 00 05 74 63 55    10,0,32,18..tcU
DEBUG2:  0050:  72 6c 02 00 b4 72 74 6d  70 3a 2f 2f 63 70 34 38  rl...rtmp://cp48
DEBUG2:  0060:  35 39 30 2e 65 64 67 65  66 63 73 2e 6e 65 74 3a  590.edgefcs.net:
DEBUG2:  0070:  31 39 33 35 2f 6f 6e 64  65 6d 61 6e 64 2f 3f 61  1935/ondemand/?a
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  75 74 68 3d 64 61 45 61  6a 62 62 64 62 64 34 62  uth=daEajbbdbd4b
DEBUG2:  0010:  4e 63 50 63 54 61 76 63  37 62 54 62 5f 61 43 64  NcPcTavc7bTb_aCd
DEBUG2:  0020:  75 64 4f 64 50 61 62 2d  62 72 50 6e 53 71 2d 68  udOdPab-brPnSq-h
DEBUG2:  0030:  30 2d 4e 61 78 50 64 58  70 65 26 61 69 66 70 3d  0-NaxPdXpe&aifp=
DEBUG2:  0040:  76 30 30 31 26 73 6c 69  73 74 3d 76 69 64 65 6f  v001&slist=video
DEBUG2:  0050:  2f 74 65 6d 70 5f 68 64  5f 67 61 6c 6c 65 72 79  /temp_hd_gallery
DEBUG2:  0060:  5f 76 69 64 65 6f 2f 43  42 53 5f 50 72 6f 64 75  _video/CBS_Produ
DEBUG2:  0070:  63 74 69 6f 6e 5f 4f 75  74 6c 65 74 5f 56 4d 53  ction_Outlet_VMS
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  2f 31 30 32 34 2f 38 38  37 00 04 66 70 61 64 01  /1024/887..fpad.
DEBUG2:  0010:  00 00 0c 63 61 70 61 62  69 6c 69 74 69 65 73 00  ...capabilities.
DEBUG2:  0020:  40 6d e0 00 00 00 00 00  00 0b 61 75 64 69 6f 43  @m........audioC
DEBUG2:  0030:  6f 64 65 63 73 00 40 ab  ee 00 00 00 00 00 00 0b  odecs.@.........
DEBUG2:  0040:  76 69 64 65 6f 43 6f 64  65 63 73 00 40 6f 80 00  videoCodecs.@o..
DEBUG2:  0050:  00 00 00 00 00 0d 76 69  64 65 6f 46 75 6e 63 74  ......videoFunct
DEBUG2:  0060:  69 6f 6e 00 3f f0 00 00  00 00 00 00 00 00 09      ion.?..........
DEBUG: Invoking connect
INFO: Connected...
DEBUG2: RTMP_ReadPacket: fd=1844
DEBUG2:  0000:  03 00 00 00 00 00 86 14  00 00 00 00              ............
DEBUG2:  0000:  02 00 06 5f 65 72 72 6f  72 00 3f f0 00 00 00 00  ..._error.?.....
DEBUG2:  0010:  00 00 05 03 00 05 6c 65  76 65 6c 02 00 05 65 72  ......level...er
DEBUG2:  0020:  72 6f 72 00 04 63 6f 64  65 02 00 1e 4e 65 74 43  ror..code...NetC
DEBUG2:  0030:  6f 6e 6e 65 63 74 69 6f  6e 2e 43 6f 6e 6e 65 63  onnection.Connec
DEBUG2:  0040:  74 2e 52 65 6a 65 63 74  65 64 00 0b 64 65 73 63  t.Rejected..desc
DEBUG2:  0050:  72 69 70 74 69 6f 6e 02  00 29 5b 20 41 63 63 65  ription..)[ Acce
DEBUG2:  0060:  73 73 4d 61 6e 61 67 65  72 2e 52 65 6a 65 63 74  ssManager.Reject
DEBUG2:  0070:  20 5d 20 3a 20 41 63 63  65 73 73 20 64 65 6e 69    ] : Access deni
DEBUG2: RTMP_ReadPacket: fd=1844
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  65 64 21 00 00 09                                  ed!...
DEBUG: RTMP_ClientPacket, received: invoke 134 bytes
DEBUG: (object begin)
DEBUG: Property: <Name:            no-name, STRING:    _error>
DEBUG: Property: <Name:            no-name, NUMBER:    1.00>
DEBUG: Property: NULL
DEBUG: Property: <Name:            no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING:    error>
DEBUG: Property: <Name:              code, STRING:    NetConnection.Connect.Rejected>
DEBUG: Property: <Name:        description, STRING:    [ AccessManager.Reject ] : Access denied!>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_error>
ERROR: rtmp server sent error
DEBUG2: RTMP_ReadPacket: fd=1844
DEBUG2:  0000:  03 00 00 00 00 00 12 14  00 00 00 00              ............
DEBUG2:  0000:  02 00 05 63 6c 6f 73 65  00 00 00 00 00 00 00 00  ...close........
DEBUG2:  0010:  00 05                                              ..
DEBUG: RTMP_ClientPacket, received: invoke 18 bytes
DEBUG: (object begin)
DEBUG: Property: <Name:            no-name, STRING:    close>
DEBUG: Property: <Name:            no-name, NUMBER:    0.00>
DEBUG: Property: NULL
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <close>
ERROR: rtmp server requested close
DEBUG: Closing connection.



Debug of the previous working version (compiled in February if I remember correctly):

Code:

DEBUG2: RTMP_SendPacket: fd=1844, size=497
DEBUG2:  0000:  03 00 00 00 00 01 f1 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 95 6f 6e 64 65  ......app...onde
DEBUG2:  0020:  6d 61 6e 64 2f 3f 61 75  74 68 3d 64 61 45 61 6a  mand/?auth=daEaj
DEBUG2:  0030:  62 62 64 62 64 34 62 4e  63 50 63 54 61 76 63 37  bbdbd4bNcPcTavc7
DEBUG2:  0040:  62 54 62 5f 61 43 64 75  64 4f 64 50 61 62 2d 62  bTb_aCdudOdPab-b
DEBUG2:  0050:  72 50 6e 53 71 2d 68 30  2d 4e 61 78 50 64 58 70  rPnSq-h0-NaxPdXp
DEBUG2:  0060:  65 26 61 69 66 70 3d 76  30 30 31 26 73 6c 69 73  e&aifp=v001&slis
DEBUG2:  0070:  74 3d 76 69 64 65 6f 2f  74 65 6d 70 5f 68 64 5f  t=video/temp_hd_
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  67 61 6c 6c 65 72 79 5f  76 69 64 65 6f 2f 43 42  gallery_video/CB
DEBUG2:  0010:  53 5f 50 72 6f 64 75 63  74 69 6f 6e 5f 4f 75 74  S_Production_Out
DEBUG2:  0020:  6c 65 74 5f 56 4d 53 2f  31 30 32 34 2f 38 38 37  let_VMS/1024/887
DEBUG2:  0030:  2f 00 08 66 6c 61 73 68  56 65 72 02 00 0e 57 49  /..flashVer...WI
DEBUG2:  0040:  4e 20 31 30 2c 30 2c 33  32 2c 31 38 00 05 74 63  N 10,0,32,18..tc
DEBUG2:  0050:  55 72 6c 02 00 b5 72 74  6d 70 3a 2f 2f 63 70 34  Url...rtmp://cp4
DEBUG2:  0060:  38 35 39 30 2e 65 64 67  65 66 63 73 2e 6e 65 74  8590.edgefcs.net
DEBUG2:  0070:  3a 31 39 33 35 2f 6f 6e  64 65 6d 61 6e 64 2f 3f  :1935/ondemand/?
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  61 75 74 68 3d 64 61 45  61 6a 62 62 64 62 64 34  auth=daEajbbdbd4
DEBUG2:  0010:  62 4e 63 50 63 54 61 76  63 37 62 54 62 5f 61 43  bNcPcTavc7bTb_aC
DEBUG2:  0020:  64 75 64 4f 64 50 61 62  2d 62 72 50 6e 53 71 2d  dudOdPab-brPnSq-
DEBUG2:  0030:  68 30 2d 4e 61 78 50 64  58 70 65 26 61 69 66 70  h0-NaxPdXpe&aifp
DEBUG2:  0040:  3d 76 30 30 31 26 73 6c  69 73 74 3d 76 69 64 65  =v001&slist=vide
DEBUG2:  0050:  6f 2f 74 65 6d 70 5f 68  64 5f 67 61 6c 6c 65 72  o/temp_hd_galler
DEBUG2:  0060:  79 5f 76 69 64 65 6f 2f  43 42 53 5f 50 72 6f 64  y_video/CBS_Prod
DEBUG2:  0070:  75 63 74 69 6f 6e 5f 4f  75 74 6c 65 74 5f 56 4d  uction_Outlet_VM
DEBUG2:  0000:  c3                                                .
DEBUG2:  0000:  53 2f 31 30 32 34 2f 38  38 37 2f 00 04 66 70 61  S/1024/887/..fpa
DEBUG2:  0010:  64 01 00 00 0c 63 61 70  61 62 69 6c 69 74 69 65  d....capabilitie
DEBUG2:  0020:  73 00 40 6d e0 00 00 00  00 00 00 0b 61 75 64 69  s.@m........audi
DEBUG2:  0030:  6f 43 6f 64 65 63 73 00  40 ab ee 00 00 00 00 00  oCodecs.@.......
DEBUG2:  0040:  00 0b 76 69 64 65 6f 43  6f 64 65 63 73 00 40 6f  ..videoCodecs.@o
DEBUG2:  0050:  80 00 00 00 00 00 00 0d  76 69 64 65 6f 46 75 6e  ........videoFun
DEBUG2:  0060:  63 74 69 6f 6e 00 3f f0  00 00 00 00 00 00 00 00  ction.?.........
DEBUG2:  0070:  09                                                .
DEBUG: Invoking connect
INFO: Connected...



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