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)

j_cool 12-30-2018 06:01 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by supersonic80 (Post 96722)
The next one is the instruction I have, I only made some changes to make it work:
1. I had to remove the line 40 of rtmpdump.c, otherwise it would not compile.
2. I added -static after -lz on line 14 of Makefile to make rtmpdump "self-sufficient".

Instruction:
# Suppose the current user is IEUser (replace by your username)

# Install MinGW
https://osdn.net/projects/mingw/down...get-setup.exe/

# Run and select to install
mingw-developer-toolkit-bin
mingw32-base-bin
mingw32-gcc-g++-bin
msys-base-bin

# Download and unpack
https://www.zlib.net/zlib1211.zip
https://www.openssl.org/source/openssl-1.0.2q.tar.gz
https://github.com/sstativa/rtmpdump...ive/master.zip

# Open cmd.exe and start
c:\MinGW\msys\1.0\msys.bat

# Next should be run in msys window

# Compile openssl
cd /c/Users/IEUser/Downloads/openssl-1.0.2q
./config
make

# Compile zlib
cd /c/Users/IEUser/Downloads/zlib-1.2.11
make -f win32/Makefile.gcc

# Compile rtmdump-ksv
cd /c/Users/IEUser/Downloads/rtmpdump-ksv-master

make SYS=mingw INC="-I/c/Users/IEUser/Downloads/openssl-1.0.2q/include -I/c/Users/IEUser/Downloads/zlib-1.2.11 -L/c/Users/IEUser/Downloads/openssl-1.0.2q -L/c/Users/IEUser/Downloads/zlib-1.2.11" LDFLAGS="-L/c/Users/IEUser/Downloads/openssl-1.0.2q -L/c/Users/IEUser/Downloads/zlib-1.2.11"


I tried to compile rtmpdump and didn't work, this is how:

removed line 40 of rtmpdump.c ( #define off_t off64_t )

added -static after -lz on line 14 of Makefile ( LIBZ=-lz -static )

renamed Users/IEUser/Downloads to supersonic


STEPS TAKEN:

Code:

# Open cmd.exe and start
c:\MinGW\msys\1.0\msys.bat

# Next should be run in msys window
# Compile openssl
cd /c/supersonic/openssl-1.0.2q
./config
make

# Compile zlib
cd /c/supersonic/zlib-1.2.11
make -f win32/Makefile.gcc

# Compile rtmdump-ksv
cd /c/supersonic/rtmpdump-ksv-master
make SYS=mingw INC="-I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11" LDFLAGS="-L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11"
Reply With Quote


ERRORS:

Code:

J@PC /c/supersonic/openssl-1.0.2q
$ ./config

Configured for mingw.


J@PC /c/supersonic/openssl-1.0.2q
$ make
making all in crypto...
make[1]: Entering directory `/c/supersonic/openssl-1.0.2q/crypto'
making all in crypto/objects...
make[2]: Entering directory `/c/supersonic/openssl-1.0.2q/crypto/objects'
ar  r ../../libcrypto.a o_names.o obj_dat.o obj_lib.o obj_err.o obj_xref.o
C:\MinGW\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
make[2]: *** [lib] Error 1
make[2]: Leaving directory `/c/supersonic/openssl-1.0.2q/crypto/objects'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/c/supersonic/openssl-1.0.2q/crypto'
make: *** [build_crypto] Error 1


J@PC /c/supersonic/zlib-1.2.11
$ make -f win32/Makefile.gcc
gcc  -o minigzip_d.exe minigzip.o libz.dll.a
strip minigzip_d.exe


J@PC /c/supersonic/rtmpdump-ksv-master
$ make SYS=mingw INC="-I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q
 -L/c/supersonic/zlib-1.2.11" LDFLAGS="-L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11"
make[1]: Entering directory `/c/supersonic/rtmpdump-ksv-master/librtmp'
gcc -shared -Wl,--out-implib,librtmp.dll.a -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -o librtmp-1.dll rtmp.o log.o amf.o hashswf.o parseurl.o  -lssl -lcrypto -lz -lws2_32 -lwinmm -lgdi32
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot find -lssl
collect2.exe: error: ld returned 1 exit status
make[1]: *** [librtmp-1.dll] Error 1
make[1]: Leaving directory `/c/supersonic/rtmpdump-ksv-master/librtmp'
make: *** [librtmp/librtmp.a] Error 2


confused.com 12-31-2018 12:51 AM

Re: Customized rtmpdump binaries with patch file


 
https://github.com/jb-alvarado/media-autobuild_suite

supersonic80 01-01-2019 02:09 AM

Re: Customized rtmpdump binaries with patch file


 
https://mega.nz/#!RnZjxKLC!MPlWrKNzr...lskexHNIkmjR10

supersonic80 01-01-2019 02:39 AM

Re: Customized rtmpdump binaries with patch file


 
Quote:

Originally Posted by j_cool (Post 96740)
I tried to compile rtmpdump and didn't work, this is how:

removed line 40 of rtmpdump.c ( #define off_t off64_t )

added -static after -lz on line 14 of Makefile ( LIBZ=-lz -static )

renamed Users/IEUser/Downloads to supersonic

I believe compiling of openssl should be a bit different, try this:

Code:

# Compile openssl
cd /c/supersonic/openssl-1.0.2q
make clean
./config shared
make

Then

Code:

# Compile rtmdump-ksv
cd /c/supersonic/rtmpdump-ksv-master
make clean
make SYS=mingw INC="-I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11" LDFLAGS="-L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11"


j_cool 01-02-2019 01:12 AM

Re: Customized rtmpdump binaries with patch file


 
Here is new atempt after changes:

removed line 40 of rtmpdump.c ( #define off_t off64_t )
line 14 of Makefile ( LIBZ=-lz ) ( no change here, leave it as it is to get shared option, -static didn't work either)
renamed Users/IEUser/Downloads to supersonic

Code:

# Open cmd.exe and start
c:\MinGW\msys\1.0\msys.bat

# Next should be run in msys window
# Compile openssl
cd /c/supersonic/openssl-1.0.2q
make clean
./config shared
make

# Compile zlib
cd /c/supersonic/zlib-1.2.11
make -f win32/Makefile.gcc

# Compile rtmdump-ksv
cd /c/supersonic/rtmpdump-ksv-master
make clean
make SYS=mingw INC="-I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11" LDFLAGS="-L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11"

Code:

J@PC ~
$ cd /c/supersonic/openssl-1.0.2q

J@PC /c/supersonic/openssl-1.0.2q
$ make clean

        ( no error )

J@PC /c/supersonic/openssl-1.0.2q
$ ./config shared
Operating system: i686-whatever-mingw
Configuring for mingw

        ( removed about 300 lines, no error )

Configured for mingw.

J@PC /c/supersonic/openssl-1.0.2q
$ make
making all in crypto...
make[1]: Entering directory `/c/supersonic/openssl-1.0.2q/crypto'
/bin/perl.exe ../util/mkbuildinf.pl "gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM" "mingw" >buildinf.h
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o cryptlib.o cryptlib.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o mem.o mem.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o mem_dbg.o mem_dbg.c
mem_dbg.c: In function 'print_leak_doall_arg':
mem_dbg.c:636:15: warning: unused variable 'result' [-Wunused-variable]
    struct tm result = {0};
              ^~~~~~
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o cversion.o cversion.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o ex_data.o ex_data.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o cpt_err.o cpt_err.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o ebcdic.o ebcdic.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o uid.o uid.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o o_time.o o_time.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o o_str.o o_str.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o o_dir.o o_dir.c
In file included from LPdir_win32.c:29,
                from o_dir.c:82:
LPdir_win.c: In function 'OPENSSL_DIR_read':
LPdir_win.c:167:9: warning: 'strncpy' output may be truncated copying 255 bytes from a string of length 259 [-Wstringop-truncation]
        strncpy((*ctx)->entry_name, (const char *)(*ctx)->ctx.cFileName,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                sizeof((*ctx)->entry_name) - 1);
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

continued, more than 10000 characters long

j_cool 01-02-2019 01:14 AM

Re: Customized rtmpdump binaries with patch file


 
Code:

gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o o_fips.o o_fips.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o o_init.o o_init.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o fips_ers.o fips_ers.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  -c -o getenv.o getenv.c
/bin/perl.exe x86cpuid.pl coff -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM  > x86cpuid.s
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -c  -o x86cpuid.o x86cpuid.s
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -c -o applink.o ../ms/applink.c
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -c -o uplink.o ../ms/uplink.c
/bin/perl.exe ../ms/uplink-x86.pl coff > uplink-x86.s
gcc -I. -I.. -I../include  -D_WINDLL -DOPENSSL_USE_APPLINK -DOPENSSL_PIC -DOPENSSL_THREADS -D_MT -DDSO_WIN32 -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -c  -o uplink-x86.o uplink-x86.s
ar  r ../libcrypto.a cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o getenv.o x86cpuid.o uplink.o uplink-x86.o
C:\MinGW\bin\ar.exe: creating ../libcrypto.a
C:\MinGW\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
make[1]: *** [../libcrypto.a] Error 1
make[1]: Leaving directory `/c/supersonic/openssl-1.0.2q/crypto'
make: *** [build_crypto] Error 1


J@PC /c/supersonic/openssl-1.0.2q
$ cd /c/supersonic/zlib-1.2.11

J@PC /c/supersonic/zlib-1.2.11
$ make -f win32/Makefile.gcc
make: Nothing to be done for `all'.

J@PC /c/supersonic/zlib-1.2.11
$ cd /c/supersonic/rtmpdump-ksv-master

J@PC /c/supersonic/rtmpdump-ksv-master
$ make clean
rm -f *.o rtmpdump rtmpgw rtmpsrv rtmpsuck
make[1]: Entering directory `/c/supersonic/rtmpdump-ksv-master/librtmp'
rm -f *.o *.a *.so *.so.1 librtmp.pc
make[1]: Leaving directory `/c/supersonic/rtmpdump-ksv-master/librtmp'


J@PC /c/supersonic/rtmpdump-ksv-master
$ make SYS=mingw INC="-I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q
 -L/c/supersonic/zlib-1.2.11" LDFLAGS="-L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11"
make[1]: Entering directory `/c/supersonic/rtmpdump-ksv-master/librtmp'
gcc -Wall  -I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2 -fPIC  -c -o rtmp.o rtmp.c
rtmp.c: In function 'RTMP_ReadPacket':
rtmp.c:4300:7: warning: variable 'didAlloc' set but not used [-Wunused-but-set-variable]
  int didAlloc = FALSE;
      ^~~~~~~~
At top level:
rtmp.c:1680:35: warning: 'av_getStreamLength' defined but not used [-Wunused-const-variable=]
 #define SAVC(x) static const AVal av_##x = AVC(#x)
                                  ^~~
rtmp.c:3037:1: note: in expansion of macro 'SAVC'
 SAVC(getStreamLength);
 ^~~~
rtmp.c:1680:35: warning: 'av_onBWCheck' defined but not used [-Wunused-const-variable=]
 #define SAVC(x) static const AVal av_##x = AVC(#x)
                                  ^~~
rtmp.c:3022:1: note: in expansion of macro 'SAVC'
 SAVC(onBWCheck);
 ^~~~
rtmp.c:1680:35: warning: 'av_record' defined but not used [-Wunused-const-variable=]
 #define SAVC(x) static const AVal av_##x = AVC(#x)
                                  ^~~
rtmp.c:2029:1: note: in expansion of macro 'SAVC'
 SAVC(record);
 ^~~~
gcc -Wall  -I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2 -fPIC  -c -o log.o log.c
gcc -Wall  -I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2 -fPIC  -c -o amf.o amf.c
gcc -Wall  -I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2 -fPIC  -c -o hashswf.o hashswf.c
hashswf.c: In function 'RTMP_HashSWF':
hashswf.c:561:5: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation]
    strncpy(date, buf + 6, sizeof(date));
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Wall  -I/c/supersonic/openssl-1.0.2q/include -I/c/supersonic/zlib-1.2.11 -L/c/supersonic/openssl-1.0.2q -L/c/supersonic/zlib-1.2.11 -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_OPENSSL  -O2 -fPIC  -c -o parseurl.o parseurl.c
ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o
C:\MinGW\bin\ar.exe: creating librtmp.a
C:\MinGW\bin\ar.exe: could not create temporary file whilst writing archive: no more archived files
make[1]: *** [librtmp.a] Error 1
make[1]: Leaving directory `/c/supersonic/rtmpdump-ksv-master/librtmp'
make: *** [librtmp/librtmp.a] Error 2

J@PC /c/supersonic/rtmpdump-ksv-master
$


j_cool 01-02-2019 01:38 AM

Re: Customized rtmpdump binaries with patch file


 
Compilation worked for you, but I didn't make it following guidance in your last post.

Here is your rtmpdump:

https://mega.nz/#!RnZjxKLC!MPlWrKNzr...lskexHNIkmjR10

C:\>rtmpdump
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (--host) or url (-r "rtmp://host[:port]/playpath") containing a hostname


I renamed it to supersonic.exe, and it does work:

Code:

C:\>supersonic.exe -r "rtmp://edge54.stream.highwebmedia.com/live-edge" -a "live-edge" -f "WIN 32,0,0,101" -W "https://chaturbate.com/static/flash/CBV_2p690.swf" -p "https://chaturbate.com/elaanna/" -C S:AnonymousUser -C S:elaanna -C S:2.690 -C S:anonymous -C S:b46ea090be552f045ec0f1cfa189fc5911e7ecce7d5df0196b31cc87f6d23ff3 -C S:{"username":"__anonymous__6qJBebHQKth","org":"A","expire":1546419765,"sig":"fe80a4ffd67e94d785af8dcdc4ec4b12aa91f3183bbcb9ee7da1615af3bd7332","room":"elaanna"} --live -y "mp4:wowz://origin247.stream.highwebmedia.com/live-origin/elaanna-sd-8dbbf2ea894e94e53b8f166cd8a6ed7e95c1b9abe60189164fc9f3d8c1687790_trns_h264_480p" -o "test.flv"
RTMPDump v2.4
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
Connecting ...
INFO: Connected...
Starting Live Stream
INFO: Metadata:
INFO:  duration                0.00
INFO:  fileSize                0.00
INFO:  width                  1920.00
INFO:  height                  1080.00
INFO:  videocodecid            avc1
INFO:  videodatarate          8000.00
INFO:  framerate              30.00
INFO:  audiocodecid            mp4a
INFO:  audiodatarate          160.00
INFO:  audiosamplerate        44100.00
INFO:  audiosamplesize        16.00
INFO:  audiochannels          2.00
INFO:  stereo                  TRUE
INFO:  2.1                    FALSE
INFO:  3.1                    FALSE
INFO:  4.0                    FALSE
INFO:  4.1                    FALSE
INFO:  5.1                    FALSE
INFO:  7.1                    FALSE
INFO:  encoder                obs-output module (libobs version 22.0.3)
9485.628 kB / 15.19 sec


troller12 01-02-2019 06:49 PM

Re: Customized rtmpdump binaries with patch file


 
Hi,

I tried this to compile it successfully to make a static build.
Code:

LDFLAGS="-static -L/c/.....
Just adding -static command at the beginning.I also just did removed the command #define off_t off64_t only.At the end there is one little problem using pageurl command.So if you dont use a slash at the end (.com/) then it crashs (access violation at offset / RVA 0000ED6E).Not sure whether its the reason for removing that command from the source or not.The code at this locations looks are but diffrent compared to other rtmpdump version without having that issue.
Code:

0040ED62  .  8B78 04              MOV EDI,DWORD PTR DS:[EAX+0x4]  ;  <-- none address in [eax+4] if slash missing
0040ED65  .  89D0                  MOV EAX,EDX
0040ED67  .  89BC24 58010000      MOV DWORD PTR SS:[ESP+0x158],EDI
0040ED6E  .  F2:AE                REPNE SCAS BYTE PTR ES:[EDI]    ;  AVio

greetz

j_cool 01-03-2019 01:56 AM

Re: Customized rtmpdump binaries with patch file


 
Troller,

If you have a look at this link:

Quote:

Originally Posted by confused.com (Post 96742)

you'll read that this suite can compile ffmpeg with all latest libraries including librtmp.

I tried 32bit option on win10 and it didn't work.

64bit option worked and I choose as few options as I possibly can to see if it work at all.

It did work for 64bit option on win10, and now if somebody wants to look further
into this suite and gets ffmpeg with latest libraries + librtmp it would be
worth it to post here what options were choosen as setup time.

This suite may be tricked as well to compile custom rtmpdump by redirecting
link in script from default github link to custom link.

troller12 01-03-2019 02:15 PM

Re: Customized rtmpdump binaries with patch file


 
Hi again,

the error about pageurl I told before happens inside of strsplit function calling it with wrong paramters.In the patch.diff file you can read it here..at line 1251
Code:

+              if (strlen(pageUrl) > 7)
+                {
+                  strsplit(pageUrl + 7, FALSE, '/', &params);
+                  av_ModelName.av_val = params[1];
+                  av_ModelName.av_len = strlen(params[1]);

It does add 8 bytes (https://) to pageurl = ch..com and if no slash is used then it dosent fill / copy the location [eax+4] = access violation after that function.In other rtmpdump versions it does add 7 bytes instead of 8 and calling that function like this... /ch..com = success.The question is whether its a compiling or error!?In all older Patch.diff files I can see almost same code there same as above and the compiled rtmpdump files (not from me) are working and using 7 instead of 8.Why does it add 8 and not 7?Somehow strange.Maybe the strsplit function was changed and works else now etc.
Code:

My compiled version with MinGW
----------------------------------------------------------
$ ==>    0040ECFF    > \31D2                  XOR EDX,EDX
$+2      0040ED01    .  83CE FF              OR ESI,0xFFFFFFFF
$+5      0040ED04    .  89DF                  MOV EDI,EBX
$+7      0040ED06    .  89D0                  MOV EAX,EDX
$+9      0040ED08    .  89F1                  MOV ECX,ESI
$+B      0040ED0A    .  885424 38            MOV BYTE PTR SS:[ESP+0x38],DL
$+F      0040ED0E    .  F2:AE                REPNE SCAS BYTE PTR ES:[EDI]
$+11    0040ED10    .  89C8                  MOV EAX,ECX
$+13    0040ED12    .  F7D0                  NOT EAX
$+15    0040ED14    .  83E8 01              SUB EAX,0x1
$+18    0040ED17        83F8 08              CMP EAX,0x8                            ;  <-- 8
$+1B    0040ED1A    .  0F86 F2000000        JBE 0040EE12                         
$+21    0040ED20    .  8D8424 88000000      LEA EAX,DWORD PTR SS:[ESP+0x88]
$+28    0040ED27        83C3 08              ADD EBX,0x8                            ;  <-- 8
$+2B    0040ED2A    .  C74424 08 2F000000    MOV DWORD PTR SS:[ESP+0x8],0x2F
$+33    0040ED32    .  891C24                MOV DWORD PTR SS:[ESP],EBX
$+36    0040ED35    .  C74424 04 00000000    MOV DWORD PTR SS:[ESP+0x4],0x0
$+3E    0040ED3D    .  8D9C24 90010000      LEA EBX,DWORD PTR SS:[ESP+0x190]
$+45    0040ED44    .  894424 0C            MOV DWORD PTR SS:[ESP+0xC],EAX
$+49    0040ED48    .  E8 73BCFFFF          CALL 0040A9C0                          ;  strsplit
$+4E    0040ED4D    .  8B8424 88000000      MOV EAX,DWORD PTR SS:[ESP+0x88]
$+55    0040ED54    .  0FB65424 38          MOVZX EDX,BYTE PTR SS:[ESP+0x38]
$+5A    0040ED59    .  89F1                  MOV ECX,ESI
$+5C    0040ED5B    .  8DB424 90030000      LEA ESI,DWORD PTR SS:[ESP+0x390]
$+63    0040ED62    .  8B78 04              MOV EDI,DWORD PTR DS:[EAX+0x4]          ;  <-- none address
$+66    0040ED65    .  89D0                  MOV EAX,EDX
$+68    0040ED67    .  89BC24 58010000      MOV DWORD PTR SS:[ESP+0x158],EDI
$+6F    0040ED6E    .  F2:AE                REPNE SCAS BYTE PTR ES:[EDI]            ;  AVio


Other compiled rtmpdump
----------------------------------------------------------
$ ==>    0040EEBA    83CE FF                OR ESI,0xFFFFFFFF
$+3      0040EEBD    31D2                    XOR EDX,EDX
$+5      0040EEBF    89F1                    MOV ECX,ESI
$+7      0040EEC1    89DF                    MOV EDI,EBX
$+9      0040EEC3    89D0                    MOV EAX,EDX
$+B      0040EEC5    F2:AE                  REPNE SCAS BYTE PTR ES:[EDI]
$+D      0040EEC7    F7D1                    NOT ECX
$+F      0040EEC9    83E9 01                SUB ECX,0x1
$+12    0040EECC    83F9 07                CMP ECX,0x7                            ; <-- 7
$+15    0040EECF    0F86 ED000000          JBE 0040EFC2       
$+1B    0040EED5    8D4424 78              LEA EAX,DWORD PTR SS:[ESP+0x78]
$+1F    0040EED9    83C3 07                ADD EBX,0x7                            ; <-- 7
$+22    0040EEDC    891C24                  MOV DWORD PTR SS:[ESP],EBX
$+25    0040EEDF    8D9C24 80010000        LEA EBX,DWORD PTR SS:[ESP+0x180]
$+2C    0040EEE6    894424 0C              MOV DWORD PTR SS:[ESP+0xC],EAX
$+30    0040EEEA    C74424 08 2F000000      MOV DWORD PTR SS:[ESP+0x8],0x2F
$+38    0040EEF2    C74424 04 00000000      MOV DWORD PTR SS:[ESP+0x4],0x0
$+40    0040EEFA    895424 30              MOV DWORD PTR SS:[ESP+0x30],EDX
$+44    0040EEFE    E8 2DBCFFFF            CALL 0040AB30                          ; strsplit
$+49    0040EF03    8B4424 78              MOV EAX,DWORD PTR SS:[ESP+0x78]
$+4D    0040EF07    89F1                    MOV ECX,ESI
$+4F    0040EF09    8B5424 30              MOV EDX,DWORD PTR SS:[ESP+0x30]
$+53    0040EF0D    8DB424 80030000        LEA ESI,DWORD PTR SS:[ESP+0x380]
$+5A    0040EF14    8B78 04                MOV EDI,DWORD PTR DS:[EAX+0x4]
$+5D    0040EF17    89D0                    MOV EAX,EDX
$+5F    0040EF19    89BC24 48010000        MOV DWORD PTR SS:[ESP+0x148],EDI
$+66    0040EF20    F2:AE                  REPNE SCAS BYTE PTR ES:[EDI]

PS: About the difine issue.I tried to change it to this...
Code:

#define __off_t __off64_t
....and it seems to work without getting a error about it anymore but I am not sure of course.Found something here...
https://stackoverflow.com/questions/...e-name-off64-t

Not sure about that suite j_cool so I didnt tried it yet and I am also using MinGW very rarly to compile something and in this case I am no expert or advanced user.

greetz


All times are GMT -6. The time now is 01:36 PM.