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

Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch

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

Sk1px 02-14-2012 01:51 PM

Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Hi!
I want to record a rtmpstream which has geo restrictions. I want to use a simple HTTP-Proxy and configure rtmpdump to use it(I don't want to use additional software). Unfortunately rtmpdump only supports Socks4. But I found a patch which adds HTTP-Proxy support for rtmpdump 2.3: http://web.archiveorange.com/archive...cEnozCqzM5eoX7
I tried that patch on linux and it seems that it works. Now I want to compile a rtmpdump-binary for windows with this patch. But I have some problems because I have not much experience with linux and compiling binaries. It would be great if someone would compile rtmpdump with http-proxy support for windows. I couldn't find anywhere a binary. I think some other people with this issue would appreciate it too. :)

svnpenn 02-14-2012 05:43 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
That patch is over a year old. I tried to hand patch the files, but I cant get it to compile, and I dont know enough C to fix it.

Code:

$ make SHARED= SYS=mingw CRYPTO=POLARSSL XLDFLAGS=-static
make[1]: Entering directory `/c/home/Steven/Desktop/test/librtmp'
gcc -Wall  -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_POLARSSL  -O2    -c -o rtmp.o rtmp.c
In file included from rtmp.c:132:0:
handshake.h: In function 'InitRC4Encryption':
handshake.h:116:16: warning: variable 'digestLen' set but not used [-Wunused-but-set-variable]
rtmp.c: In function 'HandleInvoke':
rtmp.c:2396:23: error: 'RTMP_LNK' has no member named 'hostname'
rtmp.c:2396:49: error: 'RTMP_LNK' has no member named 'hostname'
rtmp.c: In function 'RTMP_ReadPacket':
rtmp.c:3155:7: warning: variable 'didAlloc' set but not used [-Wunused-but-set-variable]
make[1]: *** [rtmp.o] Error 1
make[1]: Leaving directory `/c/home/Steven/Desktop/test/librtmp'
make: *** [librtmp/librtmp.a] Error 2

.

I put my efforts at
github.com/downloads/svnpenn/rtmpdump/rtmpdump-HTTP-proxy.7z

if you want to check it out.

Sk1px 02-15-2012 10:09 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
It seems that you used the source from RTMPdump 2.4. But I think that patch should work with an older version. Can you try to apply the patch on rtmpdump 2.3? A big thanks for your efforts :)

svnpenn 02-15-2012 10:17 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
There have been significant changes since 2.3

I am not going to do that.

KSV 02-15-2012 10:20 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
if you change the hostname to server.host on the erring line then it should compile properly.

chap 02-15-2012 10:29 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
You can put rtmpdump2.4 compiled with support for HTTP-Proxy?
thanks

Sk1px 02-15-2012 11:07 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
I found an other way: I managed to create a local Socks Proxy and to chain it with a HTTP-Proxy, works fine too

KSV 02-15-2012 11:40 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Quote:

Originally Posted by Sk1px (Post 40189)
I found an other way: I managed to create a local Socks Proxy and to chain it with a HTTP-Proxy, works fine too

you mentioned in your first post that you don't wanna use additional software otherwise i would have suggested chaining proxies earlier. anyway which software your are using currently?

svnpenn 02-15-2012 12:58 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Quote:

Originally Posted by chap
You can put rtmpdump2.4 compiled with support for HTTP-Proxy?

I created a branch at

github.com/svnpenn/rtmpdump/tree/http-proxy

It compiles, but I dont have time to upload a build right now.

Sk1px 02-15-2012 05:20 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Yes, I want still manage it without additional software otherwise I wouldn't ask. But I'm also satisfied with this way. I managed it by using Charles Webdebugging proxy. It's very userfriendly but it is not freeware. Somehow it should be also possible with 'Socks via Http' but it's more complicated.

svnpenn 02-15-2012 11:17 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
RtmpDump 2.4 448

HTTP proxy support

This is not tested so I could use some feedback if it actually works.

If I get good feedback I will merge it into the master branch.

github.com/svnpenn/rtmpdump/downloads

KSV 02-15-2012 11:26 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
i doubt that this patch gonna work properly. though i haven't tested it personally but looking at the code it seems incomplete.

Sk1px 02-16-2012 04:28 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Ok, I want to try now rtmpdump with HTTP-Proxy but I already fail at the easy part.
I want to record this stream, which works only if you have an IP from Switzerland
Code:

-v -r rtmp://cp108341.live.edgefcs.net/live/pro7_1_800@43051 --swfsize 927444 --swfhash 6c1be1765187eae0bc9af07d858fae59a0effd3c5b803d08db261ced2c5512bb -o "stream.flv"
now I want that it uses this transparent proxy 46.19.143.93:80
(The stream, proxy and the rtmpdump parameters work perfectly)
Readme says I have to use the http_proxy
environment variable
How can I do that?
BTW: Thanks svnpenn for your work. I see you invested much time for this

KSV 02-16-2012 10:43 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
in you cmd window use this cmd first:

Code:

set http_proxy=proxy:port

svnpenn 02-16-2012 11:03 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
with cmd.exe
wikipedia.org/wiki/Environment_variable#DOS.2C_OS.2F2_and_Windows_.28 Command_Prompt.29

with sh.exe or bash.exe
wikipedia.org/wiki/Environment_variable#Unexported_variables

Sk1px 02-18-2012 06:20 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
I tried like you told me but I get 'handshake failed'. Did you actually get it to work? Do I have to pay attention to something else?

enda 06-22-2012 10:41 AM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
How do I compile this under Windows?

I am using MinGW
C:\svnpenn-rtmpdump-30cf8a8>mingw32-make
The system cannot find the path specified.
mingw32-make: *** [librtmp/librtmp.a] Error 1

Then when I go into the librtmp folder and make:
C:\svnpenn-rtmpdump-30cf8a8\librtmp>mingw32-make
gcc -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL -O2 -fPIC -c -o rtmp.o
rtmp.c
rtmp.c:1:0: warning: -fPIC ignored for target (all code is position independent)
[enabled by default]
rtmp.c:40:25: fatal error: openssl/ssl.h: No such file or directory
compilation terminated.
mingw32-make: *** [rtmp.o] Error 1

svnpenn 06-22-2012 03:29 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Quote:

Originally Posted by enda
How do I compile this under Windows?

I am using MinGW

If in fact you are wanting the http-proxy branch you are going to need git.

Code:

git clone git://github.com/aajanki/rtmpdump.git
cd rtmpdump
git checkout http-proxy

Edit
In addition I would suggest switching to Cygwin. Cygwin can compile native Windows binaries just like MinGW, and has Bash 4 where MinGW is still using Bash 3.

enda 06-29-2012 01:15 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
I did the following
Code:

git clone git://github.com/aajanki/rtmpdump.git
cd rtmpdump
git checkout http-proxy

and then successfully compiled the program with

Code:

make
I set the http proxy with

Code:

set HTTP_PROXY=http://proxy:port
but when I ran the program, it did not use the HTTP_PROXY.

svnpenn 06-29-2012 01:32 PM

Re: Compile RTMPdump for Windows with HTTP-Proxy support by applying a patch


 
Quote:

Originally Posted by enda (Post 48451)
I did the following
Code:

git clone git://github.com/aajanki/rtmpdump.git
cd rtmpdump
git checkout http-proxy

and then successfully compiled the program with

Code:

make
I set the http proxy with

Code:

set HTTP_PROXY=http://proxy:port
but when I ran the program, it did not use the HTTP_PROXY.

You may have to mess with the source code. I never actually tested it; just ported it the best I could from that old commit.


All times are GMT -6. The time now is 06:00 AM.