How to compile RTMPDump on your Synology NAS
RTMPDump is a tool to fetch RTMP streams.
To get it to work on your Synology NAS, some work has to be done.
Note: I tested this on my DS213+ NAS which has a PowerPC Architecture and DSM 6.0. How ever it should work similar on other architectures.
Make sure your /opt/bin folder is contained in the PATH system variable by adding the following line to your ~/.profile file:
PATH="$PATH:/opt/bin";export PATH
Using IPKG I also had to install the development files of OpenSSL (other packages might also be required):
ipkg install openssl-dev
Download RTMPDump onto your NAS:
mkdir /tmp cd /tmp wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz
extract it:
tar -xf rtmpdump-2.3.tgz
Before I could compile it, I had to bend some paths because some of the libraries in the opt folders where too old. Luckily the system already provided newer libs, so I could link to them (Note this could have some negative impact to other tools!):
cd /opt/powerpc-linux-gnuspe/lib mv libpthread-0.10.so libpthread-0.10.so.bak ln -s /lib/libpthread.so.0 libpthread-0.10.so
cd /opt/lib mv libssl.so.0.9.8 libssl.so.0.9.8.bak ln -s /lib/libssl.so.1.0.0 libssl.so.0.9.8 mv libcrypto.so.0.9.8 libcrypto.so.0.9.8.bak ln -s /lib/libcrypto.so.1.0.0 libcrypto.so.0.9.8
Now I was able to compile RTMPDump successfully:
make make[1]: Entering directory `/volume1/temp/rtmpdump-2.3/librtmp' gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o rtmp.o rtmp.c gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o log.o log.c gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o amf.o amf.c gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o hashswf.o hashswf.c gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -DUSE_OPENSSL -O2 -fPIC -c -o parseurl.o parseurl.c ar rs librtmp.a rtmp.o log.o amf.o hashswf.o parseurl.o ar: creating librtmp.a gcc -shared -Wl,-soname,librtmp.so.0 -o librtmp.so.0 rtmp.o log.o amf.o hashswf.o parseurl.o -lssl -lcrypto -lz ln -sf librtmp.so.0 librtmp.so make[1]: Leaving directory `/volume1/temp/rtmpdump-2.3/librtmp' gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -O2 -c -o rtmpdump.o rtmpdump.c rtmpdump.c: In function `OpenResumeFile': rtmpdump.c:151: warning: implicit declaration of function `ftello' rtmpdump.c:201: warning: implicit declaration of function `fseeko' gcc -Wall rtmpdump.o librtmp/librtmp.a -o rtmpdump -lssl -lcrypto -lz gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -O2 -c -o rtmpgw.o rtmpgw.c gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -O2 -c -o thread.o thread.c gcc -Wall rtmpgw.o thread.o librtmp/librtmp.a -o rtmpgw -lpthread -lssl -lcrypto -lz gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -O2 -c -o rtmpsrv.o rtmpsrv.c gcc -Wall rtmpsrv.o thread.o librtmp/librtmp.a -o rtmpsrv -lpthread -lssl -lcrypto -lz gcc -Wall -DRTMPDUMP_VERSION=\"v2.3\" -O2 -c -o rtmpsuck.o rtmpsuck.c gcc -Wall rtmpsuck.o thread.o librtmp/librtmp.a -o rtmpsuck -lpthread -lssl -lcrypto -lz
And also test it:
./rtmpdump -r rtmp://cp23910.edgefcs.net/ondemand/mp3:mpc/drs3/maloney/2013/diedichterlesung > test.flv
Finally I copied the compiled binaries into /opt/bin:
cp rtmpdump rtmpgw rtmpsrv rtmpsuck /opt/bin/
Some of the compile errors i got before I bended the paths (just for reference):
/opt/powerpc-linux-gnuspe/bin/../lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE' /opt/powerpc-linux-gnuspe/bin/../lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
/opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libpthread.so: undefined reference to `__on_exit@GLIBC_PRIVATE' /opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libpthread.so: undefined reference to `__librt_multiple_threads@GLIBC_PRIVATE' /opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libpthread.so: undefined reference to `_errno@GLIBC_2.0' /opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libpthread.so: undefined reference to `__libc_sigaction@GLIBC_PRIVATE' /opt/lib/gcc/powerpc-linux-gnuspe/3.4.6/../../../../powerpc-linux-gnuspe/lib/libpthread.so: undefined reference to `_h_errno@GLIBC_2.0'
Kommentare
How to compile RTMPDump on your Synology NAS — Keine Kommentare
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>