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

Customized rtmpdump binaries with patch file

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

alexanderd 04-22-2013 02:38 PM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61778)
@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

Re: Customized rtmpdump binaries with patch file


 
Code:

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

Streaming on rtmp://0.0.0.0:1935
WARNING: Trying different position for client digest!
Processing connect
      app : 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

Re: Customized rtmpdump binaries with patch file


 
Great, that's just what needed!
Did you use the same binaries that have been uploaded to mediafire? (http://www.mediafire.com/file/5eep3w...mpdump-2.4.zip)
I used them with rtmpdumphelper. Maybe that's the cause of the problem?

KSV 04-23-2013 02:38 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by alexanderd (Post 61789)
Great, that's just what needed!
Did you use the same binaries that have been uploaded to mediafire

yeah those are the latest binaries.

Code:

rtmpsuck MD5: 6A42BD5F06958EAE05BC7480BDD06199
Quote:

Originally Posted by alexanderd (Post 61789)
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

Re: Customized rtmpdump binaries with patch file


 
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

Re: Customized rtmpdump binaries with patch file


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

Code:

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:

Code:

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

Code:

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

Re: Customized rtmpdump binaries with patch file


 
example
Code:

>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

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by chap (Post 61810)
example
Code:

>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

Re: Customized rtmpdump binaries with patch file


 
Checking if null pointer seems to solve the crash.


Code:

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

Re: Customized rtmpdump binaries with patch file


 
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...592#pid1404592


All times are GMT -6. The time now is 05:46 PM.