Rtmpdump build for AndroidSo I've been struggling for a while to get Rtmpdump to build for Android on windows.
If anyone wants to try it I've uploaded the binaries here https://github.com/S74ck3r/rtmpdump/downloads It's built from the latest code, again with no patches or additions. Don't know if it works properly as I haven't tested it yet but it does appear to load. Shared library version not working.. will look at it later but don't bother downloading that one. --Update, rename the shared library to "librtmp." (without the quotes but with the fullstop at the end that's the important bit) and it will work. I'm not responsible if it bricks your phone... Richard |
Re: Rtmpdump build for AndroidMistake on shared library naming now fixed, new binaries uploaded (see first post for link).
![]() Richard |
Re: Rtmpdump build for Androidhi richard,
i would like to know more about making rtmpdump work on android. i tried to run it via terminal emulator but it keeps telling me "permission denied" even with root access. how did you manage to make it run? does it require root? thanks |
Re: Rtmpdump build for AndroidHi dextor,
I copied the lib file to /system/lib and the application files to /system/xbin. After that you to set the application files as executable, just use adb shell, remount the file system as r/w and chmod them using 755. Alternatively get es file explorer (it's free), make sure it has root access and set the file system as writeable, find the file and view it's properties. From there you can make it executable by ticking a checkbox. hope that helps Richard |
Re: Rtmpdump build for Androidthanks so much for your answer, that definitely helps me out.
i was wondering why rtmpdump needs root access though.. do you know the reason behind this? |
Re: Rtmpdump build for AndroidI don't think it does, you just need root access to copy the files into the correct places.
It works find from a shell without requesting root access first. |
Re: Rtmpdump build for Androidyes, but the library must be placed mandatory into the system directory in order for rtmpdump to work, right?
i'm looking for a completely non-root solution: since i need to execute rtmpdump from an Android application, i don't care if the libraries are installed, my only need is to launch an instance of rtmpdump EDIT: thanks for your time :) |
Re: Rtmpdump build for Androidah sorry, I see what you mean now..
Try the other download from my github (https://github.com/downloads/S74ck3r...-rtmpdump.zip), it is a static build so doesn't need the library (just make sure the binaries are executable). If you need any testers for your app I'd be interested. |
Re: Rtmpdump build for Androidthat did the trick. i found out that executing from /sdcard/ is not possible if it is mounted just with r/ permissions. i copied your rtmpdump executable in /data/local/tmp and it totally works.
i love you, really :) once i integrate this solution on my application i will send a copy for you to test! |
Re: Rtmpdump build for AndroidWorks great. Thanks you. Does somebody figured out how to launch vlc in Android like...
rtmpdump blabla | vlc - |
Re: Rtmpdump build for Androidthis is the best I can come up with, but I'm no expert. Can't guarantee it will work as I don't have/can't get vlc on my phone but it does try and open the file once the download has started.
Basically you need to find the package and activity name of the application that you want to start (have a look here or google it http://simrandev.com/coding/launch-a...-adbterminal/). I just fired up adb logcat and started a video to find the activity. The -d parameter is the location of your rtmpdump output file. rtmpdump -r -W etc -o /sdcard/test.flv | am start -n com.cooliris.media/.MovieView -d /sdcard/test.flv The standard android movie player doesn't handle flv so I just got an error saying the file couldn't be played. |
Re: Rtmpdump build for AndroidThank you very much for your explanation. It worked but with rtmpgw. Its better for me cause it does not use temp files. I do like:
am start -a android.intent.action.VIEW -d http://127.0.0.1 -f 0x10000000 -n org.videolan.vlc.betav7neon/.gui.video.VideoPlayerActivity rtmpgw -v -r etc Only need to figure out how to start this terminal script through a widget. Thank you very much for providing the port. |
Re: Rtmpdump build for AndroidGlad you got it working and you find it useful.
|
Re: Rtmpdump build for AndroidGreat work guys! Thanks . About a year ago a thought it must pretty cool to watch streams on my galaxy s2 but i never managed to do so . I just had not much time to test it out either. A few days ago I got my nexus 7 tablet and I began to search in the internet and found this thread. Now everything is working and I can start to programm my app to watch my favourite streams. Thanks !!
S74ck3r maybe you could post the commands you used to compile rtmpdump for android on Windows. I'm very intrested in this. I guess you used cygwin win mingw compiler right? |
Re: Rtmpdump build for Androidhi flinki,
didn't use cygwin, just mingw. The build process is pretty much the same as a windows build once you've setup the android toolchain. Basically cross compile polarssl then build rtmpdump as usual using SYS=android. |
Re: Rtmpdump build for AndroidI'm currently working on my app and I'm trying to start rtmpgw or rtmpdump within the app . I placed the executables in the assets folder of my app so that i can access them and create the file :
Code:
InputStream inputStream = getAssets().open("rtmpgw"); Code:
Runtime.getRuntime().exec("/system/bin/chmod 777 "+"rtmpgw",getFilesDir()); Code:
Runtime.getRuntime().exec("./rtmpgw,getFilesDir()); I tried also to execute a shell first and then write to the Outputstream but nothing seems to work. Maybe someone can provide me java code or shell script how to start rtmpgw within a app. Ref:http://code.google.com/p/market-enab.../ShellCommands http://gimite.net/en/index.php?Run%20native%20executable%20in%20Android %20App Update : Oh man , I forgot to read the error stream .......... Now I get an Error message rtmpdump doesn't start capturing because of a ERROR: Problem accessing the DNS. (addr: live.tv-kino.net) don't know why I'm getting this. tried also other rtmp streams . But starting from adb shell works strange.... |
Re: Rtmpdump build for Androidmight be a stupid question but you have given your app the relevant permissions? (http://developer.android.com/referen...ermission.html)
|
Re: Rtmpdump build for Androidupdated build again, https://github.com/S74ck3r/rtmpdump/downloads
|
Re: Rtmpdump build for AndroidOk, the builds I made previously weren't displaying the stream properties (codecs, length etc).
The new builds (Android and Windows) do. |
Re: Rtmpdump build for AndroidNew android and windows binaries available updated to PolarSSL 1.2.0.
|
Re: Rtmpdump build for AndroidQuote:
Thanks. |
Re: Rtmpdump build for Androidno problem, new version uploaded.
|
Re: Rtmpdump build for AndroidMuch appreciated, I downloaded and noticed it was compiled for linux. I was wondering if you can cross compile it for android using
$ make CROSS_COMPILE=arm-none-linux- INC= I/my/cross/includes with the extension librtmp.so which can be used under android. A tutorial would also be great, I been trying to figure this out for days now. Thanks a lot for the updated file it was much appreciated!! |
Re: Rtmpdump build for AndroidHave you actually tried the files?
They are built with the android ndk using CC=arm-linux-androideabi |
Re: Rtmpdump build for AndroidSorry for the soft explaination, it is for XBMC and the scripts read librtmp.so - I will give it a try but I am sure it will not recognize it. I will try it out and report back.
|
Re: Rtmpdump build for AndroidHey maybe could someone compile flvstreamer for android:
http://download.savannah.gnu.org/rel...reamer/source/ Thanks in advance |
Re: Rtmpdump build for AndroidI haven't tried it out because I'm at work but this might be ok
https://github.com/downloads/S74ck3r....1c-android.7z It's built from this svn://svn.sv.gnu.org/flvstreamer. |
Re: Rtmpdump build for AndroidThanks !!
I have problems compiling it on my own... Maybe you can help me : I created an standalone toolchain for android using androidNDK toolkit. I crosscompiled polarssl using this command : make CC=arm-linux-androideabi-gcc APPS= Now i have the polarssl library . I copied it to include path of the android standalone toolchain. Then i modified the 2 makefiles of rtmpdump so that I use the arm-linux-androideabi-gcc compiler. But when i try to compile it somehow I get : $ make all SHARED= SYS=android CRYPTO=POLARSSL LIBZ="-lz -static" make[1]: Entering directory `/home/Florian/rtmpdump/librtmp' /home/Florian/arm-linux-androideabi-4.6/arm-linux-androideabi-4.6/bin/arm-linux- androideabi-gcc.exe -Wall -DRTMPDUMP_VERSION=\"v2.4\" -DUSE_POLARSSL -O2 -c -o rtmp.o rtmp.c In file included from rtmp.c:33:0: rtmp_sys.h:64:30: fatal error: polarssl/version.h: No such file or directory compilation terminated. <builtin>: recipe for target `rtmp.o' failed make[1]: *** [rtmp.o] Error 1 make[1]: Leaving directory `/home/Florian/rtmpdump/librtmp' Makefile:91: recipe for target `librtmp/librtmp.a' failed make: *** [librtmp/librtmp.a] Error 2 Seems that the compiler can't find the polarssl library... I tried to figure out where I have to copy the libpolarssl.a file but up to now I didn't managed to... |
Re: Rtmpdump build for AndroidAfter you compile polarssl run make install to copy the library and headers to the right place.
For my setup the command looks like this - make install DESTDIR=/c/tmp/android-toolchain/sysroot Then when you build rtmpdump you need to include something like; INC="-I/c/tmp/android-toolchain/sysroot/include" I'm getting round to putting together a step by step, will post it here probably on the weekend. (edit) oh and I didn't include LIBZ='-lz -static' when building for android. |
Re: Rtmpdump build for AndroidSlowly moving foward... Finally found the place where the library has to be... :arm-linux-androideabi-4.6\arm-linux-androideabi-4.6\sysroot\usr\lib
Then i had another ERROR : it seemed , that the andoroid toolchian can't find the libz library. Although it's included in the android toolchain... Finaly ! Don't know how and why but now it works. Thanks for your help! |
Re: Rtmpdump build for AndroidHowto compile Rtmpdump for Android
1) Get the Android ndk (http://developer.android.com/tools/sdk/ndk/index.html) and follow the instructions here (PATH_TO_NDK_INSTALL/../android-ndk-r7/docs/STANDALONE-TOOLCHAIN.html) to create a standalone android toolchain. 2) Download and install Mingw (http://sourceforge.net/projects/mingw/files/MinGW/). 3) Download PolarSSL source from (https://polarssl.org/download) and unzip it to your mingw/msys home directorys. For me this was C:\MinGW\msys\1.0\home\S74ck3r. Current builds are made with PolarSSL 1.2.0 If you're going to build with PolarSSL 1.2.0 you will need to download an additional header from (http://nuicode.com/projects/ccv-mult...e.h?format=raw) and copy it to your mingw/include folder because it's not included in Mingw. 4) Open Mingw shell, add the path to the standalone android toolchain binaries to the path. On my system I did this, but it will depend on where you installed the toolchain. 'export PATH=/c/tmp/android-toolchain/bin:$PATH' 5) CD to the unzipped PolarSSL directory and type; 'make CC=arm-linux-androideabi-gcc APPS=' 'make install DESTDIR=/c/tmp/android-toolchain/sysroot' (Obviously change the install destination directory if your toolchain is in a different location) 6) Get the Rtmpdump source. The following commands assume you have retrieved it from my repository (https://github.com/S74ck3r/rtmpdump.git). You can obviously get the source directly from the official repository. There is no difference in the actual code (i.e. no added patches or additional functionality) but I have added a target for android to the makefiles for convenience. 7) CD to the Rtmpdump source directory and type; -- Shared library version 'make SYS=android CROSS_COMPILE=arm-linux-androideabi- INC="-I/c/tmp/android-toolchain/sysroot/include" CRYPTO=POLARSSL' -- Static version 'make SYS=android CROSS_COMPILE=arm-linux-androideabi- INC="-I/c/tmp/android-toolchain/sysroot/include" CRYPTO=POLARSSL SHARED=' (Obviously change this if your toolchain is in a different location, make sure the include path is correct) 8) Done. |
Re: Rtmpdump build for AndroidThank you so much, loaded up my ubunt virtual box session, and voila followed orders and all good with polarssl!! One major issue where I am completely lost, the librtmp.so.0 still maintains the .0 expression when I need it for librtmp.so, any tips on how to adjust the extension.
|
Re: Rtmpdump build for AndroidMaybe you could try renaming the file yourself, or running the install
target from the makefile which installs the shared library and creates a link to it with just the .so extension. |
Re: Rtmpdump build for AndroidIf i want watch "rtmpe" channels from android phone, or android TV Box, how i can do this, and make playlist of channel with names?
If this possible? Thanks! |
Re: Rtmpdump build for AndroidSomebody please help!
|
Re: Rtmpdump build for Androidhas someone the updated librtmp.so file for android? :)
|
Re: Rtmpdump build for Android |
Re: Rtmpdump build for AndroidS74ck3r, thanks for your support in this thread.
I successfully got the rtmpgw static binary to work in my Android project. When I confirmed that the gateway is running, I try to view the video stream on the appropriate port and my video player crashes. I know the streams work in VLC, however they don't work correctly in the default VideoView OR the Vitamio Player (which is based on ffmpeg). Do you have any insight into this problem? They are twitch.tv or justin.tv streams if that helps. Also, the streams in VLC say that the video codec is h264 and audio is usually mp3. |
Re: Rtmpdump build for AndroidElBradford,
Are you saying that rtmpgw is successfully streaming out data with a http get request from inside your app, and simply not playing back in videoview? I have been trying to use vitamio as a streamer by including the rtmpgw info as part of the http get request from vitamio, with rtmpgw running on a different machine. All i am getting is 'range request not supported' errors in rtmpgw. Did you manage to circumvent this problem? Regards Dan |
Re: Rtmpdump build for AndroidMoving downloads from github to bitbucket.
Current build is now here https://bitbucket.org/S74ck3r/rtmpdu...roid/downloads |
All times are GMT -6. The time now is 08:37 AM. |