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

Customized rtmpdump binaries with patch file

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

RedPenguin 04-17-2013 01:35 PM

Re: Customized rtmpdump binaries with patch file


 
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

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by RedPenguin (Post 61655)
Yes that's why I edited my post before to mean rtmpdump.

replied before your edit.

Quote:

Originally Posted by RedPenguin (Post 61655)
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

Re: Customized rtmpdump binaries with patch file


 
Quote:

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

Re: Customized rtmpdump binaries with patch file


 
https://dl.dropboxusercontent.com/u/.../older-log.txt

https://dl.dropboxusercontent.com/u/.../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

Re: Customized rtmpdump binaries with patch file


 
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.

Code:

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

Re: Customized rtmpdump binaries with patch file


 
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

Re: Customized rtmpdump binaries with patch file


 
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

Re: Customized rtmpdump binaries with patch file


 
Quote:

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

Re: Customized rtmpdump binaries with patch file


 
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

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by KSV (Post 61687)
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.


All times are GMT -6. The time now is 08:04 AM.