PDA

View Full Version : Customized rtmpdump binaries with patch file


Pages : [1] 2

KSV
04-07-2013, 12:15 PM
Anonymous recently shared some good patches with me so i thought of reviving the release thread again. apart from all my patches till date this release includes following new enhancements.

Anonymous's Contribution:

1. Better resume support:
rtmpdump can now resume from corrupted files by automatically searching the file for valid audio video frames.

2. Invalidate "Play2" command:
rtmpsuck now invalidates this transition command so flash player isn't able to adaptively switch the stream to another quality during capture.

3. Generate unique filenames:
if detected filename is longer than 128 characters it generates short unique name instead.

4. fixed a bug in AMF3 decoding

5. few other minor fixes

My Fixes:

1. add timestamp to detected filename (rtmpsrv and rtmpsuck) to avoid overwriting the streams

2. replace invalid characters in filename with underscore

3. fixed a crash in rtmpsuck when closed using 'q' command

4. fixed generation of invalid flv file in some rare cases

5. few other minor fixes

Update 17/04/2013:

1. fixed rtmpsrv command generation in some specific cases + other minor fixes

Update 22/04/2013:

1. enhanced keyframe search for much better resume functionality
2. fixed a bug in RTMP_FindPrefixProperty and RTMP_FindFirstMatchingProperty function

Update 25/04/2013:

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)

Update 07/05/2013:

1. fixed timestamp generation on some platforms

Update 15/05/2013:

1. added support for featve.com changes

Update 19/05/2013:

1. added support for wfctv.com

Update 11/06/2013:

1. updated support for webvideocore.net servers

Update 14/09/2013:

1. added support for yycast.com changes

Update 18/10/2013:

1. added support for yukons.net, axcast.com changes

Update 14/03/2014:

1. also check client signature to detect if server wanna use old rtmp handshake
(fixes handshake problems with some lousy servers)
2. added support for ddoss.me, streampiraten.ws changes
3. handle NetConnection.Connect.Rejected for onStatus response along with _error

Update 21/03/2014:

1. updated support for streampiraten.ws and clones
2. fixed a small bug

Update 11/09/2014:

1. updates for some site changes

Update 28/10/2014:

1. cleaned-up and merged --ccommand | -K switch patch (provided by @denobis)
2. rewrote the support for 3dbuzz.com authentication

Update 19/01/2015:

1. some minor fixes

Update 09/02/2015:

1. updated support for mips.tv and clones

Update 01/05/2015:

1. save and resume support for more than 4 GB files
2. add null encoding support in AMF object ( -C NZ:name: )
3. other minor fixes

Update 05/05/2015:

1. added basic support for AMF_REFERENCE type
2. added support for tvb.com streams

Update 11/12/2015:

1. fixed some AMF3 decoding issues (videostream.dn.ua)
2. fixed a crash in rtmpsuck
3. other minor fixes

Update 15/12/2015:

1. sync with rtmpdump upstream

==========
This release supersedes all previous releases.
https://github.com/K-S-V/Scripts/releases
==========

Compiling with Patch for other systems:

assuming you have all tools (gcc, binutils etc.) and dependencies (OpenSSL, Zlib) installed correctly for your distribution.

1. clone the repository
git clone git://git.ffmpeg.org/rtmpdump

2. copy patch from package to rtmpdump directory and apply it
patch -p0 -i Patch.diff

3. then just compile and install normally
make
sudo make install prefix=/usr

Mac users should add SYS=darwin while compiling. you can also add XLDFLAGS="-s -static" to statically link and strip the resulting binary.

chap
04-07-2013, 12:24 PM
KSV
Thanks for your work and time:cool:

hasomaso
04-07-2013, 12:58 PM
unsurpassable

Larry
04-07-2013, 05:32 PM
SO Greatly appreciated!!!

Stream Ripper
04-07-2013, 08:07 PM
GREAT stuff as always, KSV :-)

chanc
04-07-2013, 11:12 PM
Thanks for the great work.

karlo2105
04-08-2013, 08:03 AM
Thanks KSV for your time. ;)
But I already have a question. When I watch this stream (http://fpdownload.adobe.com/strobe/FlashMediaPlayback_101.swf?src=rtmp://cp99495.live.edgefcs.net:80/live/Flash_live_KTO_TV@27823) in browser, it works fine but with rtmpdump it fails many times before good start.


rtmpdump -v -r "rtmp://cp99495.live.edgefcs.net:80
/live/Flash_live_KTO_TV@27823" -W "http://www.ktotv.com/templates/ktotv/swf/player.swf" | vlc -
RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: audiocodecid 2.00
INFO: audiodatarate 0.00
INFO: canseektoend FALSE
INFO: creationdate Mon Apr 08 14:37:19 2013
INFO: duration 0.00
INFO: framerate 25.00
INFO: height 450.00
INFO: lastkeyframetimestamp 0.00
INFO: lasttimestamp 0.00
INFO: metadatacreator On2 Flix SDK for Dshow_2.7.4.0
INFO: On2 Technologies
INFO: profile VP6-E
INFO: videocodecid 4.00
INFO: videodatarate 0.00
INFO: width 800.00
125.581 kB / 0.02 sec
Download complete

KDN165
04-08-2013, 08:22 AM
Thank you very much KSV

RedPenguin
04-08-2013, 09:04 AM
Thanks again KSV for all of your work :)

KSV
04-08-2013, 09:05 AM
Thanks KSV for your time. ;)
But I already have a question. When I watch this stream (http://fpdownload.adobe.com/strobe/FlashMediaPlayback_101.swf?src=rtmp://cp99495.live.edgefcs.net:80/live/Flash_live_KTO_TV@27823) in browser, it works fine but with rtmpdump it fails many times before good start.


i have tried it few times and it works every time. maybe your localized server having issues. try with IP 124.**.**.***.

KSV
04-08-2013, 09:21 AM
i have seen some people claiming that certain url's working with old builds but not new one's. this is due to the changed behavior of url parsing in official git repository. for example if you have passed following url to rtmpdump it will behave differently after this commit (http://repo.or.cz/w/rtmpdump.git/blobdiff/9d6dc72d7c43554dbe8cdb02f450807230df8c25..f3e3e6b5 07ac0df89a11764abd15cc9535593735:/librtmp/parseurl.c).

-r "rtmp://host/first/second/third/fourth"

old app will parse the app as first/second and playpath as third/fourth while after this commit app will be parsed as first/second/third and playpath as fourth invalidating the previously working command.

you can overcome this problem in two ways:
1. specify app and playpath using separate commands (-a|--app) and (-y|--playpath) respectively.
2. in my builds you can also use // as app and playpath separator.

-r "rtmp://host/first/second//third/fourth"

karlo2105
04-08-2013, 09:21 AM
i have tried it few times and it works every time. maybe your localized server having issues. try with IP 124.40.42.172.

With your server it doesn't work at all.

rtmpdump -v -r "rtmp://124.40.42.172/live/Flash_li
ve_KTO_TV@27823" -W "http://www.ktotv.com/templates/ktotv/swf/player.swf" | vlc -
RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
ERROR: rtmp server requested close

KSV
04-08-2013, 09:36 AM
With your server it doesn't work at all.


use following command to access it directly with IP.

rtmpdump -v -r "rtmp://124.40.42.172:80/live/Flash_live_KTO_TV@27823" -W "http://www.ktotv.com/templates/ktotv/swf/player.swf" -t "rtmp://cp99495.live.edgefcs.net:80/live" -o Test.flv

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: audiocodecid 2.00
INFO: audiodatarate 0.00
INFO: canseektoend FALSE
INFO: creationdate Mon Apr 08 14:37:19 2013
INFO: duration 0.00
INFO: framerate 25.00
INFO: height 450.00
INFO: lastkeyframetimestamp 0.00
INFO: lasttimestamp 0.00
INFO: metadatacreator On2 Flix SDK for Dshow_2.7.4.0
INFO: On2 Technologies
INFO: profile VP6-E
INFO: videocodecid 4.00
INFO: videodatarate 0.00
INFO: width 800.00
521.433 kB / 10.47 sec

Your second stream is also working fine for me.

karlo2105
04-08-2013, 10:00 AM
It's working great with -t parameter added even with original server.
Thanks very much KSV. ;)

KSV
04-08-2013, 09:58 PM
It's working great with -t parameter added even with original server.

'-t' switch doesn't do anything magical. probably it was a temporary glitch on your side.

dindi
04-09-2013, 07:41 AM
How about BUFX - realtime download on some servers...
Isn't possible to download with real speed on servers based on Flash Media Server 3?

Majority of sites runnin FMS is needed to use -v mode and sometimes videos are downloaded with lag between Video/Sound.

KSV
04-09-2013, 08:54 AM
How about BUFX - realtime download on some servers...
Isn't possible to download with real speed on servers based on Flash Media Server 3?

Majority of sites runnin FMS is needed to use -v mode and sometimes videos are downloaded with lag between Video/Sound.

i don't quite understand what you wanna say but it has been resolved long ago.

--realtime|-R Don't attempt to speed up download via the Pause/Unpause BUFX hack

lorus
04-09-2013, 08:25 PM
I have some trouble with a stream. The capturing seems to start but it captures only 0.01sec and then the process hangs / doesn't captures anything more ... :(


C:\Users\media\Desktop\rtmp>rtmpdump -r "rtmp://xxx:1936/streams" -a "streams" -f "WIN 11,6,602,180" -W "http://xxx/xxx/xxx.swf" -p "http://xxx" -y "xxx" -o "xxx"
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 download at: 0.000 kB
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Tue Apr 09 21:36:10 2013
INFO: videodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: framerate 60.00
INFO: width 720.00
INFO: height 400.00
INFO: videocodecid avc1
INFO: videodatarate 1500.00
INFO: avclevel 32.00
INFO: avcprofile 66.00
INFO: videokeyframe_frequency 10.00
INFO: audiodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: audioinputvolume 75.00
INFO: audiocodecid mp4a
INFO: audiodatarate 96.00

0.660 kB / 0.00 sec
289.526 kB / 0.00 sec
673.945 kB / 0.00 sec
1078.496 kB / 0.00 sec
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Tue Apr 09 21:36:10 2013
INFO: videodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: framerate 60.00
INFO: width 720.00
INFO: height 400.00
INFO: videocodecid avc1
INFO: videodatarate 1500.00
INFO: avclevel 32.00
INFO: avcprofile 66.00
INFO: videokeyframe_frequency 10.00
INFO: audiodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: audioinputvolume 75.00
INFO: audiocodecid mp4a
INFO: audiodatarate 96.00

1203.780 kB / 0.01 sec
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Tue Apr 09 21:36:10 2013
INFO: videodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: framerate 60.00
INFO: width 720.00
INFO: height 400.00
INFO: videocodecid avc1
INFO: videodatarate 1500.00
INFO: avclevel 32.00
INFO: avcprofile 66.00
INFO: videokeyframe_frequency 10.00
INFO: audiodevice AVerMedia BDA Analog Capture Secondary [1]
INFO: audiosamplerate 44100.00
INFO: audiochannels 2.00
INFO: audioinputvolume 75.00
INFO: audiocodecid mp4a
INFO: audiodatarate 96.00

KSV
04-09-2013, 09:41 PM
I have some trouble with a stream. The capturing seems to start but it captures only 0.01sec and then the process hangs / doesn't captures anything more ... :(


Try adding -v (--live) switch.

anon069
04-10-2013, 07:23 AM
Thank you KSV for your effort and for adding those patches, one of which has fixed my previous problem. It is definitely appreciated. If only I had a tenth of the understanding that you have!

a69

lorus
04-10-2013, 07:47 AM
Try adding -v (--live) switch.

OMG, stupid me ... big thx :)

RedPenguin
04-10-2013, 06:18 PM
I have compiled this release into librtmp's for various systems (iOS (Apple TV, iPhone, iPod Touch), RasPi, Linux 32&64) for anyone wanting this release in their XBMC.

I can easily put exectuables up also if anyone needs but I don't know of any practical reasons off the top of my head for devices like RasPi and iOS.

http://www.mediafire.com/?x4cvp5hl4m9xr

KDN165
04-13-2013, 02:03 PM
Thank you Redpenguin.

I have a problem with your xbmc apk for android.

(Sorry for my english because I´m Spanish). I installed your xbmc apk and when I click to run it crash.

Say: La aplicación XBMC (proceso org.xbmc.xbmc) se ha interrumpido inesperadamente. Inténtelo de nuevo

bentzi
04-15-2013, 12:43 PM
very weird problem: I'm using unofficial KSV version. on one of my boxes it doesnt work properly: I investigated and found that the server asks for an answer which on other boxes is calculated well, but on this box no... checked python, and there it calculates well
so, on this thing:
enc = AMF_EncodeNumber(enc, pend, exp(atan(sqrt(VerificationNumber))) + 1)

the "bad" box returns ((VerificationNumber) + 1)

any idea? I'm totally cluless:confused:

btw, it's a linux box

RedPenguin
04-15-2013, 05:44 PM
Thank you Redpenguin.

I have a problem with your xbmc apk for android.

(Sorry for my english because I´m Spanish). I installed your xbmc apk and when I click to run it crash.

Say: La aplicación XBMC (proceso org.xbmc.xbmc) se ha interrumpido inesperadamente. Inténtelo de nuevo

At first I had a mix up with signing the modified APK but I fixed it and most folks report it's working great.

http://forum.xbmc.org/showthread.php?tid=162307 is the support thread I maintain for my librtmp files and the APK if you wanna check it out.

KSV
04-15-2013, 11:38 PM
very weird problem: I'm using unofficial KSV version. on one of my boxes it doesnt work properly: I investigated and found that the server asks for an answer which on other boxes is calculated well, but on this box no... checked python, and there it calculates well
so, on this thing:
enc = AMF_EncodeNumber(enc, pend, exp(atan(sqrt(VerificationNumber))) + 1)

the "bad" box returns ((VerificationNumber) + 1)

any idea? I'm totally cluless:confused:

btw, it's a linux box

Post the full debug log (-V) on pastebin (http://pastebin.com). if it works on everything else then it can't be code's problem.

RedPenguin
04-15-2013, 11:50 PM
Also KSV or somebody else not sure if you have a cable TV subscription or not to test:

http://www.cnn.com/video and test their "Live TV" section.

But I have noticed that the rtmpdump code must have changed sometime after 2011-07-11 because like I said before if I use KSV or normal versions since then it constantly results in "Invalid AMF Data" with rtmpsrv from RTMPDumpHelper.

From what I can tell, they (edgecfs) are simply changing the connection data on every play request and using weird characters like the Spanish upside down exclamation point.

Not sure why but the older rtmpdumps can simply flow with these odd connection data but the newer cannot and just error out, so I was wondering if this could be fixed via a patch.

Here is a sample of what I mean:

rtmpdump -r "rtmpe://cp99921.live.edgefcs.net:1935/live" -a "live?auth=daEdabcbS
bfdrdlcNa.dudNbld5cebQaKan-brBoEc-hca-lxy_GFs&aifp=v001&slist=tvehln104_1_low@s8
9305" -f "WIN 11,7,700,169" -W "http://z.cdn.turner.com/xslo/cvp/plugins/akamai/
streaming/osmf1.6/2.11.3/AkamaiAdvancedStreamingPlugin.swf" -p "http://www.cnn.c
om/video/#/video/cvptve/cvpstream2" --live -C Θ: -y "tvehln104_1_low@s89305?auth
=daEdabcbSbfdrdlcNa.dudNbld5cebQaKan-brBoEc-hca-lxy_GFs&aifp=v001&slist=tvehln10
4_1_low@s89305" -o "tvehln104_1_low@s89305.flv"

ERROR: Invalid AMF parameter: Θ:

It's as if the command would easily work with zero issues if it was not for the strange ASCII characters.

Though not sure if this would be something the actual RTMPDump would need to code.

bentzi
04-16-2013, 05:02 AM
here is the log:

the "bad" box-
DEBUG: RTMP_ClientPacket, received: invoke 34 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: verifyClient>
DEBUG: Property: <Name: no-name, NUMBER: 120781448.00>
DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, NUMBER: 96.73>
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <verifyClient>
DEBUG: VerificationNumber: 96.73
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _result>
DEBUG: Property: <Name: no-name, NUMBER: 120781448.00>
DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, NUMBER: 97.73>
DEBUG: (object end)

the number given back in response is 97.73 (should be 5.35)
here is the "good" box-
DEBUG: RTMP_ClientPacket, received: invoke 34 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: verifyClient>
DEBUG: Property: <Name: no-name, NUMBER: 120781448.00>
DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, NUMBER: 86.61>
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <verifyClient>
DEBUG: VerificationNumber: 86.61
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _result>
DEBUG: Property: <Name: no-name, NUMBER: 120781448.00>
DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, NUMBER: 5.32>
DEBUG: (object end)
DEBUG2: RTMP_SendPacket: fd=4, size=29

it's a mediadirect.ro server, so the number is a random number given by server to get the response
rest of the log is the same for both boxes (until hang up)

KSV
04-16-2013, 09:04 AM
@bentzi

your problem seems like a bug in math library (libm.so). try upgrading glibc to newer version. it's also possible that your compiler optimization is breaking it. try compiling static binary with no optimizations.
LDFLAGS="-static" OPT="-g -O0"

@RedPenguin

does this happens also with rtmpsuck? also post the verbose log of successful and failed attempt.

-z 2> Debug.txt

RedPenguin
04-16-2013, 11:59 AM
@RedPenguin

does this happens also with rtmpsuck? also post the verbose log of successful and failed attempt.

-z 2> Debug.txt

For some reason rtmpsuck has never worked with these streams (rtmpsuck claims it fails and video continues in browser) this is what it always does with 2011-07-11 and identical error with your latest compile.

http://pastebin.com/VkbqL0vQ

KSV
04-16-2013, 12:57 PM
For some reason rtmpsuck has never worked with these streams (rtmpsuck claims it fails and video continues in browser) this is what it always does with 2011-07-11 and identical error with your latest compile.

http://pastebin.com/VkbqL0vQ

i mean the latest rtmpsrv log not older rtmpsuck one.

RedPenguin
04-16-2013, 02:55 PM
It looks like newer rtmpsrv is giving a very similar error to older rtmpsuck.

http://pastebin.com/tWJEYA28

KSV
04-17-2013, 03:40 AM
It looks like newer rtmpsrv is giving a very similar error to older rtmpsuck.

http://pastebin.com/tWJEYA28

i seem to have pinpointed the issue. the main issue was that countAMF and dumpAMF functions in rtmpsrv were not taking new array types into consideration hence generating wrong command line in case there was any extra parameters to connect object.

change following in rtmpsrv.c and try:
countAMF:
len += 2;
if (p->p_name.av_val)
len += p->p_name.av_len + 1;
if((p->p_type == AMF_ECMA_ARRAY) || (p->p_type == AMF_STRICT_ARRAY))
p->p_type = AMF_OBJECT;
switch(p->p_type)
{
case AMF_BOOLEAN:


dumpAMF:
argv[ac].av_val = ptr;
if (p->p_name.av_val)
*ptr++ = 'N';
if((p->p_type == AMF_ECMA_ARRAY) || (p->p_type == AMF_STRICT_ARRAY))
p->p_type = AMF_OBJECT;
*ptr++ = opt[p->p_type];
*ptr++ = ':';
if (p->p_name.av_val)

RedPenguin
04-17-2013, 04:34 AM
That's completely gets rid of the invalid AMF data, but for some reason it still errors out on RTMPDump:

https://dl.dropboxusercontent.com/u/5544258/rtmpsrv-log.txt

The thing I always noticed between the older and newer RTMPSrvs I had was when 2011-07-11 was recording it always claimed the AMF Data was "-C 0:0 -C 0:1" such as I seen from your fix, but the original ones from this thread claim they got the strange chars I mentioned before.

KSV
04-17-2013, 05:15 AM
but for some reason it still errors out on RTMPDump

That's not the problem with rtmpdump. rtmpdump tries to connect with their sever on detected port (1935) and server disconnects the connection. it's also the reason why rtmpsuck doesn't work on this site. after disconnection their flash client switches to another port (probably 80 or 443) which is not redirected to rtmpsrv or rtmpsuck by default (check RTMPDumpHelper options). try after changing the port from 1935 to 80 or 443. it's better to use wireshark in this case to know which protocol (RTMPT ?) and port is being used.

RedPenguin
04-17-2013, 05:35 AM
That's not the problem with rtmpdump. rtmpdump tries to connect with their sever on detected port (1935) and server disconnects the connection. it's also the reason why rtmpsuck doesn't work on this site. after disconnection their flash client switches to another port (probably 80 or 443) which is not redirected to rtmpsrv or rtmpsuck by default (check RTMPDumpHelper options). try after changing the port from 1935 to 80 or 443. it's better to use wireshark in this case to know which protocol (RTMPT ?) and port is being used.

A wireshark analysis just seems to show normal HTTP/HTTPS traffic then the minute the stream plays a flow of "RTMP" traffic with a ton of "Unknowns (0x0)" which I always seem to see with RTMPE on port 1935, which is confirmed after reading an XML that was sent before hand.


http://www.cnn.com/video/data/3.0/video/cvptve/cvpstream1/index.xml

You can tell it seems to mention rtmpe first and that's the protocol uses in the older version but I do see an rtmpte URL also in that XML but Wireshark claims rtmpte is not in use by default.

KSV
04-17-2013, 05:59 AM
A wireshark analysis just seems to show normal HTTP/HTTPS traffic then the minute the stream plays a flow of "RTMP" traffic with a ton of "Unknowns (0x0)" which I always seem to see with RTMPE on port 1935, which is confirmed after reading an XML that was sent before hand.

then the only reason possible is that their server is rejecting old clients (handshake 9 and earlier). try with something newer :rolleyes:

KSV
04-17-2013, 07:37 AM
First post updated with new fixes.

RedPenguin
04-17-2013, 01:19 PM
TY.

Only thing that confuses me then after you looked at this issue is how the older rtmpdump involked by rtmpsrv is actually able to download from the stream.

What would the older one have the newer one doesn't, is the question.

KSV
04-17-2013, 01:31 PM
Only thing that confuses me then after you looked at this issue is how the older rtmpsrv is actually able to download from the stream.

What would the older one have the newer one doesn't, is the question.

First rtmpsrv doesn't download anything. it's only job is to detect parameters and generate proper command line for a given stream and then launch rtmdump (which should be either in same folder or system path).

are you suggesting that older version of rtmpdump is able to download while newer one isn't. there is one more thing we can try. post the debug log of older and newer rtmpdump. rtmpsrv doesn't matter because after the above fix both generates proper command line. introduction of those array types have caused many regressions.

RedPenguin
04-17-2013, 01:35 PM
Yes that's why I edited my post before to mean rtmpdump.

But yes I do mean the older rtmpdump usually downloads it with very little issue. Sometimes it does it on first try othertimes you gotta restart the stream maybe 3 times but it always downloads.

KSV
04-17-2013, 01:45 PM
Yes that's why I edited my post before to mean rtmpdump.

replied before your edit.


But yes I do mean the older rtmpdump usually downloads it with very little issue. Sometimes it does it on first try othertimes you gotta restart the stream maybe 3 times but it always downloads.

still you need to post the log for any further progress.

RedPenguin
04-17-2013, 01:56 PM
replied before your edit.



still you need to post the log for any further progress.

np there, but what's the method to get rtmpdump to run -z when rtmpsrv is caling it without it?

I know you can run rtmpdump manually but they change token each time.

EDIT: Wait I think you can easily do it with RTMPExplorerX if you tell it run CMD instead of rtmpsrv, then you can manually run rtmpdump.

RedPenguin
04-17-2013, 02:38 PM
https://dl.dropboxusercontent.com/u/5544258/older-log.txt

https://dl.dropboxusercontent.com/u/5544258/newer-log.txt

Ctrl-C was pressed after the first one downloaded for a few seconds and while the newer was hanging for about 15-20 or more seconds.

Not sure if there was an easier way or not but I found if you quickly kill rtmpsrv from RTMPExplorer and run the command yourself you can easily add -z.

KSV
04-18-2013, 02:34 AM
only odd thing i can find in your logs is that in case of newer rtmpdump server is sending onBWCheck twice. probably it didn't like our BWResponse. there is one commit made on 02/08/2011 which is just after the working rtmpdump date 11/7/2011. you can try after reverting the changes made by this commit.

commit 8880d1456b282ee79979adbe7b6a6eb8ad371081
Author: Chris Larsen <clarsen@euphoriaaudio.com>
Date: Tue Aug 2 12:33:44 2011 -0400

Unexpected BW Response Fix

Bug: SendCheckBWResult sends an invalid bw response due to casting issues
from a double to an int.

diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index df2cb27..5311a8a 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -2339,7 +2339,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
{
AMFObject obj;
AVal method;
- int txn;
+ double txn;
int ret = 0, nRes;
if (body[0] != 0x02) /* make sure it is a string method name we start with */
{
@@ -2357,7 +2357,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)

AMF_Dump(&obj);
AMFProp_GetString(AMF_GetProp(&obj, NULL, 0), &method);
- txn = (int)AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));
+ txn = AMFProp_GetNumber(AMF_GetProp(&obj, NULL, 1));
RTMP_Log(RTMP_LOGDEBUG, "%s, server invoking <%s>", __FUNCTION__, method.av_val);

if (AVMATCH(&method, &av__result))
@@ -2366,7 +2366,7 @@ HandleInvoke(RTMP *r, const char *body, unsigned int nBodySize)
int i;

for (i=0; i<r->m_numCalls; i++) {
- if (r->m_methodCalls[i].num == txn) {
+ if (r->m_methodCalls[i].num == (int)txn) {
methodInvoked = r->m_methodCalls[i].name;
AV_erase(r->m_methodCalls, &r->m_numCalls, i, FALSE);
break;

RedPenguin
04-18-2013, 04:33 AM
Reverted commit (then verified) and then compiled but still no go.

But yes I looked at both logs and they look nearly identical except of course the older one working.

EDIT: Though I did see what happens if I revert the BW commit, put in only your AMF fixes and skip rest of patch, but then it just immediately goes to ERROR: Closing connection: NetStream.Play.StreamNotFound

Debug Log for one without rest of patch https://dl.dropboxusercontent.com/u/5544258/test.log

KSV
04-18-2013, 06:00 AM
your log shows NetStream.Failed not NetStream.Play.StreamNotFound error which generally means that auth token has expired. it would be easy to get the offending commit if you know how to use git bisect.

RedPenguin
04-18-2013, 06:15 AM
your log shows NetStream.Failed not NetStream.Play.StreamNotFound error which generally means that auth token has expired. it would be easy to get the offending commit if you know how to use git bisect.

Well I should say the rtmpsrv ran rtmpdump said StreamNotFound but when I tried running rtmpdump manually after it said NetStream.Failed but you are prob right it probably disabled the token after I tried killing rtmpsrv really fast.

But I will try and see what hapens with git bisect.

EDIT: Looks like I found the issue. I didn't have extreme luck with git bisect but I did have luck checking out older versions of the code using git chekcout.

It seems if I checkout anything older then Nov 9th it works perfectly but the minute I put on 19d36368f6c1ec6fa55df319173ca93048309f9a which is for PolarSSL 1.2.x compat, it breaks.

Yet now, if I apply your latest patch file, it breaks again, it only works if I revert said commit and leave your patch off, yet obviously your patches are wanted.

For some reason it only wants to work with PolarSSL 1.0.0 not 1.2.7 because obviously this revert causes it not to compile. I'm gonna see maybe I can use OpenSSL or something.

KSV
04-18-2013, 07:39 AM
so you are saying commit just before 19d36368f6c1ec6fa55df319173ca93048309f9a works while it doesn't work after you apply this specific commit. leave my patches out for the moment. that's pretty weird behaviour. that offending commit has only changes related to SSL which isn't even being used in this case.

RedPenguin
04-18-2013, 07:42 AM
so you are saying commit just before 19d36368f6c1ec6fa55df319173ca93048309f9a works while it doesn't work after you apply this specific commit. leave my patches out for the moment. that's pretty weird behaviour. that offending commit has only changes related to SSL which isn't even being used in this case.

Yes every time I revert that commit and leave your patches out, it works.

I created a new dir, did a "git clone git://git.ffmpeg.org/rtmpdump" then inside the rtmpdump dir did "git revert 19d36368f6c1ec6fa55df319173ca93048309f9a" then compiled and it works.

KSV
04-18-2013, 07:50 AM
for the time being try with openssl and fresh copy of repo without any modifications.

mkucharski
04-18-2013, 12:28 PM
KSV, would you consider forking rtmpdump on github (or any other source code hosting service) and integrate your patches there? Or have you considered to push your changes upstream?

RedPenguin
04-18-2013, 12:58 PM
for the time being try with openssl and fresh copy of repo without any modifications.

Doing this produces a rtmpdump that works also.

KSV
04-18-2013, 01:09 PM
can you add my latest patch file to the openssl mix and try. also try with fresh repo + polarssl only.

RedPenguin
04-18-2013, 02:26 PM
Adding your patch to openssl blend breaks and so does with polarssl no other changes.

EDIT: As a test I upgraded to PolarSSL 1.2.7 from 1.0.0 and with fresh code that actually does download but again the minute your patch is added, broken again :(.

KSV
04-19-2013, 11:12 AM
Adding your patch to openssl blend breaks and so does with polarssl no other changes.

EDIT: As a test I upgraded to PolarSSL 1.2.7 from 1.0.0 and with fresh code that actually does download but again the minute your patch is added, broken again :(.

hmmm so then something in patch is causing this particular problem. in absence of test case you have to debug it yourself. i can only suggest how to do that if you are interested.

1. first create two fresh repos and apply patch to only one of them.

2. copy rtmp.c, rtmp.h and rtmp_sys.h from patched repo to non-patched one.

3. compile it and check if problem reoccurs. if yes then we can leave out changes in other files as possible culprit.

4. now the hard part, if the problem is with changes of rtmp.c then you have to remove the code added by patch, block by block and figure out the offending code.

RedPenguin
04-19-2013, 06:38 PM
Well so far it appears it's definitely those files but to even get rtmpdump to compile I had to copy over the patched rtmpdump.c but it still fails on rtmpgw but that's not needed right now.

I also tried with only rtmp_sys.h only so that looks like it's not the problem.

Will update once I get further.

RedPenguin
04-19-2013, 10:13 PM
I have found almost the exact problem, it is definitely changes to the rtmp.c that break it.

The code you place in at the very bottom is doing it:

I can't seem to pinpoint the exact part of the code but once I removed all of this said code plus some small pieces above referencing it, it immediately worked.

+static int
+ConnectSocket(RTMP *r)
+{
+ int on = 1;
+ struct sockaddr_in service;
+ if (!r->Link.hostname.av_len)
+ return FALSE;
+
+ memset(&service, 0, sizeof (struct sockaddr_in));
+ service.sin_family = AF_INET;
+
+ if (r->Link.socksport)
+ {
+ /* Connect via SOCKS */
+ if (!add_addr_info(&service, &r->Link.sockshost, r->Link.socksport))
+ return FALSE;
+ }
+ else
+ {
+ /* Connect directly */
+ if (!add_addr_info(&service, &r->Link.hostname, r->Link.port))
+ return FALSE;
+ }
+
+ r->m_sb.sb_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (r->m_sb.sb_socket != -1)
+ {
+ if (connect(r->m_sb.sb_socket, (struct sockaddr *) &service, sizeof (struct sockaddr)) < 0)
+ {
+ int err = GetSockError();
+ RTMP_Log(RTMP_LOGERROR, "%s, failed to connect socket. %d (%s)",
+ __FUNCTION__, err, strerror(err));
+ RTMP_Close(r);
+ return FALSE;
+ }
+
+ if (r->Link.socksport)
+ {
+ RTMP_Log(RTMP_LOGDEBUG, "%s ... SOCKS negotiation", __FUNCTION__);
+ if (!SocksNegotiate(r))
+ {
+ RTMP_Log(RTMP_LOGERROR, "%s, SOCKS negotiation failed.", __FUNCTION__);
+ RTMP_Close(r);
+ return FALSE;
+ }
+ }
+ }
+ else
+ {
+ RTMP_Log(RTMP_LOGERROR, "%s, failed to create socket. Error: %d",
+ __FUNCTION__, GetSockError());
+ return FALSE;
+ }
+
+ /* set timeout */
+ SET_RCVTIMEO(tv, r->Link.timeout);
+ if (setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &tv, sizeof (tv)))
+ {
+ RTMP_Log(RTMP_LOGERROR, "%s, Setting socket timeout to %d failed!",
+ __FUNCTION__, r->Link.timeout);
+ }
+
+ setsockopt(r->m_sb.sb_socket, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof (on));
+ if (r->Link.protocol & RTMP_FEATURE_HTTP)
+ setsockopt(r->m_sb.sb_socket, SOL_SOCKET, SO_KEEPALIVE, (char *) &on, sizeof (on));
+
+ return TRUE;
+}
+
+static int
+SendCommand(RTMP *r, char *method, int queue)
+{
+ char pbuf[256], *pend = pbuf + sizeof (pbuf), *enc;
+ AVal av_command, methodName;
+
+ enc = pbuf;
+ methodName.av_val = method;
+ methodName.av_len = strlen(method);
+ enc = AMF_EncodeString(enc, pend, &methodName);
+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes);
+ *enc++ = AMF_NULL;
+ av_command.av_val = pbuf;
+ av_command.av_len = enc - pbuf;
+
+ return SendInvoke(r, &av_command, queue);
+}
+
+static int
+SendGetStreamLength(RTMP *r)
+{
+ char pbuf[256], *pend = pbuf + sizeof (pbuf), *enc;
+ AVal av_Command;
+
+ enc = pbuf;
+ enc = AMF_EncodeString(enc, pend, &av_getStreamLength);
+ enc = AMF_EncodeNumber(enc, pend, ++r->m_numInvokes);
+ *enc++ = AMF_NULL;
+ enc = AMF_EncodeString(enc, pend, &r->Link.playpath);
+ av_Command.av_val = pbuf;
+ av_Command.av_len = enc - pbuf;
+
+ return SendInvoke(r, &av_Command, TRUE);
+}
+
+static int
+SendInvoke(RTMP *r, AVal *command, int queue)
+{
+ RTMPPacket packet;
+ char pbuf[512], *enc;
+
+ packet.m_nChannel = 0x03; /* control channel (invoke) */
+ packet.m_headerType = RTMP_PACKET_SIZE_MEDIUM;
+ packet.m_packetType = RTMP_PACKET_TYPE_INVOKE;
+ packet.m_nTimeStamp = 0;
+ packet.m_nInfoField2 = 0;
+ packet.m_hasAbsTimestamp = 0;
+ packet.m_body = pbuf + RTMP_MAX_HEADER_SIZE;
+
+ enc = packet.m_body;
+ if (command->av_len)
+ {
+ memcpy(enc, command->av_val, command->av_len);
+ enc += command->av_len;
+ }
+ else
+ return FALSE;
+ packet.m_nBodySize = enc - packet.m_body;
+
+ return RTMP_SendPacket(r, &packet, queue);
+}
+
+static int
+strsplit(char *src, int srclen, char delim, char ***params)
+{
+ char *sptr, *srcbeg, *srcend, *dstr;
+ int count = 1, i = 0, len = 0;
+
+ if (src == NULL)
+ return 0;
+ if (!srclen)
+ srclen = strlen(src);
+ srcbeg = src;
+ srcend = srcbeg + srclen;
+ sptr = srcbeg;
+
+ /* count the delimiters */
+ while (sptr < srcend)
+ {
+ if (*sptr++ == delim)
+ count++;
+ }
+ sptr = srcbeg;
+ *params = calloc(count, sizeof (size_t));
+ char **param = *params;
+
+ for (i = 0; i < (count - 1); i++)
+ {
+ dstr = strchr(sptr, delim);
+ len = dstr - sptr;
+ param[i] = calloc(len + 1, sizeof (char));
+ strncpy(param[i], sptr, len);
+ sptr += len + 1;
+ }
+
+ /* copy the last string */
+ if (sptr <= srcend)
+ {
+ len = srclen - (sptr - srcbeg);
+ param[i] = calloc(len + 1, sizeof (char));
+ strncpy(param[i], sptr, len);
+ }
+ return count;
+}

KSV
04-20-2013, 01:04 AM
I can't seem to pinpoint the exact part of the code but once I removed all of this said code plus some small pieces above referencing it, it immediately worked.

Those functions can't be the real culprit. they aren't even being used as per your log file. keep all the patch except following change. revert
else if (AVMATCH(&method, &av__onbwcheck) || AVMATCH(&method, &av_onBWCheck))
to original
else if (AVMATCH(&method, &av__onbwcheck))

RedPenguin
04-20-2013, 01:07 AM
Those functions can't be the real culprit. they aren't even being used as per your log file. keep all the patch except following change. revert
else if (AVMATCH(&method, &av__onbwcheck) || AVMATCH(&method, &av_onBWCheck))
to original
else if (AVMATCH(&method, &av__onbwcheck))

Yea that's what I figured, because I swear I made those changes, compiled and it worked, but when I tried to reproduce it, it failed.

EDIT: Damn KSV are you good! I made this single change only and it worked immediately! Also just to double verify, I deleted the dir and reused git, made same change, and works again. :)

Though as far as you know, this should not break anything else in the patch?

KSV
04-20-2013, 01:32 AM
Damn KSV are you good! I made this single change only and it worked immediately! Also just to double verify, I deleted the dir and reused git, made same change, and works again. :)

Though as far as you know, this should not break anything else in the patch?

so my initial guess was correct. old version doesn't sends back any BWcheck response. my version is sending this but default response function in official rtmpdump doesn't seems correct. i have added a similar function to rtmpsrv long ago. i will copy that one instead. try with following patch on fresh repo.

http://pastebin.com/nsrK1uXH

RedPenguin
04-20-2013, 01:44 AM
so my initial guess was correct. old version doesn't sends back any BWcheck response. my version is sending this but default response function in official rtmpdump doesn't seems correct. i have added a similar function to rtmpsrv long ago. i will copy that one instead. try with following patch on fresh repo.

http://pastebin.com/nsrK1uXH

That patch breaks it again, but as a note, not sure if this was intended or not but when applying the patch:

"patch unexpectedly ends in middle of line"

but seemed to apply otherwise.

KSV
04-20-2013, 02:08 AM
That patch breaks it again, but as a note, not sure if this was intended or not but when applying the patch:

"patch unexpectedly ends in middle of line"

but seemed to apply otherwise.

try with following and also post the debug log of this one.

http://pastebin.com/Bgznqcrc

RedPenguin
04-20-2013, 02:47 AM
try with following and also post the debug log of this one.

http://pastebin.com/Bgznqcrc

This patch seems to work every time.

I tried getting a debug log but for some reason my method using rtmpexplorer to stop rtmpsrv real quick and run rtmpdump manually fails as it runs rtmpdump too fast thus invalidating said token.

Is there some way to code rtmpsrv to always do -z or something to rtmpdump?

I know rtmpsrv sometimes has a -i option but I can't seem to get RTMPExplorer(X) nor RTMPDumpHelper to pass said option to rtmpsrv though it appears your patch must not have -i anyway.

Every now and then it will not start recording, but I noticed that before on the your 2011-07-11 version. It's like sometimes you had to restart the stream about 3 times before it starts recording, but most times it works on first try.

KSV
04-20-2013, 04:04 AM
I know rtmpsrv sometimes has a -i option but I can't seem to get RTMPExplorer(X) nor RTMPDumpHelper to pass said option to rtmpsrv though it appears your patch must not have -i anyway.
:confused: rtmpsrv doesn't have any i switch.

try the following one. it automatically adds -z switch to rtmpdump command. if stream doesn't work with this one i will remove the BWrespose. it's not worth spending any more time. it doesn't affect downloading anyway.
http://pastebin.com/7va19cpt
rtmpsrv 2>Debug.txt
http://pastebin.com/7va19cpt

RedPenguin
04-20-2013, 04:38 AM
:confused: rtmpsrv doesn't have any i switch.
l[/url]


Well I meant the one svnpenn worked on a little while back:
http://lists.mplayerhq.hu/pipermail/rtmpdump/2012-November/002183.htm


try the following one. it automatically adds -z switch to rtmpdump command. if stream doesn't work with this one i will remove the BWrespose. it's not worth spending any more time. it doesn't affect downloading anyway.
http://pastebin.com/7va19cpt
rtmpsrv 2>Debug.txt
http://pastebin.com/7va19cpt

Played the stream 3 times and each time it worked, seems flawless now :).

flocked
04-21-2013, 03:29 PM
Could anyone please compile it for mac? thanks!!

RedPenguin
04-21-2013, 03:32 PM
Could anyone please compile it for mac? thanks!!

Actually very funny you would ask, being I am basically working on it at this very moment.

Some folks over at XBMC seem to want librtmp for Apple TV 1 which is simply MacOS anyway.

I am currently working on getting a cross-compiler going for MacOS and will just make the exectuables and librtmp for anybody who wants them.

alexanderd
04-22-2013, 01:21 AM
1. add timestamp to detected filename (rtmpsrv and rtmpsuck) to avoid overwriting the streams

Thank you so much for that, KSV!

After some testing.
Unfortunately,latest release (http://www.mediafire.com/file/ipffq5s9blvopvg/rtmpdump-2.4.zip) still overwrites live stream :(
Every time it's saved with the same filename.
I use RTMPDumpHelper+RTMPSuck

WARNING: Trying different position for client digest!
Processing connect
app : live?ovpfv=2.1.4
flashVer : WIN 11,6,602,180
swfUrl : http://www.c-span.org/cspanVideoHD.swf?src=cspan1
tcUrl : rtmp://cp82346.live.edgefcs.net:1935/live?ovpfv=2.1.4
pageUrl : http://www.c-span.org/Live-Video/C-SPAN/
live : yes
Playpath : CSPAN1@14845
Saving as : CSPAN1@14845.flv
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Sun Mar 10 09:55:08 2013
INFO: videodevice Osprey-230 Video Device 1
INFO: framerate 30.00
INFO: width 320.00
INFO: height 240.00
INFO: videocodecid VP62
INFO: videodatarate 300.00
INFO: videokeyframe_frequency 5.00
INFO: audiodevice Osprey-230 Audio Device 1
INFO: audiosamplerate 22050.00
INFO: audiochannels 2.00
INFO: audioinputvolume 75.00
INFO: audiocodecid .mp3
INFO: audiodatarate 40.00
WARNING: ignoring too small audio packet: size: 0
ERROR: Request timeout/select failed, ignoring request
Closing connection... done!

WARNING: ignoring too small audio packet: size: 0
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
Closing connection... done!

WARNING: Trying different position for client digest!
Processing connect
app : live?ovpfv=2.1.4
flashVer : WIN 11,6,602,180
swfUrl : http://www.c-span.org/cspanVideoHD.swf?src=cspan1
tcUrl : rtmp://cp82346.live.edgefcs.net:1935/live?ovpfv=2.1.4
pageUrl : http://www.c-span.org/Live-Video/C-SPAN/
live : yes
Playpath : CSPAN1@14845
Saving as : CSPAN1@14845.flv
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Sun Mar 10 09:55:08 2013
INFO: videodevice Osprey-230 Video Device 1
INFO: framerate 30.00
INFO: width 320.00
INFO: height 240.00
INFO: videocodecid VP62
INFO: videodatarate 300.00
INFO: videokeyframe_frequency 5.00
INFO: audiodevice Osprey-230 Audio Device 1
INFO: audiosamplerate 22050.00
INFO: audiochannels 2.00
INFO: audioinputvolume 75.00
INFO: audiocodecid .mp3
INFO: audiodatarate 40.00
WARNING: ignoring too small audio packet: size: 0
WARNING: ignoring too small audio packet: size: 0
WARNING: Trying different position for client digest!
Processing connect
app : samaalive
flashVer : WIN 11,6,602,180
swfUrl : http://beta.cdn.livestation.com/player/5.10/livestation-player.swf
tcUrl : rtmp://38.96.148.99:1935/samaalive
pageUrl : http://www.livestation.com/
live : yes
Playpath : samaalive
Saving as : samaalive.flv
INFO: Metadata:
INFO: width 480.00
INFO: height 270.00
INFO: framerate 25.00
INFO: videodatarate 200.00
INFO: videocodecid avc1
INFO: audiodatarate 40.00
INFO: audiocodecid mp4a
WARNING: ignoring too small audio packet: size: 0
live : yes
Playpath : samaalive
Saving as : samaalive.flv
INFO: Metadata:
INFO: width 480.00
INFO: height 270.00
INFO: framerate 25.00
INFO: videodatarate 200.00
INFO: videocodecid avc1
INFO: audiodatarate 40.00
INFO: audiocodecid mp4a
WARNING: ignoring too small audio packet: size: 0
ERROR: Request timeout/select failed, ignoring request
Closing connection... done!

KSV
04-22-2013, 11:58 AM
i have fixed another rtmpdump bug in which flv header was set with wrong data type (audio/video marker) which is yet another regression due to those array types. though file may play normally in most players rtmpdump was looking for the wrong type of keyframes while resuming.

another enhancement included is that upon resuming it was looking for keyframes with timestamp 0 only but now it searches other non zero timestamps too (timestamps are adjusted accordingly for this resume drift). so it's able to resume in those cases also where our required keyframe has nonzero timestamp.

Test case for both bugs:
rtmpdump -r "rtmpt://h2a.rtp.pt/vodrtp" -y "nas2.share/videos/auto/planetamusica/planetamusica_1_20120317" -o planetamusica_1_201203171.flv

@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.

@alexanderd
it seems like you are using old binaries not the updated ones posted in first post.

alexanderd
04-22-2013, 02:38 PM
@alexanderd
it seems like you are using old binaries not the updated ones posted in first post. I've just downloaded the newest ones. And got the same result. http://pastebin.com/ry1hdqsy

KSV
04-22-2013, 11:29 PM
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 : samaalive
flashVer : WIN 11,6,602,180
swfUrl : http://live.samaa.tv/player.swf
tcUrl : rtmp://38.96.148.99:1935/samaalive
pageUrl : http://live.samaa.tv/
live : yes
Playpath : samaalive
Saving as : 2013-04-23_10-58-02_samaalive.flv
INFO: Metadata:
INFO: width 480.00
INFO: height 270.00
INFO: framerate 25.00
INFO: videodatarate 200.00
INFO: videocodecid avc1
INFO: audiodatarate 40.00
INFO: audiocodecid mp4a

alexanderd
04-23-2013, 02:12 AM
Great, that's just what needed!
Did you use the same binaries that have been uploaded to mediafire? (http://www.mediafire.com/file/5eep3wbee922euw/rtmpdump-2.4.zip)
I used them with rtmpdumphelper. Maybe that's the cause of the problem?

KSV
04-23-2013, 02:38 AM
Great, that's just what needed!
Did you use the same binaries that have been uploaded to mediafire

yeah those are the latest binaries.

rtmpsuck MD5: 6A42BD5F06958EAE05BC7480BDD06199


I used them with rtmpdumphelper. Maybe that's the cause of the problem?

no, it has nothing to do with RTMPDump Helper. make sure new binaries are in the same folder as RTMPDump Helper.

alexanderd
04-23-2013, 03:34 AM
I've just downloaded both zips (rtmpdump-2.4.zip from mediafire, from first post and RTMPDumpHelper from Nir Sofer's site). Extracted them in new folder (both in one). BTW, rtmpsuck's MD5 equals to yours.
Then I start rtmpdumphelper from that folder (it starts the rtmpsuck) and open the same test page (http://live.samaa.tv/). RTMPSuck starts capturing the stream, but saves it as samaalive.flv, without timestamp :(
I cannot understand it.
Everybody, please, test that issue too. It can't be that i'm the only lucky who experiences the overwriting problem.

gorilla.maguila
04-23-2013, 11:28 AM
@KSV

Hi KSV, first thank you for your work.

I was testing your patches and I think I found a bug:

Steps to reproduce:

- Try to dump one of the streams of Icasthd. Take into account that Icasthd works per sessions so you will need to get a valid one.

icasthd.tv/?p=channeldetails&id=skysports1

For Example:

http://pastebin.com/qEi703wk

When dumping this kind of streams, from time to time I get a segfault.

One of the times I was running with gdb and I got a backtrace:


DEBUG: Parsed protocol: 0
DEBUG: Parsed host : edge.icasthd.com
DEBUG: Parsed app : live?f=skysports1&t=1366736989&/
INFO: rtmp server sent redirect

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6cff3c8 in _int_free () from /usr/lib/libc.so.6
(gdb) backtrace
#0 0x00007ffff6cff3c8 in _int_free () from /usr/lib/libc.so.6
#1 0x00007ffff7bcff2c in AMF_Reset () from /usr/lib/librtmp.so.0
#2 0x00007ffff7bcff81 in AMFProp_Reset () from /usr/lib/librtmp.so.0
#3 0x00007ffff7bcff1c in AMF_Reset () from /usr/lib/librtmp.so.0
#4 0x00007ffff7bcff81 in AMFProp_Reset () from /usr/lib/librtmp.so.0
#5 0x00007ffff7bcff1c in AMF_Reset () from /usr/lib/librtmp.so.0
#6 0x00007ffff7bc9e6a in ?? () from /usr/lib/librtmp.so.0
#7 0x00007ffff7bcd38c in RTMP_ClientPacket () from /usr/lib/librtmp.so.0
#8 0x00007ffff7bcd9bd in RTMP_ConnectStream () from /usr/lib/librtmp.so.0
#9 0x0000000000402554 in ?? ()
#10 0x00007ffff6ca7a15 in __libc_start_main () from /usr/lib/libc.so.6
#11 0x0000000000402ab5 in ?? ()



Also happened with a compiled version in android with ffmpeg based player, backtrace in android shows:


#00 pc 00018630 /system/lib/libc.so (memcpy+48)
#01 pc 00035d7b /data/app-lib/com.android-1/librtmp.so (AMF_EncodeString+70)
#02 pc 00035fb1 /data/app-lib/com.android-1/librtmp.so (AMF_EncodeNamedString+48)
#03 pc 00031255 /data/app-lib/com.android-1/librtmp.so (RTMP_Connect1+2236)
#04 pc 00031593 /data/app-lib/com.android-1/librtmp.so (RTMP_Connect+98)
#05 pc 000330cf /data/app-lib/com.android-1/librtmp.so
#06 pc 00033cbb /data/app-lib/com.android-1/librtmp.so (RTMP_ClientPacket+818)
#07 pc 000345f5 /data/app-lib/com.android-1/librtmp.so (RTMP_ConnectStream+96)
#08 pc 002c514c /data/app-lib/com.android-1/libffmpeg-neon.so


The same crash in x86_64:

http://pastebin.com/EKxJvh23

It seems it's some problem handling redirects as sometimes ffmpeg outputs:


04-23 18:55:33.949: A/ffmpeg(7739): Problem accessing the DNS. (addr: @4.102.63.22)
04-23 18:55:33.949: E/player.c(7739): player_set_data_source Could not open video file: rtmp://edge.icasthd.com:1935/redirect3 swfUrl=http://www.icasthd.tv://player/player.swf swfVfy=1 pageUrl=http://www.icasthd.tv playpath=skysports2 app=redirect3?f=skysports2&t=1366736137& live=1 (-1313558101: Unknown error occurred)



What do you think?

Regards

chap
04-23-2013, 11:45 AM
example

>rtmpdump -r "rtmp://178.18.23.112:1935/live" -a "live?f=skysports1&t=1366738882
&" -f "WIN 11,6,602,180" -W "http://www.icasth
d.tv//player/player.swf" -p "http://www.icasthd.tv/embed.php?v=skysports1&vw=735
&vh=450&domain=icasthd.tv" --live -y "skysports1" -o "2013-04-23_08-41-26_skyspo
rts1.flv"
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: duration 0.00
INFO: width 640.00
INFO: height 480.00
INFO: videodatarate 341.80
INFO: framerate 30.00
INFO: videocodecid 7.00
INFO: audiodatarate 31.25
INFO: audiosamplerate 48000.00
INFO: audiosamplesize 16.00
INFO: stereo TRUE
INFO: audiocodecid 10.00
INFO: encoder Lavf54.6.100
INFO: filesize 0.00
1720.728 kB / 47.79 sec

gorilla.maguila
04-23-2013, 11:48 AM
example

>rtmpdump -r "rtmp://178.18.23.112:1935/live" -a "live?f=skysports1&t=1366738882
&" -f "WIN 11,6,602,180" -W "http://www.icasth
d.tv//player/player.swf" -p "http://www.icasthd.tv/embed.php?v=skysports1&vw=735
&vh=450&domain=icasthd.tv" --live -y "skysports1" -o "2013-04-23_08-41-26_skyspo
rts1.flv"
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: duration 0.00
INFO: width 640.00
INFO: height 480.00
INFO: videodatarate 341.80
INFO: framerate 30.00
INFO: videocodecid 7.00
INFO: audiodatarate 31.25
INFO: audiosamplerate 48000.00
INFO: audiosamplesize 16.00
INFO: stereo TRUE
INFO: audiocodecid 10.00
INFO: encoder Lavf54.6.100
INFO: filesize 0.00
1720.728 kB / 47.79 sec


It doesn't crash every time. For me it crashes from time to time. Maybe once every 5 intents. Also don't use rtmp://edge.icasthd.com:1935/live instead force a redirect response rtmp://edge.icasthd.com:1935/redirect3

Example:

http://pastebin.com/qEi703wk

gorilla.maguila
04-23-2013, 12:21 PM
Checking if null pointer seems to solve the crash.



void
AMF_Reset(AMFObject *obj)
{
int n;
for (n = 0; n < obj->o_num; n++)
{
AMFProp_Reset(&obj->o_props[n]);
}
+ //check if null pointer
+ if(obj->o_props)
free(obj->o_props);
obj->o_props = NULL;
obj->o_num = 0;
}




EDITED:

Doesn't Solve it. The culprit seems to be somewhere else

RedPenguin
04-23-2013, 06:56 PM
I made some MacOS executables and librtmp test files using the x86 darwin compiler on Ubuntu 10.04 (older OS due to older code :))

I need ATV1 and MacOS users to try:

http://forum.xbmc.org/showthread.php?tid=162307&pid=1404592#pid1404592

RedPenguin
04-23-2013, 09:58 PM
@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
Thanks as always KSV :)

gorilla.maguila
04-24-2013, 07:33 AM
More info on the crash I've found:

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


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:


==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:


packet->m_nBodySize = AMF_DecodeInt24(header + 3);


and then allocating the memory, the crash occurs.


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:


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

KSV
04-24-2013, 12:07 PM
try updating the relevant block with following 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
try updating the relevant block with following 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

char *url = malloc(len + 1)

Never being freed, or they're false positive?

Thanks again

RedPenguin
04-25-2013, 01:26 AM
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
Changes:

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
Do you think it's worthy to look at the possible memory leaks pointed out by valgrind, like the

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
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
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
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
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
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
RedPenguin
Thanks:cool:

CLran619
04-28-2013, 01:02 AM
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

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
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.

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


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.
-z 2> Debug.txt

CLran619
04-28-2013, 04:32 AM
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
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
Should this one work with chaturbate?
Because I only get "Model status is error" on mac.

alexanderd
05-04-2013, 05:40 AM
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
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
So many thanks!!! To both of you, guys!

flocked
05-09-2013, 02:42 PM
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:
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
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
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.

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
Right just updated librtmp and still same thing.

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

chap
05-11-2013, 03:06 PM
Right just updated librtmp and still same thing.
FALLBACK None : 'u'playURL: rtmpe://ak.ps3-securestream.channel4.com/ondemand/?ovpfv=1.1&auth=da_akaIbybAdzd5bOd6cSamadbwalb7ajcW-brJIrr-4q-Y1g-oVpbpYrSjhrfnbmRnSmUkesas7sSjdn7n8qVocrTkUsWoRl6nU mSk6s7sbraj8oRn7pdparWkercoSmX&aifp=v002&slist=PS3/CH4_25_02_25_56666003001001_001.mp4 app=ondemand/?ovpfv=1.1&auth=da_akaIbybAdzd5bOd6cSamadbwalb7ajcW-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
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
bsVqWjdkWmXlSs7qetVm7j8q9m9rfkWmWrapajcj7lflRtXqat SnVj7ren8rek8m1s0qZ&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"

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
The URL/parameters from Jonny's log works too, just not on Android apparently.

E.g.

rtmpdump --rtmp "rtmpe://ak.ps3-securestream.channel4.com/ondemand/?ovpfv=1.1&auth=da_c8blcycbb.cDb.cFcJb8bgdKdicKdaa_-brJRWu-4q-Y2d-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pf p9reqTkVmbkRlXo6kem3tfmVlXp2k2&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-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pf p9reqTkVmbkRlXo6kem3tfmVlXp2k2&aifp=v002&slist=PS3/CH4_25_02_25_8343003001002_001.mp4"
--playpath "mp4:PS3/CH4_25_02_25_8343003001002_001.mp4?auth=da_c8blcyc bb.cDb.cFcJb8bgdKdicKdaa_-brJRWu-4q-Y2d-nekfldtRmUkapTkUpgqYsWqUj5mfkUk9n9k7lbsemWlVo8j8pf p9reqTkVmbkRlXo6kem3tfmVlXp2k2&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...


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
Sorry I am new to all this...

Am I meant to put this code somewhere?

yetanotherday
05-12-2013, 06:41 PM
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
Changes:
1. added support for featve.com changes
2. added support for wfctv.com

breaks
05-19-2013, 03:03 PM
http://www.mediafire.com/file/y40qscj9bkdth/rtmpdump-2.4.zip returns an error. Please re-upload.

KSV
05-20-2013, 03:51 AM
http://www.mediafire.com/file/y40qscj9bkdth/rtmpdump-2.4.zip returns an error. Please re-upload.

package re-uploaded.

freez
05-20-2013, 05:19 PM
Thanx ksv every thing works ok with latest patched files

jhb50
05-21-2013, 08:52 PM
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
Greetings KSV. Thanks for the updates. Appreciate if you can help with a few problems using the latest patch.


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?


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.


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
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
@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
@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
(...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
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.)


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):

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...

KSV
06-11-2013, 02:38 AM
Changes:
1. updated support for webvideocore.net servers

They have changed the security system a little bit. now every little detail of rtmp connection is checked to make sure only flash client can connect to their servers. most of the changes can be emulated via already existing switches but one detail required new patch.

Detected command:
rtmpdump -r "rtmp://vod4.webvideocore.net/live/" -a "live/" -f "WIN 11,6,602,180" -W "http://play.webvideocore.net/player3.swf" -p "http://www.wideopen.dk/info/_Video_on_Demand_191l2.aspx" --live -y "f_67ab4383a8c32007a78e1545e626e991.flv" -o "2013-05-29_09-56-50_f_67ab4383a8c32007a78e1545e626e991.flv"

you need to remove the -v (--live) switch and add following switches to command line to download it with latest binaries.
--tcUrl "rtmp://vod4.webvideocore.net/live/" -R --buffer 2000

KSV
06-11-2013, 02:44 AM
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.)

can you verify this again with latest binaries? size difference is only due to missing last slash in app and tcUrl parameter.

paxo
06-16-2013, 04:05 AM
can you verify this again with latest binaries? size difference is only due to missing last slash in app and tcUrl parameter.

Thanks for the clarification but, yes, the bug exists in the latest binaries posted.

KSV
06-17-2013, 03:26 AM
Thanks for the clarification but, yes, the bug exists in the latest binaries posted.

i have uploaded new binaries. it should fix the regression. parse_url function isn't that great in some situations. it's better to supply app and playpath as explicit parameters.

paxo
06-17-2013, 07:23 AM
i have uploaded new binaries. it should fix the regression. parse_url function isn't that great in some situations. it's better to supply app and playpath as explicit parameters.

Yep, the new version works as expected. I do note however your suggestion to use explicit app and playpath in the future. Thanks again!

PS: This forum has stability issues. Please consider having a specific RSS feed or something with the changelog and the link to updated binaries.

Luiz Prestez
06-17-2013, 01:58 PM
KSV, you can help me to capture a video rtmpt the url of the video is http://v3.webcasters.com.br/visualizador.aspx?CodTransmissao=141063 and address rtmpt this is
rtmpt://200.177.228.68:80/CursoForum_CursoForum_OD_Wowza?ticket=000000816647&id=38880699&crc=320094200&codTransmissao=mp4:92606_21.mp4
you can use any email and any name, the video is free.

The rtmpdump gave me the result:


C:\Documents and Settings\Administrador>rtmpdump -v -r "rtmpt://200.177.228.68:80/CursoForum_CursoForum_OD_Wowza?ticket=000000816647&id=38880699&crc=320094200&codTransmissao=mp4:92606_21.mp4" -W "http:
//v3.webcasters.com.br/flashplayer/jwplayer6/jwplayer.flash.swf" -o teste30
RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: Trying different position for server digest!
INFO: Connected...
ERROR: rtmp server requested close

RedPenguin
06-17-2013, 09:54 PM
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.)

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


Thank you so very much paxo for posting this. I was having this exact same issue and was wondering what was going on. I was attempting to watch The Late Show in the Free Cable plugin using my compiled librtmp.so.0 for the RasPi and it kept erroring out unless I used the default one, which is no good being KSV fixes so many sites.

hasomaso
06-18-2013, 08:31 AM
KSV, you can help me to capture a video rtmpt the url of the video is "http://v3.webcasters.com.br/visualizador.aspx?CodTransmissao=141063" and address rtmpt this is "rtmpt://200.177.228.68:80/CursoForum_CursoForum_OD_Wowza?ticket=000000816647&id=38880699&crc=320094200&codTransmissao=mp4:92606_21.mp4", you can use any email and any name, the video is free.

The rtmpdump gave me the result:


C:\Documents and Settings\Administrador>rtmpdump -v -r "rtmpt://200.177.228.68:80/CursoForum_CursoForum_OD_Wowza?ticket=000000816647&id=38880699&crc=320094200&codTransmissao=mp4:92606_21.mp4" -W "http:
//v3.webcasters.com.br/flashplayer/jwplayer6/jwplayer.flash.swf" -o teste30
RTMPDump v2.4 GIT-2012-12-30 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
WARNING: Trying different position for server digest!
INFO: Connected...
ERROR: rtmp server requested close


the stream using a token, add in your parameter this and test again

-T "36QXq4W@GSBV^teR"

InterdimensionalCow
06-25-2013, 05:17 AM
Would anyone be able to determine if Livestream.com support requires an update? It may be my connection, but when attempting to download, even the newest RTMPDump from the topic post ended downloads prematurely. I was attempting to download a pre-recorded stream/video from the site, having formatted my code similarly the code I found here here (http://stream-recorder.com/forum/livestream-com-help-please-t14937.html). My apologies for not being very versed, but since --resume/-e was giving me an error about not finding a keyframe, I was afraid there might be a skip in the recording between the attempts (although not exactly practical to watch the entire video to see).

64874.194 kB / 1678.36 sec (51.9%)
ERROR: WriteN, RTMP send error 10053 (42 bytes)
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 67423
65003.075 kB / 1680.56 sec (52.0%)
Download may be incomplete (downloaded about 52.00%), try resuming

What leads me to believe RTMPDump might need a support update is, when looking up the specific errors given, I found that people have solved it before by updating RTMPDump. It seems random where it stops recording, mainly dependent on download speed. My internet wasn't fairing well earlier, so it consistently stopped around 3%. When my internet picked back up, it would stop around 50%.

Edit:
73693.020 kB / 1912.44 sec (59.1%)
ERROR: WriteN, RTMP send error 10053 (42 bytes)
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 66077
73693.810 kB / 1912.44 sec (59.1%)
Download may be incomplete (downloaded about 59.10%), try resuming

jhb50
07-06-2013, 10:56 AM
Probably a bad format url but since you have not posted it ....

nullacht
07-07-2013, 04:45 AM
Attention: I moved this thread to the top of the forum.

This thread should be used to discuss everything about KSV's customized rtmpdump binaries and/or patch files!

If you don't know how to download a specific stream from a website, then you should definitely open a new thread!

Qotscha
07-09-2013, 06:25 PM
With MPC-HC now supporting standard input (https://github.com/mpc-hc/mpc-hc/commit/68801edd2603b936f2c836ae6f76026426cd0496), rtmpsrv-mpc.exe (like rtmpsrv-vlc but using C:\Program Files (x86)\MPC-HC\mpc-hc.exe instead of C:\Program Files (x86)\VideoLAN\VLC\vlc.exe) could be nice :)

RedPenguin
07-17-2013, 02:15 AM
Lately I have been having issues with rtmpdump and Filmon.

I am attempting to record picktv or 372.(high/low).stream

I am using a batch file that goes to the site and gets the info.

http://tvpc.com/Channel.php?ChannelID=26492 you can go to play the channel to test.

But I have ran a debug and am getting this:

http://pastebin.com/Jb6ham8C

I have tried increasing the buffer and seem to be getting no where.

I have messed with a trial of Replay Media Catcher and it can record for 20+ min so I don't believe it's a server isuse.

EDIT: It appears that simply adding -f "WIN 11,7,700,224" appears to fix it somewhat for some reason on my Win 8 laptop but it fails on my Win XP PC and my buddy's Win 7. I can't seem to find what's causing the Win 8 PC to work.

KSV
07-17-2013, 03:19 AM
I have tried increasing the buffer and seem to be getting no where.

I have messed with a trial of Replay Media Catcher and it can record for 20+ min so I don't believe it's a server issue.

try with --buffer 3000. i was able to record about 8 minutes of video without any problem. so i don't think it's a problem with rtmpdump.

With MPC-HC now supporting standard input (https://github.com/mpc-hc/mpc-hc/commit/68801edd2603b936f2c836ae6f76026426cd0496), rtmpsrv-mpc.exe (like rtmpsrv-vlc but using C:\Program Files (x86)\MPC-HC\mpc-hc.exe instead of C:\Program Files (x86)\VideoLAN\VLC\vlc.exe) could be nice :)

Actually you can define VLC environment variable to specify any player with whatever options you want and same will be used by rtmpsrv-vlc.

Windows:
set VLC="C:\Program Files (x86)\MPC-HC\mpc-hc.exe" -
rtmpsrv-vlc.exe

RedPenguin
07-17-2013, 06:58 AM
try with --buffer 3000. i was able to record about 8 minutes of video without any problem. so i don't think it's a problem with rtmpdump.


I put that in and for some reason every time it hits 121 secs, it disconnects and restarts.

EDIT: Maybe the ID system of their's is funky, cause I literally just left the script alone not touching anything and ran it again and now it works. Maybe I accidentally trigged some throttling from them or something, who knows.

gallina94
07-18-2013, 08:37 AM
Compiling with Patch for other systems:

assuming you have all tools (gcc, binutils etc.) and dependencies (OpenSSL, Zlib) installed correctly for your distribution.

1. clone the repository
git clone git://git.ffmpeg.org/rtmpdump

2. copy patch from package to rtmpdump directory and apply it
patch -p0 -i Patch.diff

3. then just compile and install normally
make
sudo make install prefix=/usr

Mac users should add SYS=darwin while compiling. you can also add XLDFLAGS="-s -static" to statically link and strip the resulting binary.

Hi, i was able to compile on UBUNTU 12.04 but as soon as i launche rtmpdump i get
Segmentation fault (core dumped)

any idea?

KSV
07-18-2013, 10:34 AM
Hi, i was able to compile on UBUNTU 12.04 but as soon as i launche rtmpdump i get
Segmentation fault (core dumped)

any idea?

Your rtmpdump is loading the wrong version of librtmp.so. try with ldd rtmpdump to determine the correct location of librtmp being loaded by rtmpdump and replace it with newly compiled version.

by default make install command installs the binaries in /usr/local path. you can change it by supplying the prefix switch.
sudo make install prefix=/usr

you can also compile static binary to avoid dependency on librtmp.

gallina94
07-18-2013, 11:02 AM
Your rtmpdump is loading the wrong version of librtmp.so. try with ldd rtmpdump to determine the correct location of librtmp being loaded by rtmpdump and replace it with newly compiled version.

by default make install command installs the binaries in /usr/local path. you can change it by supplying the prefix switch.
sudo make install prefix=/usr

you can also compile static binary to avoid dependency on librtmp.

You are the man!!!! Worked.
Thank you

RedPenguin
07-18-2013, 02:27 PM
KSV, just to let you know, I was able to track down some fellow Filmon folks and they said even directly accessing the stream from their own website is experiencing similar behavior.

So that pretty much rules out rtmpdump in anyway.

It just one minute could let you record for 1hr, then other times disconnect you every few minutes.

Qotscha
07-20-2013, 09:07 PM
Actually you can define VLC environment variable to specify any player with whatever options you want and same will be used by rtmpsrv-vlc.

Windows:
set VLC="C:\Program Files (x86)\MPC-HC\mpc-hc.exe" -
rtmpsrv-vlc.exe

That's a convenient solution, thanks!

david_kh91
07-21-2013, 07:48 PM
WOW thanks alooooooooot KSV its working great here :D

but i have problem when recording many streams together only one will have audio the others will have no sound :( ( it could be rtmpdump problem ? or rtmpdump helper ? ) it show WARNING: ignoring too small audio packet :/

RedPenguin
07-21-2013, 09:00 PM
Thank you KSV for your assistance a few days ago.

I figured out exactly what the issue was this time.

There was one mistake in the recordFi**on script I was using to invoke rtmpdump, it wasn't sending "low" or "high" to their HTTP ID system via the wget.

But the main issue was I needed to only request "low" not "high" streams, as I assume because I don't have a premium account their "2 min" viewing limit for "high" for free users was booting me about every 120secs or so.

I fixed the two issues above and I have yet to get a disconnect. :)

yetanotherday
08-06-2013, 07:52 PM
hey ksv i have fresh ubuntu install , i need to get rtmpdump work with chaturbate the tool dump from other sites without any problem .. does ur version support chaturbate.com and why i cant get work by default ?? i have this version >>

RTMPDump v2.4 8e30642~git
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
ERROR: Closing connection: NetStream.Play.Failed


the command i used to build is :

cd ~/ && \
git clone git://git.ffmpeg.org/rtmpdump && \
cd rtmpdump && \
version="$(git log -1 --abbrev-commit | grep commit | cut -d' ' -f2)" && \
make VERSION="v2.4\ $version~git" && \
sudo checkinstall --pakdir "$HOME/Desktop" --pkgname rtmpdump \
--pkgversion "2.4-$version~git" --backup=no --default && sudo ldconfig

hope u help me this time .

flocked
08-19-2013, 06:41 PM
I have the same problem with chaturbate on Mac.

I patched the file successfully and compiled it with:
make SYS=darwin
sudo make SYS=darwin install prefix=/usr

But If I now try to capture a show, I get the following message:
Connecting ...
INFO: Connected...
INFO: Model status is error

I'm using a chaturbate code that works all the time under windows:
rtmpdump -r "rtmp://edge9-a.stream.highwebmedia.com/live-edge" -W "http://chaturbate.com/static/flash/CBV_2p634.swf" -p "http://chaturbate.com/NAME/" -C S:MYNAME -C S:NAME -C S:2.634 -C S:pbkdf2PASSWORD --live -y "anything_here" -o "NAME.flv"

Could anybody please help me? I tried to find the error for hours and hours…

jojesh
08-21-2013, 05:33 AM
i am using the latest patch

still this stream is not working with rtmpdump but i can see in browser...when used with rtmpdump it will download for few seconds then getting disconnected

-r "rtmp://89.248.163.3/play" -a "play?Auth=dxG2aOW9uvO4rz9dPGZWBbULXisY8uD3O0Fl9aUe EjkhxkJNqjOfVPV3iSm5Ur/" -f "LNX 11,2,202,297" -W "http://www.flashcast.tv/jwplayer/jwplayer.flash.swf" -p "http://www.flashcast.tv" -y "sury435" -o "2013-08-21_08-23-06_sury435.flv"

i generated this using latest rtmpsrv


the link to site

http://1tvlive.in/surya-tv/

what could be wrong.....please help

marktr
08-23-2013, 05:36 AM
I'm using a chaturbate code that works all the time under windows:
rtmpdump -r "rtmp://edge9-a.stream.highwebmedia.com/live-edge" -W "http://chaturbate.com/static/flash/CBV_2p634.swf" -p "http://chaturbate.com/NAME/" -C S:MYNAME -C S:NAME -C S:2.634 -C S:pbkdf2PASSWORD --live -y "anything_here" -o "NAME.flv"

Could anybody please help me? I tried to find the error for hours and hours…

You don't describe how you're escaping the $ characters in your password hash. This bites linux/mac users frequently as most advice and examples are geared at windows users.

Check that you're escaping $ with \$. Also, you might want to put 2.640, 2p640 instead of 2.634, 2p634. If that still doesn't solve your problem, check the CB specific thread on these forums.

jonaruto
08-25-2013, 04:53 PM
I am looking for an rtmpdump that doesn't record, but only connects (That it won't need -o).
I am trying to make a script that will check if the model is online, if it is online, it will start recording, else, it will retry in 15 seconds..
Can you help me please?

marktr
08-25-2013, 09:22 PM
I am looking for an rtmpdump that doesn't record, but only connects (That it won't need -o).

rtmpdump provides this functionality out of the box; a new patch is not required. If you don't specify an output file (don't use -o) it will write to the stdout stream, and since you don't need this output you can redirect it to a null file. On windows you can use NUL and on unix-like systems you can use /dev/null.

rtmpdump's informational messages are fed to stderr. Depending on the tools at your disposal, you can consume this output in a stream-like fashion, or save a predefined amount of text to a file, to be processed later. If you need the latter, your command line would look like:


Windows: rtmpdump ... > NUL 2>data.txt

Unix: rtmpdump ... > /dev/null 2>data.txt


If you need more detailed diagnostics to go in your captured file, consult the rtmpdump man page for verbosity switches.

jonaruto
08-26-2013, 02:15 AM
rtmpdump provides this functionality out of the box; a new patch is not required. If you don't specify an output file (don't use -o) it will write to the stdout stream, and since you don't need this output you can redirect it to a null file. On windows you can use NUL and on unix-like systems you can use /dev/null.

rtmpdump's informational messages are fed to stderr. Depending on the tools at your disposal, you can consume this output in a stream-like fashion, or save a predefined amount of text to a file, to be processed later. If you need the latter, your command line would look like:


Windows: rtmpdump ... > NUL 2>data.txt

Unix: rtmpdump ... > /dev/null 2>data.txt


If you need more detailed diagnostics to go in your captured file, consult the rtmpdump man page for verbosity switches.

Thanks, but I still can't get it to work.
This is my script:
@ECHO OFF

set timeout=15
set dir=Downloads

set /p user=Enter username:
echo Please wait...

:grab
set mydate=%DATE:/=-%@%TIME::=-%
set txt=%TMP%\out_%user%_[%mydate: =%].txt


rtmpdump -V -r rtmp://edge.stream.highwebmedia.com/live-edge/0 -p http://chaturbate.com/%user% -C S:ddalindaa -C S:%user% -C S:2.640 -C S:pbkdf2_sha256^$10000^$vq7lwDzUenwE^$Cyn5/Fnu0g5WsAUELQ/w2x3cXXnei5zQhB0NPpCC3yQ= > NUL 2>%txt%



for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^73:"') do set var="%%a"
for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^74:"') do set var2="%%a"
for /f "delims=" %%a in ('findstr /n . %txt% ^| findstr "^75:"') do set var3="%%a"

set key="%var2:~56%"
set key=%key:>=%
set key=%key:"=%

set status="%var:~56%"
set status=%status:>=%
set status=%status:"=%

set addr="%var3:~56%"
set addr=%addr:>=%
set addr=%addr:"=%

if not %status%==okay goto:offline
if %status%==okay goto:online

:offline
title %user% - Offline
color F8
echo Could not start recording, server returned status '%status%'.
goto:done

:online
title [D]%user% - Online [since %TIME%]
color 2F
echo Success! Server returned '%status%' - %addr%
echo Stream key:
echo %key%

set stamp=%DATE:/=-%@%TIME::=-%
set fname=%dir%\%key:~0,32%_[%stamp: =%].flv

rtmpdump -v -r rtmp://%addr%/live-origin/%key% -o "fname"


:done
title %user% - Offline
color F8
timeout 15
goto:grab




When I run it on online model, it start recording without output, at this line: rtmpdump -V -r rtmp://edge.stream.highwebmedia.com/live-edge/0 -p http://chaturbate.com/%user% -C S:ddalindaa -C S:%user% -C S:2.640 -C S:pbkdf2_sha256^$10000^$vq7lwDzUenwE^$Cyn5/Fnu0g5WsAUELQ/w2x3cXXnei5zQhB0NPpCC3yQ= > NUL 2>%txt%

I want it to start recording at this line:
rtmpdump -v -r rtmp://%addr%/live-origin/%key% -o "fname"

How can I do it?

marktr
08-26-2013, 06:47 AM
I want it to start recording at this line:
rtmpdump -v -r rtmp://%addr%/live-origin/%key% -o "fname"

How can I do it?

That won't work. See this post (http://stream-recorder.com/forum/showpost.php?p=60009&postcount=225) (and please read that thread before posting these questions; may save you lots of time and reduce noise on this thread).

You can start dumping with a variation of the original command line (remove > NUL 2> ... and add -o yourfilename.flv)

jonaruto
08-26-2013, 07:22 AM
That won't work. See this post (http://stream-recorder.com/forum/showpost.php?p=60009&postcount=225) (and please read that thread before posting these questions; may save you lots of time and reduce noise on this thread).

You can start dumping with a variation of the original command line (remove > NUL 2> ... and add -o yourfilename.flv)

It worked 6 months ago, first it created a txt file, and if the model was online it would start recording.
Now it doesn't work anymore

gorilla.maguila
09-12-2013, 10:37 AM
@KSV

Please add this:


else if (strstr(pageUrl, "yycast.com"))
{
SendCommand(r, "trajkoProkopiev", TRUE);
RTMP_SendCreateStream(r);
}

jhb50
09-13-2013, 10:25 AM
@KSV

Please add this:


else if (strstr(pageUrl, "yycast.com"))
{
SendCommand(r, "trajkoProkopiev", TRUE);
RTMP_SendCreateStream(r);
}


I confirm the requirement and second this request to be able to access yycast streams

KSV
09-14-2013, 12:44 AM
First post has been updated with required changes.

streamfreak
09-15-2013, 10:39 AM
Hey KSV, 4oD (Channel 4 catchup UK), has not been working on XBMC for a few months due to the change in encryption. If you have time, could you check it out as it is a very popular site. Also great admirer of your work.

jhb50
09-15-2013, 01:39 PM
@KSV
Thanks for the yycast fix. Works great. I appreciate your fast response.

freez
09-16-2013, 04:42 AM
@ksv thank u for updates

freez
10-18-2013, 01:09 PM
thank u for updates my BOSS :D

hasomaso
10-18-2013, 02:54 PM
thank u also for new release @KSV
works fine

i think www.axcast.com server is not supported with the new release
can you please take a look


rtmpdump -v -r "rtmp://www.axcast.com/axcast_video/19" -a "axcast_video/19" -f "WIN 11,9,900,117" -W "http://www.axcast.com/viewer.swf" -p "http://www.axcast.com/channel/view/rtd-djibouti-toos-rtd-tv-live-19/1/1" -C S:19 -C S:N/A -C S:Anonymous_6480 -C S:viewer -C S:Anonymous_6480 -C S:0 -C S:false -C S:13821242281325952618ac4000bf175502828 -y "stream" -o "output.flv"

hasomaso
10-19-2013, 08:26 AM
thank u for axcast.com @KSV
but
i have tested with the new release and that bring me error message

ERROR: rtmp server sent error
ERROR: rtmp server requested close

chap
10-19-2013, 11:59 AM
rtmpdump -r "rtmp://www.axcast.com/axcast_video/19" -a "axcast_video/19" -f "WI
N 11,8,800,168" -W "http://www.axcast.com/viewer.swf" -p "http://www.axcast.com/
channel/view/rtd-djibouti-toos-rtd-tv-live-19" -C S:19 -C S:N/A -C S:Anonymous_8
05 -C S:viewer -C S:Anonymous_805 -C S:0 -C S:false -C S:1382205365506295262c7b5
1ae3f109445530 -y "stream" -o "2013-10-19_08-57-02_stream.flv" -v
RTMPDump v2.4 GIT-2013-10-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
Starting Live Stream
INFO: Metadata:
INFO: presetname Custom
INFO: creationdate Fri Oct 18 20:57:46 2013
INFO: videodevice USB 2861 Device
INFO: framerate 10.00
INFO: width 320.00
INFO: height 240.00
INFO: videocodecid avc1
INFO: videodatarate 85.00
INFO: avclevel 21.00
INFO: avcprofile 66.00
INFO: videokeyframe_frequency 5.00
INFO: audiodevice Line in/Mic in
INFO: audiosamplerate 11025.00
INFO: audiochannels 1.00
INFO: audioinputvolume 75.00
INFO: audiocodecid mp4a
INFO: audiodatarate 28.00
1876.024 kB / 59.55 sec

lorus
10-31-2013, 04:47 PM
Hi KSV,
hi folks,

I have a strange problem where dumping via rtmpdump.exe works but via librtmp.dll using XBMC not:

RTMPDUMP:
rtmpdump -r "rtmp://*/live" -W "httpp://rottr.bplaced.net/players.swf" -p "*" -v -y "*" -o "*"
RTMPDump v2.4 GIT-2012-11-09 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
Starting Live Stream
INFO: Metadata:
INFO: duration 0.00
INFO: width 1280.00
INFO: height 720.00
INFO: videodatarate 1074.22
INFO: framerate 25.00
INFO: videocodecid 7.00
INFO: audiodatarate 93.75
INFO: audiosamplerate 44100.00
INFO: audiosamplesize 16.00
INFO: stereo TRUE
INFO: audiocodecid 2.00
INFO: encoder Lavf53.6.0
INFO: filesize 0.00
1034.212 kB / 3.92 sec

xbmc.log (librtmp.dll)
23:24:20 T:6416 NOTICE: -->Python Interpreter Initialized<--
23:24:21 T:8444 NOTICE: Thread Background Loader start, auto delete: false
23:24:28 T:9032 NOTICE: DVDPlayer: Opening: * swfUrl=*pageUrl=* playpath=* swfVfy=true live=true
23:24:28 T:9032 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:24:28 T:6336 NOTICE: Thread CDVDPlayer start, auto delete: false
23:24:28 T:6336 NOTICE: Creating InputStream
23:24:29 T:6336 ERROR: rtmp server sent error
23:24:29 T:6336 ERROR: rtmp server requested close
23:24:29 T:6336 ERROR: CDVDPlayer::OpenInputStream - error opening * swfUrl=* pageUrl=* playpath=* swfVfy=true live=true]
23:24:29 T:6336 NOTICE: CDVDPlayer::OnExit()
23:24:29 T:6336 NOTICE: CDVDPlayer::OnExit() deleting input stream
23:24:29 T:9032 ERROR: Playlist Player: skipping unplayable item: 0, path [* swfUrl=* pageUrl=* playpath=* swfVfy=true live=true]
23:24:29 T:9252 NOTICE: Thread Background Loader start, auto delete: false
23:24:29 T:9032 NOTICE: CDVDPlayer::CloseFile()
23:24:29 T:9032 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
23:24:29 T:9032 NOTICE: DVDPlayer: waiting for threads to exit
23:24:29 T:9032 NOTICE: DVDPlayer: finished waiting

I'm using the latest version of your rtmpdump.exe and librtmp.dll. Librtmp.dll is correctly placed and it was previously working with. But now as you see it suddendly stopped working and I'm wondering why. Parameters are the same for both ...

Any thoughts on that?

cheerz,

lorus

KSV
11-01-2013, 04:27 AM
yeah i can reproduce this problem. rtmpdump adds flash version to the connect request while librtmp doesn't do so by default. so you have to pass it explicitly. as a workaround you can add it to the the command manually.

flashVer=WIN%2010,0,32,18

lorus
11-01-2013, 11:39 AM
Hey KSV,

found out that difference via wireshark shortly before you anwered here, too. But didn't get it work because of the space. %20 works like a charm ... thx :)

gorilla.maguila
12-24-2013, 03:26 AM
Recently a user asked me how to dump a stream on:

http://beta.ddoss.me/pay_tv.php

So in case anyone is interested to make it work some lines need to be added to rtmp.c:


else if (strstr(pageUrl, "ddoss.me"))
{
SendCommand(r, "r", FALSE);
RTMP_SendCreateStream(r);
SendGetStreamLength(r);
}


Then a simple rtmpdump command works:

rtmpdump -r rtmp://pc3oot.us.to:1935/live -p http://beta.ddoss.me/pay_tv.php -W http://ni208114_1.vweb03.nitrado.net/playr.swf -y action

hasomaso
12-24-2013, 07:50 AM
@KSV please support for that

RedPenguin
12-24-2013, 04:25 PM
KSV, I think UKCast did something to break your RTMP Redirect code.

The following channel:

http://www.ukcast.tv/channel.php?u=kkttv

Shows that rtmpdump attempts to go to the redirected server but then just sits there for ages.

Yet if you do a direct ukcast URL like rtmpe://93.120.27.58/live it works fine.

peterpan
12-24-2013, 06:30 PM
It's not even working on the website!

RedPenguin
12-26-2013, 04:12 AM
It's not even working on the website!

Yea I think ukcast was having issues or something that day.

At first it was loading in the webpage but not with rtmpdump then later it wasn't working in both.

Yet another ukcast channel I found did work. So they must be having server issues.

HiddenShadow
01-10-2014, 03:43 PM
Hello!

I have a problem with the latest version of patched rtmpsuck on windows xp 32bit.

It's crashes every few minutes of working:
http://i.imgur.com/8ZdFR1x.png

Fault address can be one of this:
0x00002ae4, 0x00003bfb, 0x000378c0.

Debug output:
DEBUG2: 0100: 0b .
DEBUG2: RTMP_ReadPacket: fd=1452
DEBUG2: 0000: 46 00 00 2f 00 01 01 08 F../....
DEBUG2: 0000: 6a 7f 73 67 e6 17 57 8c f2 2d 74 d7 4b 2c c2 f6 j.sg..W..-t.K,..
DEBUG2: 0010: db 92 0c 26 05 ad 50 23 e8 bb cb d6 76 c1 9b d8 ...&..P#....v...
DEBUG2: 0020: 67 2d 5d c3 0c f5 4a 5b 01 3f 87 17 43 a3 dd 92 g-]...J[.?..C...
DEBUG2: 0030: 13 e9 de 05 05 91 d4 e5 02 71 e6 35 3d c7 f6 b3 .........q.5=...
DEBUG2: 0040: 6f ff 54 46 5a bb 4e 66 96 39 c6 24 5b ae bd c8 o.TFZ.Nf.9.$[...
DEBUG2: 0050: 1f 27 a5 ab 69 d3 06 3d 73 6d 26 73 73 0b 47 be .'..i..=sm&ss.G.
DEBUG2: 0060: e4 ba e2 19 6c 6b 4e 27 34 7f e0 a1 21 31 df 28 ....lkN'4...!1.(
DEBUG2: 0070: cb c8 12 31 1b 7a c4 a9 29 cb 6b 93 91 4a e9 a6 ...1.z..).k..J..
DEBUG2: 0080: 25 3f 7b e6 5a 08 0f a4 33 b2 34 9d 6b 0a b2 67 %?{.Z...3.4.k..g
DEBUG2: 0090: 01 04 1f 1e 16 6b ba 04 cb 25 2d 71 5d db 84 8a .....k...%-q]...
DEBUG2: 00a0: db 5b ce b2 cf 24 64 f3 dc 3f 2d 37 5a 8e 82 5a .[...$d..?-7Z..Z
DEBUG2: 00b0: 63 c6 49 60 4b d1 39 be 65 e4 ec 02 49 aa 12 88 c.I`K.9.e...I...
DEBUG2: 00c0: 10 bf 54 c7 32 07 a9 55 b5 35 38 97 5a 2d 46 37 ..T.2..U.58.Z-F7
DEBUG2: 00d0: 00 5b aa 91 32 25 06 1d 1b 68 de c4 e8 9a ad 32 .[..2%...h.....2
DEBUG2: 00e0: 50 1d d5 92 c2 68 97 c9 fe 75 ef 0e 26 86 a1 15 P....h...u..&...
DEBUG2: 00f0: ae 63 31 67 6c 0a 62 d2 44 5c ba 40 5b a0 5a f7 .c1gl.b.D\.@[.Z.
DEBUG2: 0100: ad .
DEBUG2: RTMP_SendChunk: fd=1696, size=257
DEBUG2: 0000: 46 00 00 2f 00 01 01 08 F../....
DEBUG2: 0000: 6a 7f 73 67 e6 17 57 8c f2 2d 74 d7 4b 2c c2 f6 j.sg..W..-t.K,..
DEBUG2: 0010: db 92 0c 26 05 ad 50 23 e8 bb cb d6 76 c1 9b d8 ...&..P#....v...
DEBUG2: 0020: 67 2d 5d c3 0c f5 4a 5b 01 3f 87 17 43 a3 dd 92 g-]...J[.?..C...
DEBUG2: 0030: 13 e9 de 05 05 91 d4 e5 02 71 e6 35 3d c7 f6 b3 .........q.5=...
DEBUG2: 0040: 6f ff 54 46 5a bb 4e 66 96 39 c6 24 5b ae bd c8 o.TFZ.Nf.9.$[...
DEBUG2: 0050: 1f 27 a5 ab 69 d3 06 3d 73 6d 26 73 73 0b 47 be .'..i..=sm&ss.G.
DEBUG2: 0060: e4 ba e2 19 6c 6b 4e 27 34 7f e0 a1 21 31 df 28 ....lkN'4...!1.(
DEBUG2: 0070: cb c8 12 31 1b 7a c4 a9 29 cb 6b 93 91 4a e9 a6 ...1.z..).k..J..
DEBUG2: 0080: 25 3f 7b e6 5a 08 0f a4 33 b2 34 9d 6b 0a b2 67 %?{.Z...3.4.k..g
DEBUG2: 0090: 01 04 1f 1e 16 6b ba 04 cb 25 2d 71 5d db 84 8a .....k...%-q]...
DEBUG2: 00a0: db 5b ce b2 cf 24 64 f3 dc 3f 2d 37 5a 8e 82 5a .[...$d..?-7Z..Z
DEBUG2: 00b0: 63 c6 49 60 4b d1 39 be 65 e4 ec 02 49 aa 12 88 c.I`K.9.e...I...
DEBUG2: 00c0: 10 bf 54 c7 32 07 a9 55 b5 35 38 97 5a 2d 46 37 ..T.2..U.58.Z-F7
DEBUG2: 00d0: 00 5b aa 91 32 25 06 1d 1b 68 de c4 e8 9a ad 32 .[..2%...h.....2
DEBUG2: 00e0: 50 1d d5 92 c2 68 97 c9 fe 75 ef 0e 26 86 a1 15 P....h...u..&...
DEBUG2: 00f0: ae 63 31 67 6c 0a 62 d2 44 5c ba 40 5b a0 5a f7 .c1gl.b.D\.@[.Z.
DEBUG2: 0100: ad .
DEBUG2: RTMP_ReadPacket: fd=1452
DEBUG2: 0000: 47 00 00 7e 00 38 05 09 G..~.8..
DEBUG2: RTMP_SendPacket: fd=1452, size=34
DEBUG2: 0000: 43 ff ff ff 00 00 22 14 ff ff 94 29 C....."....)
DEBUG2: 0000: 02 00 0c 64 65 6c 65 74 65 53 74 72 65 61 6d 00 ...deleteStream.
DEBUG2: 0010: 3f f0 00 00 00 00 00 00 05 00 3f f0 00 00 00 00 ?.........?.....
DEBUG2: 0020: 00 00 ..
ERROR: WriteN, RTMP send error 10053 (46 bytes)
ERROR: RTMP_ReadPacket, failed to read RTMP packet body. len: 14341

gorilla.maguila
01-23-2014, 09:33 AM
I was trying to figure out why a simple rtmpdump command was blocking with message:

onStatus.............level...error..code...NetConn ection.Connect.Rejected

Then I realized that the error can be handled, avoiding blocking, adding:


if (AVMATCH(&code, &av_NetStream_Failed)
|| AVMATCH(&code, &av_NetStream_Play_Failed)
|| AVMATCH(&code, &av_NetStream_Play_StreamNotFound)
|| AVMATCH(&code, &av_NetConnection_Connect_Rejected)
|| AVMATCH(&code, &av_NetConnection_Connect_InvalidApp))


Does anybody know why this isn't included by default?

sunhouse2
02-03-2014, 05:26 PM
can't get teledunet.com streams with rtmpdump anyone have a solution?

jhb50
02-09-2014, 12:50 AM
@KSV

www.filmon.com recently changed their vod methodology.
Using MediaBox I get:

url: rtmp://flash-cloud.filmon.com/demand/storage/25/410/116548/mp4:116548.mp4
app: demand/storage/25/410/116548
extra:
flashVer: WIN 12,0,0,44
pageUrl: http://www.filmon.com/vod/view/5717-0-letters-from-a-killer
swfUrl: http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=48
tcUrl: rtmp://flash-cloud.filmon.com/demand/storage/25/410/116548
playPath: mp4:116548.mp4

which yields:
rtmpdump.exe -r "rtmp://flash-cloud.filmon.com/demand/storage/25/410/116548/mp4:116548.mp4" -y "mp4:116548.mp4" -p "http://www.filmon.com/vod/view/5717-0-letters-from-a-killer" -W "http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=48" -v -z -m 15 | ffplay.exe" -i -

but this fails with:
DEBUG: Property: <Name: code, STRING: NetConnection.Call.Failed>
DEBUG: Property: <Name: description, STRING: Method not found (FCSubscribe).>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_error>
ERROR: rtmp server sent error

I think the "extra:" above implies additional info is required.

Can you help?

chap
02-09-2014, 02:56 AM
rtmpdump -r "rtmp://flash-cloud.filmon.com/demand/storage/25/410/116548" -a "demand/storage/25/410/116548" -f "WIN 11,9,900,170" -W "http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf" -p "http://www.filmon.com/vod/view/5717-0-letters-from-a-killer" -C O:1 -C O:0 -y "mp4:116548.mp4" -o "2014-02-09_11-55-38_mp4_116548.flv"

jhb50
02-09-2014, 10:42 PM
@chap Thanks for the tip. Actually it turns out the c (conn) 's are not required, and it failed for me because I included a v (live) when it is a file.

So the minimum command that works is:
rtmpdump.exe -r "rtmp://flash-cloud.filmon.com/demand/storage/25/410/116548" -a "demand/storage/25/410/116548" -y "mp4:116548.mp4" -p "http://www.filmon.com/vod/view/5717-0-letters-from-a-killer" -W "http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=48"

Darby_Crash
02-20-2014, 01:59 PM
Recently a user asked me how to dump a stream on:

http://beta.ddoss.me/pay_tv.php

So in case anyone is interested to make it work some lines need to be added to rtmp.c:


else if (strstr(pageUrl, "ddoss.me"))
{
SendCommand(r, "r", FALSE);
RTMP_SendCreateStream(r);
SendGetStreamLength(r);
}


Then a simple rtmpdump command works:

rtmpdump -r rtmp://pc3oot.us.to:1935/live -p http://beta.ddoss.me/pay_tv.php -W http://ni208114_1.vweb03.nitrado.net/playr.swf -y action

Where can i found a patch for this?

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Parsing...
DEBUG: Parsed protocol: 0
DEBUG: Parsed host : pc3oot.us.to
DEBUG: Parsed app : live
DEBUG: Protocol : RTMP
DEBUG: Hostname : pc3oot.us.to
DEBUG: Port : 1935
DEBUG: Playpath : cinema
DEBUG: tcUrl : rtmp://pc3oot.us.to:1935/live
DEBUG: swfUrl : http://ni208114_1.vweb03.nitrado.net/playr.swf
DEBUG: pageUrl : http://streampiraten.ws/streams.php
DEBUG: app : live
DEBUG: live : yes
DEBUG: timeout : 30 sec
DEBUG: SWFSHA256:
DEBUG: 7f 0c 9d f4 6a 5b 03 11 55 e5 6e f3 17 9e 7e 9a
DEBUG: 18 43 ca 75 6b ff 99 f1 7d aa 9b 41 38 1c e4 01
DEBUG: SWFSize : 219602
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Client type: 03
DEBUG: HandShake: Client digest offset: 417
DEBUG: HandShake: Initial client digest:
DEBUG: fb bf ce 94 38 1f be 42 e6 38 1b 3d 63 b2 82 8a
DEBUG: cc 76 58 a2 52 8a 36 85 08 ed d6 e8 52 e4 6e 7e
DEBUG: HandShake: Type Answer : 03
DEBUG: HandShake: Server Uptime : 578056511
DEBUG: HandShake: FMS Version : 4.5.0.1
DEBUG: HandShake: Calculated digest key from secure key and server digest:
DEBUG: a5 f0 9f 9f 4c 8d 5f 42 1d 08 7a b3 8c 8d 18 80
DEBUG: 75 54 0c 37 3a 85 56 13 03 44 b0 f0 8d 04 f7 ec
DEBUG: HandShake: Client signature calculated:
DEBUG: 24 a2 fc e1 4c 05 d5 1a 71 fa 09 19 49 e7 10 59
DEBUG: af 04 55 2e f9 26 b7 08 5e 8d f3 b9 75 d3 e5 dc
DEBUG: HandShake: Server sent signature:
DEBUG: ba 5d 0a 47 41 e0 01 03 f8 61 6c a3 94 6e b4 3e
DEBUG: 7f 32 5d 2a a5 8b 88 f5 c4 97 04 2d af 94 86 ac
DEBUG: HandShake: Digest key:
DEBUG: 15 d4 47 b3 03 8c eb e8 92 7f 69 49 08 df 30 85
DEBUG: a5 f1 d8 57 b1 61 38 0f 24 ce a2 55 2b 2b ba 2e
DEBUG: HandShake: Signature calculated:
DEBUG: ba 5d 0a 47 41 e0 01 03 f8 61 6c a3 94 6e b4 3e
DEBUG: 7f 32 5d 2a a5 8b 88 f5 c4 97 04 2d af 94 86 ac
DEBUG: HandShake: Genuine Adobe Flash Media Server
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG: Invoking connect
INFO: Connected...
DEBUG: HandleServerBW: server BW = 2500000
DEBUG: HandleClientBW: client BW = 2500000 2
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 240 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _result>
DEBUG: Property: <Name: no-name, NUMBER: 1.00>
DEBUG: Property: <Name: no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: fmsVer, STRING: FMS/4,5,0,297>
DEBUG: Property: <Name: capabilities, NUMBER: 255.00>
DEBUG: Property: <Name: mode, NUMBER: 1.00>
DEBUG: (object end)
DEBUG: Property: <Name: no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: level, STRING: status>
DEBUG: Property: <Name: code, STRING: NetConnection.Connect.Success>
DEBUG: Property: <Name: description, STRING: Connection succeeded.>
DEBUG: Property: <Name: objectEncoding, NUMBER: 3.00>
DEBUG: Property: <Name: data, ECMA_ARRAY>
DEBUG: (object begin)
DEBUG: Property: <Name: version, STRING: 4,5,0,297>DEBUG: (object end)
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <connect>
DEBUG: sending ctrl, type: 0x0003
DEBUG: Invoking createStream
DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _result>
DEBUG: Property: <Name: no-name, NUMBER: 2.00>
DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, NUMBER: 1.00>
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <createStream>
DEBUG: FCSubscribe: cinema
DEBUG: Invoking FCSubscribe
DEBUG: SendPlay, seekTime=0, stopTime=0, sending play: cinema
DEBUG: Invoking play
DEBUG: sending ctrl, type: 0x0003
DEBUG: RTMP_ClientPacket, flex message, size 120 bytes, not fully supported
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _error>
DEBUG: Property: <Name: no-name, NUMBER: 3.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.Call.Failed>
DEBUG: Property: <Name: description, STRING: Method not found (FCSubscribe).>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_error>
ERROR: rtmp server sent error
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 144 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: onStatus>
DEBUG: Property: <Name: no-name, NUMBER: 151794.00>DEBUG: Property: NULL
DEBUG: Property: <Name: no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: level, STRING: error>
DEBUG: Property: <Name: code, STRING: NetStream.Play.Failed>
DEBUG: Property: <Name: description, STRING: Read access denied for stream cinema.>
DEBUG: Property: <Name: clientid, STRING: qAAPwRAA>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.Failed
ERROR: Closing connection: NetStream.Play.Failed
DEBUG: Closing connection.

Edit:

With this mod, work but sometimes rtmpdump fail and don't run also with some teledunet stream (Linux):


else if (strstr(pageUrl, "streampiraten.ws"))
{
SendCommand(r, "r", FALSE);
RTMP_SendCreateStream(r);
SendGetStreamLength(r);
}


Thanks gorilla.maguila!

Please KSV, can you compile a binary for Windows, also with this mod?

Darby_Crash
02-22-2014, 04:06 PM
I've compiled rtmpdump with KSV's patch and streampiraten.ws's fix for Windows.

http://www.mediafire.com/download/cfdlwsqg9zg3c4s/RTMPDUMP+2.4+%2B+KSV+Patch+%2B+StreamPiraten.ws+Fi x+%28Windows+32_64+bit%29.rar

64 bit version (MinGW) is 100% working.

32 bit version (Cygwin) need Cygwin's dll.

semerim
03-03-2014, 01:49 PM
I've compiled rtmpdump with KSV's patch and streampiraten.ws's fix for Windows.

http://www.mediafire.com/download/cfdlwsqg9zg3c4s/RTMPDUMP+2.4+%2B+KSV+Patch+%2B+StreamPiraten.ws+Fi x+%28Windows+32_64+bit%29.rar

64 bit version (MinGW) is 100% working.

32 bit version (Cygwin) need Cygwin's dll.


Great catch! 64 bit version resolved an issue I had with this stream:
rtmp://evp.mm.uol.com.br/radioam_poa/_definst_/radioam_poa.sdp/radioam_poa

Would it be possible for you to compile a 32 bit version that runs natively and doesn't use Cygwin?
Thanks.

denobis
03-04-2014, 06:14 AM
Thanks for your work KSV et alia.

When you calculate the SWFVerification token you must have the decompressed swf which in normal case is as simple as CWS. But what if you have a ZWS compressed swf? See

http://static1.tele-cinco.net/comun/swf/playerMitele.swf?h=37266293e1868ffe72b07e39b10cf57 8

It's already included this case? and if not, there is a possibility to implement lzma decompression?

denobis
03-04-2014, 07:12 AM
Not implemented in hashswf

if (i->first)
{
i->first = 0;

/* compressed? */

if (!strncmp(p, "CWS", 3))
{
*p = 'F';
i->zlib = 1;
}

HMAC_crunch(i->ctx, (unsigned char *)p, 8);
p += 8;
len -= 8;
i->size = 8;
}

So the program fails when the swf is ZWS which it's managed as FWS

denobis
03-04-2014, 07:24 AM
By the way, this info can be useful

http://helpx.adobe.com/flash-player/kb/exception-thrown-you-decompress-lzma-compressed.html

gorilla.maguila
03-04-2014, 01:24 PM
By the way, this info can be useful

http://helpx.adobe.com/flash-player/kb/exception-thrown-you-decompress-lzma-compressed.html

After modifying the header you still need to do the decompression and that requires to integrate a lzma decompression routine or link to lzma decompression library into rtmpdump.

http://www.7-zip.org/sdk.html

So your best option is to decompress then calculate the swfsize and swfhash manually and pass them as arguments --swfsize --swfhash

denobis
03-05-2014, 06:46 AM
Thanks,

i'll try, anyway would be desiderable to implement the library in the rtmpdump project thinking in the possible expansion of the lzma compression to all swf's. I'll try this too.

chanc
03-07-2014, 02:38 AM
Failed with hulu.

Please help !


d:\rtmpdump>perl get_flash_videos http://www.hulu.com/watch/601533
Using method 'hulu' for http://www.hulu.com/watch/601533
Downloading http://www.hulu.com/watch/601533
Found Hulu CID: 60347287
Found Hulu EID: wFXYYpQm3ZALl8lw9Az5CQ
Using quality H264 Medium
RTMPDump v2.4 GIT-2013-10-07 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
2 request not supported, attempting to use SWFVerification Type 1! Patches welc
ome...
ERROR: rtmp server sent error
ERROR: rtmp server requested close
Download failed, no valid file downloaded
Couldn't download any videos.

I am using win 7 . with combined get_flash_videos

KSV
03-14-2014, 12:31 AM
Changes:

1. also check client signature to detect if server wanna use old rtmp handshake
(fixes handshake problems with some lousy servers)
2. added support for ddoss.me, streampiraten.ws changes
3. handle NetConnection.Connect.Rejected for onStatus response along with _error

chap
03-14-2014, 02:08 AM
KSV
thanks:cool:

hasomaso
03-14-2014, 03:39 AM
perfect KSV

RedPenguin
03-14-2014, 02:44 PM
I have a strange mips.tv issue.

I am attempting to use the following link:

<link>rtmp://5.63.146.236/live playpath=msnbcbcb swfurl=http://www.mips.tv/content/scripts/eplayer.swf pageUrl=http://www.mips.tv/embedplayer/msnbcbcb/1/600/400 swfVfy=true conn=S:OK live=true timeout=30 buffer=90000</link>

using the latest librtmp.

For some reason it plays for like 3 seconds and totally freezes XBMC.

It also will not even begin to download with rtmpsrv.

Nothing looks to have really changed in Wireshark and obviously the video plays fine in their own player.

KSV
03-15-2014, 02:09 AM
@RedPenguin

can u post the link where i can test this or similar stream?

RedPenguin
03-15-2014, 09:11 AM
@RedPenguin

can u post the link where i can test this or similar stream?

http://2ndrun.tv/news_directory/national/msnbc/

KSV
03-15-2014, 11:05 AM
your playpath is missing some parameters.

msnbcbcb?id=194645

RedPenguin
03-15-2014, 11:11 AM
your playpath is missing some parameters.

msnbcbcb?id=194645

Oh ok, I had a feeling the playpath looked slightly differently, but for some reason I didn't see the id# in Wireshark. Thanks again.

Odd how it "works" but freezes without the ID part though, you think it would have just failed all together.

KSV
03-15-2014, 11:18 AM
Odd how it "works" but freezes without the ID part though, you think it would have just failed all together.

it's part of their security system. after few seconds it only sends ping messages without any stream data so connection never times out giving the feeling of freeze.

gorilla.maguila
03-21-2014, 06:28 AM
Another one:


else if (strstr(pageUrl, "arschkrampe.in"))
{
RTMP_SendCreateStream(r);
SendGetStreamLength(r);
SendCommand(r, "StreamPiraten", FALSE);
}


rtmpdump -r rtmp://pc3oot.us.to:1935/live -y ak -W http://ni208114_1.vweb03.nitrado.net/player.swf -p http://arschkrampe.in/ak/akstream.php

http://arschkrampe.in/ak/akstream.php

KSV
03-21-2014, 11:49 AM
i have posted an update for streampiraten.ws and clones (ddoss.me, arschkrampe.in etc.).

hasomaso
03-21-2014, 12:25 PM
Thanks..!!! Genius

lto
03-21-2014, 02:24 PM
I use your version of rtmpdump with rtmpdumphelper and it works great, but it always crashes when watching cam show and camera switches from public to private. This bug exist for months so instead just waiting for fix I wrote about it here. Anyway thanks for great work!

KSV
03-21-2014, 10:32 PM
I use your version of rtmpdump with rtmpdumphelper and it works great, but it always crashes when watching cam show and camera switches from public to private. This bug exist for months so instead just waiting for fix I wrote about it here.

Provide the url where this bug is reproducible easily.

lto
03-22-2014, 04:24 AM
Provide the url where this bug is reproducible easily.


I explained reproduction steps in private message.

mominsana78
03-22-2014, 05:11 AM
Hello
thanks ksv sir for guide

edited: cause some one said it if not want to banned

chanc
03-23-2014, 09:22 AM
i have posted an update for streampiraten.ws and clones (ddoss.me, arschkrampe.in etc.).

Could you please also an update for www. hulu.com ?

When I tried rtmphelper and get_flash_videos on hulu, neither of them works any more.

http://www.hulu.com/watch/605440

d:\rtmpdump>perl get_flash_videos --proxy http://127.0.0.1:8087 http://www.hulu.
com/watch/605440
Downloading http://www.hulu.com/watch/605440
Using method 'hulu' for http://www.hulu.com/watch/605440
Found Hulu CID: 60353365
Found Hulu EID: sTAmUQ0iYAOySaVQSCFwIg
Using quality H264 Medium
RTMPDump v2.4 GIT-2013-12-05 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
2 request not supported, attempting to use SWFVerification Type 1! Patches welc
ome...
ERROR: rtmp server sent error
ERROR: rtmp server requested close
Download failed, no valid file downloaded
Couldn't download any videos.

gorilla.maguila
03-26-2014, 10:07 AM
Another clone:


else if (strstr(pageUrl, "streamify.tv"))
{
SendCommand(r, "keGoVidishStambolSoseBardovci", TRUE);
RTMP_SendCreateStream(r);
}

lto
03-26-2014, 02:37 PM
I was able to fix the problem I described in private message.
I am on Windows I was able to attach debugger and reproduced crash multiple times in same place:

...
if (server->f_cur && server->rc.m_mediaChannel && !paused)
{
> server->rc.m_pauseStamp = server->rc.m_channelTimestamp[server->rc.m_mediaChannel];
if (RTMP_ToggleStream(&server->rc))
{

I checked if server is 0 but it didn't help, so I just called inside this if:

goto cleanup;

and it works, no more crashes with rtmpdumphelper

I think in some cases this server structure is messed up and crash happens

ilje
04-08-2014, 09:04 AM
how can i record mfc with rtmpdump ?

NxServer..flashVer..WIN 12,0,0,77..swfUrl..7http://www.myfreecams.com/mfc2/flash/MfcVideo130606.swf...tcUrl..+rtmp://video18.myfreecams.com:1935/NxServer..fpad....capabilities.@m........audioCode cs.@.........videoCodecs.@o........videoFunction.? .........pageUrl..bhttp://www.myfreecams.com/mfc2/static/player.html?broadcaster_id=0&cache_id=1396557146&targe.t=main..objectEncoding.............A...`.... ...A.4........DOWNLOAD.Aj.. ................&%..............&%................................._result.?....... ...fmsVer...FMS/4,5,4,3003..capabilities.@o........mode.?......... ....level...status..code...NetConnection.Connect.S uccess..description...Connection succeeded...objectEncoding...........data.......ve rsion..
4,5,4,3003...................&%.......C........loginResult.A..t........Handle... ........challenge...(function(){var a=44,b=226,c=56.1041198817|0,d=97,e=159.892519236| 0,f=86,g=64.1616584284|0,h=207.1722271813|0,i=354-125,j=299-194,k=183.1740402223|0,l=31.322321754|0,m=204>>2,n=126-20,o=202,p=179>>0,q=32>>2,r=303-254,s=234,t=227.75950473|0,u=76,v=77.1784674425|0, w=378-254,x=214>>0,y=128-120,z=28.2137735716|0;v=!!screen.width+!!screen.he ight+!!document.location.host;var qq=0+p+y+b+(t*g)+v+(j*s)+a+f-a+(u*e)-r+a+(w*v)+(k*q)+p-v+(g*w)+(p*d)+t+(x*a)-p+h-r+u-f-n+(n*x)-m+a+i+v+(b*i);qq*=254;return qq;}())..userID..................t.......UpdateSes sion.............cmd.@4........cmdarg1.A...D.....c mdarg2.Aj.. .....cmdarg3...........cmdarg4............C..K.... ..._result.A..t........41442386C..........createSt ream.@........B.....
...........C.....#...startDownload...........A.4.. .................._result.@.........?..........N.. )........play.............mp4:mfc_114099761.f4v... ........H..........receiveAudio................... ..........................................onStatus .............level...status..code...NetStream.Play .Reset..description..(Playing and resetting mfc_114099761.f4v...details...mfc_114099761.f4v..c lientid...rAA7gTDA..................onStatus...... .......level...status..code...NetStream.Play.Start ..description.."Started playing mfc_114099761.f4v...details...mfc_114099761.f4v..c lientid...rAA7gTDA..................|RtmpSampleAcc ess

Fv1
04-15-2014, 09:01 AM
KSV, I don't know if you monitor this thread but I had a question regarding the things listed as "small fixes" -

Your Read_1_Packet seems quite modified, I am mostly interested in fixes for files with odd timestamps due to starting in the middle of a livestream event. My initial attempt to rebase everything based on zero-from-stream-start and adding the delta of the received packet and the previous packet didn't seem to work, do you have any insights?

Thanks for your work!

freez
04-16-2014, 11:31 PM
a stream from streamify.tv with latest rtmp dump fix is not streaming the link of this server only can record it but not playing it live with vlc , check it , can u fix it & add it to ur binary
rtmpdump -r "rtmp://94.102.49.104/live" -a "live" -f "WIN 13,0,0,191" -W "http://www.streamify.tv/resources/scripts/eplayer.swf" -p "http://www.streamify.tv/embedplayer/sport2/1/650/500" -C S:OK --live -y "sport2?id=2375" | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -

fightnight
04-21-2014, 09:36 AM
Another clone:


else if (strstr(pageUrl, "streamify.tv"))
{
SendCommand(r, "keGoVidishStambolSoseBardovci", TRUE);
RTMP_SendCreateStream(r);
}


It would be great if we find a solution for this.. maybe some external parameter called for rtmpdump?

The list of webpages using this is growing

hasomaso
04-25-2014, 04:09 PM
hey KSV can you add and support that http://injatv.com/ for next rtmpdump release

kaphotics
04-30-2014, 09:34 PM
If anyone has gotten this working on OSX, I would appreciate the help.

freez
05-02-2014, 03:56 PM
another stream & still ksv cannot help !! :mad:

rtmpdump -r "rtmp://149.255.37.163/live" -a "live" -f "WIN 14,0,0,90" -W "http://www.streamify.tv/resources/scripts/eplayer.swf" -p "http://www.streamify.tv/embedplayer/sp2crl/1/650/500" -C S:OK --live -y "sp2crl?id=2676" | "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -

Darby_Crash
05-14-2014, 07:18 AM
I've problems with livetv.tn and teledunet. Bein's channels don't work.

RedPenguin
05-18-2014, 10:33 AM
For Freez or anyone else who needs Streamify I have compiled it into my latest files (for virtually any XBMC capable OS) along with the rest of normal patches.

http://www.mediafire.com/?x4cvp5hl4m9xr

Also if anybody else has random patches that need compiled in, as I know KSV can get very busy, I welcome any fixes for websites, as I want to "enable" any website possible especially within XBMC but also rtmpdump.

freez
05-21-2014, 03:42 PM
thank you red penguien:)

xonurx
05-22-2014, 05:11 PM
Hi, i'm trying on my Mac mavericks 10.9 and i got everytime on chaturbate, Model Status: error..
but everything works well on windows i don't know what i make false. can anyone help me please?

mariner
05-23-2014, 10:02 PM
Video clip duration error when using --Start and --Stop parameters.

For example, when -A 200 -B 500, recorded clip duration is incorrectly reported as 8m20s, instead of 5m.

Has anyone encountered same problem?

JDappaG4
05-26-2014, 07:37 AM
Hello to one and all, I must first of all thank everyone who contribute their time, patience and generosity here to help those of us who need it.
I would like some help/input with regards to downloading/recording a recorded video(My Recordings) from ustvnow.com(I use XBMC ustvnow addon). I use Rtmddownloader with rtmpsuck to capture the url my problem is when I try to download the video by pasting the url in cmd (I have already placed the rtmp executables in my System32 folder) it downloads but after either 30sec to a minute it stops the download and continues again.

The problem with this is that when the video is played it sticks at each point where the video was disconnected. I was wondering if this is normal or if there is an rtmp executable which downloads the entire video without disconnecting and also why if the video downloads using rtmpsuck.exe using the same url that it doesn't do so when I use rtmpdump?

Sorry about the long post just wanted it to be clear and concise.
Thank You!

chap
05-26-2014, 10:33 AM
I use Rtmddownloader with rtmpsuck to capture the url my problem is when I try to download the video by pasting the url in cmd (I have already placed the rtmp executables in my System32 folder) it downloads but after either 30sec to a minute it stops the download and continues again.
try use parametr -v

JDappaG4
05-27-2014, 05:02 AM
try use parametr -v

How exactly do I use this parametr could you give me an example as to where I would put it in this please:
"rtmpdump -r "rtmp://dvr4.ustvnow.com:1935/dvrrokuplay" -a "dvrrokuplay" -f "" -W "" -p "" -y "mp4:....." -o ".....flv"

Thank You!

peterpan
05-27-2014, 09:08 AM
Thanks for the release RP!!!

For Freez or anyone else who needs Streamify I have compiled it into my latest files (for virtually any XBMC capable OS) along with the rest of normal patches.

http://www.mediafire.com/?x4cvp5hl4m9xr

Also if anybody else has random patches that need compiled in, as I know KSV can get very busy, I welcome any fixes for websites, as I want to "enable" any website possible especially within XBMC but also rtmpdump.

chap
05-27-2014, 01:40 PM
How exactly do I use this parametr could you give me an example as to where I would put it in this please:
"rtmpdump -r "rtmp://dvr4.ustvnow.com:1935/dvrrokuplay" -a "dvrrokuplay" -f "" -W "" -p "" -y "mp4:....." -o ".....flv"

Thank You!
example rtmpdump -r "rtmp://dvr4.ustvnow.com:1935/dvrrokuplay" -a "dvrrokuplay" -f "" -W "" -p "" -y "mp4:....." -o ".....flv" -v

JDappaG4
05-28-2014, 05:51 AM
try use parametr -v
example rtmpdump -r "rtmp://dvr4.ustvnow.com:1935/dvrrokuplay" -a "dvrrokuplay" -f "" -W "" -p "" -y "mp4:....." -o ".....flv" -v

Thank you so very much for replying and helping, this simple "-v" made all the difference and it worked a treat. One question though why exactly does rtmpdump disconnect like that without using -v parameter?

The reason I ask is because for example if by some measure the connection is lost during downloading and I wanted to resume or start the video from a specific point using -A parameter, I wouldn't be able to using -v parameter since they can't work with live stream but if I do resume without -v then the video does the same as I mentioned in my first post.

Is there any other work around to this problem or a rtmpdump.exe that downloads the entire video without disconnecting without having to use -v so other parameters can be used?

Thank You!

lonmajs
05-29-2014, 02:55 PM
I do not understand where to download the last binaries.On the first page it says that the last update is from
2014 but latest available release is from September 12, 2013

https://github.com/K-S-V/Scripts/releases/latest

chap
05-29-2014, 03:44 PM
I wouldn't be able to using -v parameter since they can't work with live stream but if I do resume without -v then the video does the same as I mentioned in my first post.
Thank You!
try use parametr -R -e

JDappaG4
05-30-2014, 07:10 AM
try use parametr -R -e

Thank you so very much it works perfectly now I don't have to worry about missing anything when I download or start over each time connection gets disconnected.

Huge Thanks again!

lonmajs
05-31-2014, 05:45 AM
Is the latest rtmpdump release from KSV from septermber 2013?

KSV
05-31-2014, 10:31 AM
I do not understand where to download the last binaries.On the first page it says that the last update is from
2014 but latest available release is from September 12, 2013

https://github.com/K-S-V/Scripts/releases/latest

ignore the date. github shows the date when the tag v2.4 was created. it is the latest release.

lonmajs
06-04-2014, 04:42 PM
OK.Thanks.Github is so confusing to me.
Do you know how I can get this stream to work?


RTMPDump v2.4 GIT-2014-03-02 (Compiled by KSV)
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
WARNING: You haven't specified an output file (-o filename), using stdout
DEBUG: Protocol : RTMPT
DEBUG: Hostname : n2.mos.cdn.online.ru
DEBUG: Port : 80
DEBUG: Playpath : udp://0.0.0.0:3094
DEBUG: tcUrl : rtmpt://n2.mos.cdn.online.ru:80/live-r
DEBUG: swfUrl : http://www.corbina.tv/flash/swf/player.swf
DEBUG: pageUrl : http://www.corbina.tv/tv/tvc
DEBUG: app : live-r
DEBUG: flashVer : WIN 13,7,700,224
DEBUG: live : yes
DEBUG: timeout : 30 sec
DEBUG: SWFSHA256:
DEBUG: 3f bb 22 fa 33 28 7e fb 01 87 ca 85 82 d7 9f 0a
DEBUG: 3a f9 44 28 86 76 5b 7c be fd df c9 07 94 92 8a
DEBUG: SWFSize : 218957
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Client type: 03
DEBUG: HandShake: Client digest offset: 160
DEBUG: HandShake: Initial client digest:
DEBUG: 3e ed c7 95 28 03 f1 88 80 3c 16 96 05 d2 e2 e7
DEBUG: 22 bf 63 de 17 0c 46 e3 ac 41 1b d5 2b 8f 02 10
DEBUG: Trying to fill HTTP buffer, Retries: 1
DEBUG: Trying to read HTTP response, Bytes Available: 3221
DEBUG: HandShake: Type Answer : 03
DEBUG: HandShake: Server Uptime : 96850052
DEBUG: HandShake: FMS Version : 3.0.1.1
DEBUG: HandShake: Calculated digest key from secure key and server digest:
DEBUG: 9e ed a0 e9 fc b3 3f d8 7e 08 1f 41 80 75 a1 bb
DEBUG: a5 5c ec c1 5f 4c 3d f0 27 7f 69 ae b0 f9 45 47
DEBUG: HandShake: Client signature calculated:
DEBUG: 26 ac fd 77 a9 85 64 c6 3e 18 70 0d f0 34 cf 45
DEBUG: 95 15 eb d9 12 1f f5 1e 21 84 12 8d 96 33 40 64
DEBUG: HandShake: Server sent signature:
DEBUG: b1 82 28 13 b7 65 75 45 ac d6 75 70 bf bc 37 e4
DEBUG: 89 af a9 6c 1e 71 2c e9 a0 5b 51 d4 76 0d bf 5a
DEBUG: HandShake: Digest key:
DEBUG: 0c 3b a5 f5 df 91 7c 7e 04 d0 22 c0 51 67 1f ab
DEBUG: 8d 5e a8 f9 cc 95 5d 6c 3f c9 be 29 78 a8 00 fd
DEBUG: HandShake: Signature calculated:
DEBUG: b1 82 28 13 b7 65 75 45 ac d6 75 70 bf bc 37 e4
DEBUG: 89 af a9 6c 1e 71 2c e9 a0 5b 51 d4 76 0d bf 5a
DEBUG: HandShake: Genuine Adobe Flash Media Server
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG: Invoking connect
INFO: Connected...
DEBUG: Trying to fill HTTP buffer, Retries: 1
DEBUG: Trying to read HTTP response, Bytes Available: 146
DEBUG: HandleServerBW: server BW = 2500000
DEBUG: HandleClientBW: client BW = 2500000 2
DEBUG: HandleCtrl, received ctrl, type: 0, len: 6
DEBUG: HandleCtrl, Stream Begin 0
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 259 bytes
DEBUG: (object begin)
DEBUG: Property: <Name: no-name, STRING: _result>
DEBUG: Property: <Name: no-name, NUMBER: 1.00>
DEBUG: Property: <Name: no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: fmsVer, STRING: FMS/3,5,4,210>
DEBUG: Property: <Name: capabilities, NUMBER: 31.00>
DEBUG: Property: <Name: mode, NUMBER: 1.00>
DEBUG: (object end)
DEBUG: Property: <Name: no-name, OBJECT>
DEBUG: (object begin)
DEBUG: Property: <Name: level, STRING: status>
DEBUG: Property: <Name: code, STRING: NetConnection.Connect.Su
ccess>
DEBUG: Property: <Name: description, STRING: Connection succeeded.>
DEBUG: Property: <Name: data, ECMA_ARRAY>
DEBUG: (object begin)
DEBUG: Property: <Name: version, STRING: 3,5,4,210>
DEBUG: (object end)
DEBUG: Property: <Name: clientid, NUMBER: 541950032.00>
DEBUG: Property: <Name: objectEncoding, NUMBER: 3.00>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <connect>
DEBUG: sending ctrl, type: 0x0003
DEBUG: Invoking createStream
DEBUG: Trying to fill HTTP buffer, Retries: 1
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to read HTTP response, Bytes Available: 145
DEBUG: Trying to fill HTTP buffer, Retries: 2
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 3
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 4
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 5
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 6
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 7
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 8
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 9
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 10
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 11
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 12
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 13
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 14
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 15
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 16
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 17
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 18
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 19
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 20
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 21
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 22
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 23
DEBUG: Trying to read HTTP response, Bytes Available: 145
DEBUG: Trying to fill HTTP buffer, Retries: 24
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 25
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 26
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 27
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 28
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 29
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 30
DEBUG: Trying to read HTTP response, Bytes Available: 144
DEBUG: Trying to fill HTTP buffer, Retries: 31
DEBUG: Trying to read HTTP response, Bytes Available: 144
ERROR: RTMP_ReadPacket, failed to read RTMP packet header
DEBUG: Closing connection.

sandy187
06-04-2014, 05:03 PM
try this:
rtmp://n2.mos.cdn.online.ru:80/live-r -W http://www.corbina.tv/flash/swf/player.swf -p http://www.corbina.tv/tv/tvc -y udp://0.0.0.0:3094

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO: audiochannels 2.00
INFO: audiosamplerate 48000.00
INFO: audiocodecid mp4a
INFO: videocodecid avc1
INFO: width 320.00
INFO: height 240.00
INFO: frameWidth 320.00
INFO: frameHeight 240.00
INFO: displayWidth 320.00
INFO: displayHeight 240.00
INFO: trackinfo:
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: type audio
INFO: config 1190
INFO: description {AACFrame: size: 0, rate: 48000, channels: 2, sa
mples: 1024, errorBitsAbsent: true, profileObjectType: "LC"}
INFO: timescale 0.00
INFO: language eng
INFO: sampledescription:
INFO: type video
INFO: profile-level-id 42c01e
INFO: sprop-parameter-sets Z0LAHtkBQfv/AC0ALBAAAAMAEAAAAwMo8WLkgAA=,aMuMsg=
=
INFO: description {H264CodecConfigInfo: profile: "Baseline", level
: 3.0, frameSize: 320x240, displaySize: 327x240, PAR: 45:44}
INFO: rtpsessioninfo:
INFO: connectiondata IN IP4 0.0.0.0
INFO: name WowzaMediaServerPro MPEG-TS
INFO: origin - 2106934754 2106934754 IN IP4 127.0.0.1
INFO: timing 0 0
INFO: protocolversion 0
INFO: attributes:
INFO: range npt=now-
10772.097 kB / 165.89 secEdit: as usual changing the udp port # will play other channels, also.

bananacakes
06-06-2014, 05:17 PM
I downloaded the patch and the good thing is that now I can get multiple streams at the same time with this patch but it still doesnt seem to be adding the timestamp thing.
as a result my files still get overwritten.
I'm using Firefox if that makes any difference.

any suggestions for a complete noob? :(

bananacakes
06-08-2014, 01:09 PM
for some reason, i keep getting a rtmpsuck has failed message and then shortly afterwards, my flash player will crash...any idea why this is happening?

kaphotics
06-09-2014, 09:43 AM
Does anyone know how to get this stream to work?

RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
DEBUG: Parsing...
DEBUG: Parsed protocol: 2
DEBUG: Parsed host : c18fs.fplive.net
DEBUG: Parsed app : c18
DEBUG: Protocol : RTMPE
DEBUG: Hostname : c18fs.fplive.net
DEBUG: Port : 1935
DEBUG: Playpath : mp4:s/ve1354295/video.mp4
DEBUG: tcUrl : rtmpe://c18fs.fplive.net:1935/c18?nvb=20140609152849&nva=20140609192949&token=0209d16d853edd74c1df9
DEBUG: swfUrl : http://static.ak.crunchyroll.com/flash/20140509222305.3fa466762fa75d4718ea0ecf38dd5736/ChromelessPlayerApp.swf
DEBUG: pageUrl : http://www.crunchyroll.com/nananas-buried-treasure/episode-1-disowned-and-exiled-653293?p720=1
DEBUG: app : c18?nvb=20140609152849&nva=20140609192949&token=0209d16d853edd74c1df9
DEBUG: flashVer : MAC 13,0,0,214
DEBUG: live : no
DEBUG: timeout : 30 sec
DEBUG: SWFSHA256:
DEBUG: 4d ca f8 e2 1d ed 91 10 44 6f 63 e7 5a 0d 7c 19
DEBUG: e6 78 75 49 9d e6 da 8a 84 71 77 90 7e 50 ba 07
DEBUG: SWFSize : 583899
DEBUG: Setting buffer time to: 36000000ms
Connecting ...
DEBUG: RTMP_Connect1, ... connected, handshaking
DEBUG: HandShake: Client type: 06
DEBUG: HandShake: DH pubkey position: 568
DEBUG: HandShake: Client digest offset: 1062
DEBUG: HandShake: Initial client digest:
DEBUG: 24 c9 71 fa bf 07 ed 57 26 3c 97 24 26 c6 37 23
DEBUG: 78 15 ff ec e0 a8 62 ff d7 d9 f8 17 29 da a5 63
DEBUG: HandShake: Type Answer : 09
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
DEBUG: HandShake: Server Uptime : 122921763
DEBUG: HandShake: FMS Version : 4.5.3.1
DEBUG: HandShake: Server DH public key offset: 45
DEBUG: HandShake: Secret key:
DEBUG: be 25 70 7b 32 9b 80 e8 45 62 8f 29 84 cf f8 be
DEBUG: 49 2b 6e 52 80 b3 51 9d f3 fc 84 d7 c5 6f ec 5f
DEBUG: d7 12 5e 61 8d 36 94 ab 09 7a 8e e9 78 0e 05 7e
DEBUG: 93 3b 7d cc 89 fc 4b 5d 12 3e d4 f2 39 24 95 32
DEBUG: 8c 53 eb 0f e3 40 b1 f9 ae 2b 50 71 d6 d8 b7 c0
DEBUG: e3 3a 84 d7 c7 ef bb bc d6 e9 80 99 3c b2 2e 47
DEBUG: 02 58 7c e0 b3 10 87 a7 ed 1b 55 13 74 ef 5d 45
DEBUG: 43 ef a1 89 67 4d 15 b8 b5 86 74 d1 f6 d3 4d b1
DEBUG: RC4 Out Key:
DEBUG: 20 3f c0 ab 09 aa 5e 73 ec 8c c9 77 d4 85 de dc
DEBUG: RC4 In Key:
DEBUG: 2d 87 f6 93 74 98 a4 d0 6a 60 a1 04 b5 71 ce 27
DEBUG: HandShake: Calculated digest key from secure key and server digest:
DEBUG: 95 cb 38 f0 18 41 be 86 2d f5 1b 6f d4 2f 60 70
DEBUG: 10 a5 84 4b f0 92 80 62 ed 68 b7 39 10 85 86 e9
DEBUG: HandShake: Client signature calculated:
DEBUG: 52 17 ee b1 b4 84 7a 4a 2f 9a d9 9e 65 ca 14 25
DEBUG: 0a 70 fd ff 5c 1e 00 d9 2c a0 70 21 66 b5 37 01
DEBUG: HandShake: Server sent signature:
DEBUG: 63 1e ef 73 64 33 07 9b cd 10 53 8e 20 15 9a f0
DEBUG: 3e 9e 39 10 79 d3 45 43 d5 23 b2 c6 3a 95 5e 55
DEBUG: HandShake: Digest key:
DEBUG: 97 64 5b a2 c6 f7 a2 47 dd 22 9b 4d 19 0b 24 f5
DEBUG: dc 03 cb fe 1b d1 b2 8c 4c c0 23 5a 4e 21 99 d1
DEBUG: HandShake: Signature calculated:
DEBUG: 63 1e ef 73 64 33 07 9b cd 10 53 8e 20 15 9a f0
DEBUG: 3e 9e 39 10 79 d3 45 43 d5 23 b2 c6 3a 95 5e 55
DEBUG: HandShake: Genuine Adobe Flash Media Server
DEBUG: HandShake: Handshaking finished....
DEBUG: RTMP_Connect1, handshaked
DEBUG2: RTMP_SendPacket: fd=4, size=587
DEBUG2: 0000: 03 00 00 00 00 02 4b 14 00 00 00 00 ......K.....
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 45 63 31 38 3f ......app..Ec18?
DEBUG2: 0020: 6e 76 62 3d 32 30 31 34 30 36 30 39 31 35 32 38 nvb=201406091528
DEBUG2: 0030: 34 39 26 6e 76 61 3d 32 30 31 34 30 36 30 39 31 49&nva=201406091
DEBUG2: 0040: 39 32 39 34 39 26 74 6f 6b 65 6e 3d 30 32 30 39 92949&token=0209
DEBUG2: 0050: 64 31 36 64 38 35 33 65 64 64 37 34 63 31 64 66 d16d853edd74c1df
DEBUG2: 0060: 39 00 08 66 6c 61 73 68 56 65 72 02 00 0e 4d 41 9..flashVer...MA
DEBUG2: 0070: 43 20 31 33 2c 30 2c 30 2c 32 31 34 00 06 73 77 C 13,0,0,214..sw
DEBUG2: 0000: c3 .
DEBUG2: 0000: 66 55 72 6c 02 00 6e 68 74 74 70 3a 2f 2f 73 74 fUrl..nhttp://st
DEBUG2: 0010: 61 74 69 63 2e 61 6b 2e 63 72 75 6e 63 68 79 72 atic.ak.crunchyr
DEBUG2: 0020: 6f 6c 6c 2e 63 6f 6d 2f 66 6c 61 73 68 2f 32 30 oll.com/flash/20
DEBUG2: 0030: 31 34 30 35 30 39 32 32 32 33 30 35 2e 33 66 61 140509222305.3fa
DEBUG2: 0040: 34 36 36 37 36 32 66 61 37 35 64 34 37 31 38 65 466762fa75d4718e
DEBUG2: 0050: 61 30 65 63 66 33 38 64 64 35 37 33 36 2f 43 68 a0ecf38dd5736/Ch
DEBUG2: 0060: 72 6f 6d 65 6c 65 73 73 50 6c 61 79 65 72 41 70 romelessPlayerAp
DEBUG2: 0070: 70 2e 73 77 66 00 05 74 63 55 72 6c 02 00 63 72 p.swf..tcUrl..cr
DEBUG2: 0000: c3 .
DEBUG2: 0000: 74 6d 70 65 3a 2f 2f 63 31 38 66 73 2e 66 70 6c tmpe://c18fs.fpl
DEBUG2: 0010: 69 76 65 2e 6e 65 74 3a 31 39 33 35 2f 63 31 38 ive.net:1935/c18
DEBUG2: 0020: 3f 6e 76 62 3d 32 30 31 34 30 36 30 39 31 35 32 ?nvb=20140609152
DEBUG2: 0030: 38 34 39 26 6e 76 61 3d 32 30 31 34 30 36 30 39 849&nva=20140609
DEBUG2: 0040: 31 39 32 39 34 39 26 74 6f 6b 65 6e 3d 30 32 30 192949&token=020
DEBUG2: 0050: 39 64 31 36 64 38 35 33 65 64 64 37 34 63 31 64 9d16d853edd74c1d
DEBUG2: 0060: 66 39 00 04 66 70 61 64 01 00 00 0c 63 61 70 61 f9..fpad....capa
DEBUG2: 0070: 62 69 6c 69 74 69 65 73 00 40 6d e0 00 00 00 00 bilities.@m.....
DEBUG2: 0000: c3 .
DEBUG2: 0000: 00 00 0b 61 75 64 69 6f 43 6f 64 65 63 73 00 40 ...audioCodecs.@
DEBUG2: 0010: ab ee 00 00 00 00 00 00 0b 76 69 64 65 6f 43 6f .........videoCo
DEBUG2: 0020: 64 65 63 73 00 40 6f 80 00 00 00 00 00 00 0d 76 decs.@o........v
DEBUG2: 0030: 69 64 65 6f 46 75 6e 63 74 69 6f 6e 00 3f f0 00 ideoFunction.?..
DEBUG2: 0040: 00 00 00 00 00 00 07 70 61 67 65 55 72 6c 02 00 .......pageUrl..
DEBUG2: 0050: 5e 68 74 74 70 3a 2f 2f 77 77 77 2e 63 72 75 6e ^http://www.crun
DEBUG2: 0060: 63 68 79 72 6f 6c 6c 2e 63 6f 6d 2f 6e 61 6e 61 chyroll.com/nana
DEBUG2: 0070: 6e 61 73 2d 62 75 72 69 65 64 2d 74 72 65 61 73 nas-buried-treas
DEBUG2: 0000: c3 .
DEBUG2: 0000: 75 72 65 2f 65 70 69 73 6f 64 65 2d 31 2d 64 69 ure/episode-1-di
DEBUG2: 0010: 73 6f 77 6e 65 64 2d 61 6e 64 2d 65 78 69 6c 65 sowned-and-exile
DEBUG2: 0020: 64 2d 36 35 33 32 39 33 3f 70 37 32 30 3d 31 00 d-653293?p720=1.
DEBUG2: 0030: 0e 6f 62 6a 65 63 74 45 6e 63 6f 64 69 6e 67 00 .objectEncoding.
DEBUG2: 0040: 40 08 00 00 00 00 00 00 00 00 09 @..........
DEBUG: Invoking connect
INFO: Connected...
DEBUG2: RTMP_ReadPacket: fd=4
DEBUG2: 0000: 02 00 00 00 00 00 04 01 00 00 00 00 ............
DEBUG2: 0000: 00 00 00 80 ....
DEBUG: HandleChangeChunkSize, received: chunk size change to 128
DEBUG2: RTMP_ReadPacket: fd=4
DEBUG2: 0000: 03 00 00 00 00 00 a5 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 12 43 6f 6e 6e 65 63 ription...Connec
DEBUG2: 0060: 74 69 6f 6e 20 66 61 69 6c 65 64 2e 00 0b 64 65 tion failed...de
DEBUG2: 0070: 73 63 72 69 70 74 69 6f 6e 02 00 26 5b 20 53 65 scription..&[ Se
DEBUG2: RTMP_ReadPacket: fd=4
DEBUG2: 0000: c3 .
DEBUG2: 0000: 72 76 65 72 2e 52 65 6a 65 63 74 20 5d 20 3a 20 rver.Reject ] :
DEBUG2: 0010: 43 6f 6e 6e 65 63 74 69 6f 6e 20 66 61 69 6c 65 Connection faile
DEBUG2: 0020: 64 2e 00 00 09 d....
DEBUG: RTMP_ClientPacket, received: invoke 165 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: Connection failed.>
DEBUG: Property: <Name: description, STRING: [ Server.Reject ] : Connection failed.>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_error>
ERROR: rtmp server sent error
DEBUG2: RTMP_ReadPacket: fd=4
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.

lorus
06-15-2014, 08:27 AM
Hi KSV,

I'm in trouble with unicode encoded token strings that contain special characters. In the swf they are created by base64 decoding a string like:


public static var ackey:string = abkey.tostring();
public static var abkey:ByteArray = Base64Decoder.decode("#RGd%has4102gH2bvXa0#w@1");


ackey is then later used as securetoken:


_loc2_ = TEA.decrypt(param1.info.secureToken,PlayerState.ac key);
this._connection.call("secureTokenResponse",null,_loc2_);

so ackey is something like:
DgajÎ5Óhٻ×kL5

as it contains multiple special chars, this is definitly something we can't pass through cmd to rtmpdump or as *.strm to xbmc. Do you have an idea, how I could handle such a secure token?


cheerz,

lorus

mckv
06-15-2014, 10:02 AM
it should work on any decent shell like on bash
using UTF8 locale (not sure if it is what flash actually uses)
echo -n '#RGd%has4102gH2bvXa0#w@1' | hexdump
0000000 5223 6447 6825 7361 3134 3230 4867 6232
0000010 5876 3061 7723 3140
0000018

echo -n 522364476825736131343230486762325876306177233140 | base64 -d | hexdump
0000000 6de7 ebb7 3b8e cdeb efb9 b57e 5ddf dff8
0000010 f46d cee3 ebbb f66d cee7 dffa b54e bdef
0000020 dfb7 345e
0000024


then the token should look something like

-T "$(echo -n '\x6d\xe7\xeb\xb7\x3b\x8e\xcd\xeb\xef\xb9\xb5\x7e\ x5d\xdf\xdf\xf8\xf4\x6d\xce\xe3\xeb\xbb\xf6\x6d\xc e\xe7\xdf\xfa\xb5\x4e\xbd\xef\xdf\xb7\x34\x5e')"

it is also a question how the #RGd%has4102gH2bvXa0#w@1 is stored it might be ascii or utf8 or utf16 or whatever so you might need to try different ways.

KSV
06-16-2014, 10:11 AM
i actually answered a similar question in other thread few days ago. try to find it in one of my previous posts.

muenster2011
07-13-2014, 06:56 PM
Hello KSV,

the mainline rtmpdump still doesn't support all sites, that's why we still need your amazing patch. Thanks for your work!

Do you have any plans to commit it to the rtmp-git-Repo? Because your patch and the mainline rtmpdump repo are far diverged yet. You have to checkout a commit from Dezember 2012 before you can apply the patch.

I just looked into it and the problem is, that the maintainer simplified some data structures in rtmp.c.

Did you try to contact the auther yet?


Greetings
muenster

RedPenguin
07-17-2014, 12:08 AM
Another clone:


else if (strstr(pageUrl, "streamify.tv"))
{
SendCommand(r, "keGoVidishStambolSoseBardovci", TRUE);
RTMP_SendCreateStream(r);
}


Exact same command but for the server "zenex.tv". (Must be a clone).

else if (strstr(pageUrl, "zenex.tv"))
{
SendCommand(r, "keGoVidishStambolSoseBardovci", TRUE);
RTMP_SendCreateStream(r);
}

EDIT: For some reason right now the server works without this command but I clearly seen it being sent via Wireshark when I played a channel from it.

forlan38
07-20-2014, 04:42 AM
Could you pls help?

http://stream-recorder.com/forum/rtmpdump-xlovecam-t18558.html

aweasd
08-13-2014, 09:49 PM
I'm getting 1 failed hunk when patching against 2.4 pulled from git.

[aesede@archasd ~]$ git clone git://git.ffmpeg.org/rtmpdump
Cloning into 'rtmpdump'...
remote: Counting objects: 2553, done.
remote: Compressing objects: 100% (914/914), done.
remote: Total 2553 (delta 1926), reused 2149 (delta 1638)
Receiving objects: 100% (2553/2553), 800.45 KiB | 190.00 KiB/s, done.
Resolving deltas: 100% (1926/1926), done.
Checking connectivity... done.
[aesede@archasd ~]$ cd rtmpdump
[aesede@archasd rtmpdump]$ patch -p0 -i Patch.diff
patching file Makefile
patching file librtmp/Makefile
patching file librtmp/amf.c
patching file librtmp/handshake.h
patching file librtmp/hashswf.c
patching file librtmp/log.c
patching file librtmp/parseurl.c
patching file librtmp/rtmp.c
Hunk #4 succeeded at 344 (offset 2 lines).
Hunk #5 succeeded at 368 (offset 2 lines).
Hunk #6 succeeded at 456 (offset 2 lines).
Hunk #7 succeeded at 479 (offset 2 lines).
Hunk #8 succeeded at 529 (offset 2 lines).
Hunk #9 succeeded at 588 (offset 2 lines).
Hunk #10 succeeded at 791 (offset 2 lines).
Hunk #11 succeeded at 868 (offset 2 lines).
Hunk #12 succeeded at 980 (offset 2 lines).
Hunk #13 succeeded at 1432 (offset 2 lines).
Hunk #14 succeeded at 1548 (offset 2 lines).
Hunk #15 succeeded at 1561 (offset 2 lines).
Hunk #16 succeeded at 1587 (offset 2 lines).
Hunk #17 succeeded at 1603 (offset 2 lines).
Hunk #18 succeeded at 1648 (offset 2 lines).
Hunk #19 succeeded at 1685 (offset 2 lines).
Hunk #20 succeeded at 1736 (offset 2 lines).
Hunk #21 succeeded at 1900 (offset 2 lines).
Hunk #22 succeeded at 2206 (offset 2 lines).
Hunk #23 succeeded at 2224 (offset 2 lines).
Hunk #24 succeeded at 2331 (offset 2 lines).
Hunk #25 succeeded at 2448 (offset 2 lines).
Hunk #26 succeeded at 2480 (offset 2 lines).
Hunk #27 succeeded at 2981 (offset -12 lines).
Hunk #28 succeeded at 2994 (offset -12 lines).
Hunk #29 succeeded at 3021 (offset -12 lines).
Hunk #30 succeeded at 3087 (offset -12 lines).
Hunk #31 succeeded at 3325 (offset -12 lines).
Hunk #32 succeeded at 3352 (offset -12 lines).
Hunk #33 FAILED at 3383.
Hunk #34 succeeded at 3394 (offset -23 lines).
Hunk #35 succeeded at 3463 (offset -23 lines).
Hunk #36 succeeded at 3516 (offset -23 lines).
Hunk #37 succeeded at 3620 (offset -23 lines).
Hunk #38 succeeded at 3647 (offset -23 lines).
Hunk #39 succeeded at 3682 (offset -23 lines).
Hunk #40 succeeded at 3698 (offset -23 lines).
Hunk #41 succeeded at 3780 (offset -23 lines).
Hunk #42 succeeded at 3889 (offset -23 lines).
Hunk #43 succeeded at 4202 (offset -23 lines).
Hunk #44 succeeded at 4664 (offset -23 lines).
Hunk #45 succeeded at 4684 (offset -23 lines).
Hunk #46 succeeded at 4825 (offset -23 lines).
Hunk #47 succeeded at 4847 (offset -23 lines).
Hunk #48 succeeded at 4865 (offset -23 lines).
Hunk #49 succeeded at 4909 (offset -23 lines).
Hunk #50 succeeded at 4987 (offset -23 lines).
Hunk #51 succeeded at 5396 (offset -23 lines).
Hunk #52 succeeded at 5599 (offset -23 lines).
1 out of 52 hunks FAILED -- saving rejects to file librtmp/rtmp.c.rej
patching file librtmp/rtmp.h
Hunk #2 succeeded at 177 with fuzz 2 (offset 1 line).
Hunk #3 succeeded at 228 (offset -4 lines).
Hunk #4 succeeded at 315 (offset -4 lines).
Hunk #5 succeeded at 381 (offset -4 lines).
patching file librtmp/rtmp_sys.h
patching file rtmpdump.c
patching file rtmpgw.c
patching file rtmpsrv.c
patching file rtmpsuck.c
patching file thread.c
[aesede@archasd rtmpdump]$

What version of rtmpdump was KSV's build patched against?
I downloaded the patch from: https://github.com/K-S-V/Scripts/releases

muenster2011
08-19-2014, 05:52 PM
The last one from 2012 works at least (commit 0d44da9f5f5a4aa7cd64566c64d89d2fb392e3ef). I tried to reintegrate the patch into the mainline git, but failed.

But here's a skript I made, which parses the needed information automatically from the source code:

#!/bin/bash

if [ "$1" == "" ]; then
echo "Usage: Paste Link to model as first argument."
exit 1
fi
if [ "${1:(-1)}" == "/" ]; then
model=${1%?}
else
model=$1
fi
model=${model//*\//}

raw=`wget -qO - http://chaturbate.com/$model/|grep -B1 'password: '`
username=${raw#*\'}
username=${username%%\'*}
password=${raw#*password*\'}
password=${password%%\'*}
#echo $username
#echo $password

#password=${password//\$/\\$}
#date +%Y-%m-%d_%H-%M-%S

rtmpdump -v -r "rtmp://edge13-b.stream.highwebmedia.com/live-edge" -p "http://chaturbate.com/$model" -C S:$username -C S:$model -C S:2.634 -C S:$password -y "playpath" -o $model\_`date +%Y-%m-%d_%H-%M-%S`.flv


Have fun
muenster

denobis
08-20-2014, 05:58 PM
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)

dbufft(char *text)
{
int local8,local3,r2size;
char *chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijk lmnopqrstuvwxyzabcdefghijklm";
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


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.

RedPenguin
08-28-2014, 12:09 PM
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)

dbufft(char *text)
{
int local8,local3,r2size;
char *chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMabcdefghijk lmnopqrstuvwxyzabcdefghijklm";
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


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
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
--- 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
@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/watch-cnn-news-live-free-cnn-headline-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
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
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

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

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

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/xuo5ig451xov8qd/rtmpdump.exe

mckv
09-04-2014, 06:02 AM
mips.tv is gaolVanusPobeleVoKosata

denobis
09-04-2014, 08:33 AM
Testing site

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
mips.tv is gaolVanusPobeleVoKosata

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

jhb50
09-04-2014, 10:21 AM
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?