How to call lame executable from Android? - android

I downloaded LAME for Windows. It have two files, one is lame_enc.dll and another is lame.exe.
I want to convert an MP3 file from 320kbs to 128kbs.
In Windows I use command line: C:\Lame\lame.exe --preset cbr 128 "320.mp3" "128.mp3" - it works good. My question is how can I call lame.exe from my Android project? And what steps must I take to achieve that?
Thank you for your replies!

You can't call Windows executable files in Android, because they have different architecture.
It easy to understand, you can't run apk file on Windows if you don't have any converting or simulation softwares.
You can use extended libraries such as ffmpeg, lame to change bitrate of mp3 files. You can access this link to build shared library in Android:
http://developer.samsung.com/android/technical-docs/Porting-and-using-LAME-MP3-on-Android-with-JNI

You can't just "run lame executable from Android", because Android does not run Windows' executable files. Analogical you are not able to run MacOS applications in Windows without converting them/using emulator/etc.
I advice you to use something different than LAME for this job - I haven't used any of such, so I can't reccomend you anything right now.
EDIT
It seems that you may also easily port LAME for Android - Lame MP3 Encoder compile for Android

Related

Love2D making self-executable with no unpacking

Im create simple game, remake my old ZX-Spectrum game "m2k"
Love2D is simple engine using LUA.
What i need:
Compile Love2D -> exe files, linux binary, android apk.
Goal is pack Win32, Linux64 bit and android apk WITHOUT possiblity of just unpacking .love file and WITHOUT manual installing love2d engine.
https://pp.userapi.com/c637425/v637425257/4a8a8/QCv9Q5dz_b4.jpg
I cannot found anything useful about it. I found LoveExporter 0.2 by shake but this utilite fails compiling normal binary. It fails with error.
All manuals tell me just create .love file and send it to all. No way.
It's no good for me.
Maybe i can run this utilite. I fails with 0.2 version maybe 0.1 works
http://snake174.github.io/html/programs/love_exporter.html
Partially it works, but it requires Microsoft Windows, and android support is broken. Developer not create new versions about a year +.
I don't want to pay for windows, reboot to windows or another using unsafe OS, and requires Native full work analog.
etc
Compile Love2D -> exe files, linux binary, android apk.
The wiki already has a guide for creating executables for Windows, Linux, Mac and Android. Unless I'm misunderstanding your request, you need this.

How to add ffmpeg to my android project and use them?

I am developing an Android project/app for video compression and that's how I came to know about ffmpeg. I'm using Ubuntu 11.04 OS and Eclipse IDE(ADT-bundle).
I came across many topics dealing with ffmpeg at StackOverflow but i can't clearly figure out where I can get the ffmpeg jar file and how to add it and use in my project.
Any advice from you will be of great help.
If ffmpeg is so tough to handle for a beginner in Android like me, then is there any other way to compress a video in android?
If you're targetting Android 15 or greater version, try MediaCodec class.
May be this helps You.It's java porting of ffmpeg. Though it uses JNI internally,it provides java functions that hides the mess!!

How to embed C programs in an Android application

I'm working on a software designed to compile and run on Linux. I was recently asked to cross-compile it for Android using the NDK, which was surprisingly straightforward.
To do this quickly, we just compiled the source, without writing any JNI wrapper. I copied the resulting binaries with adb push to an emulator (rooted) and ran it from the adb shell. Everything worked fine.
Now my question is: How can I embed those binaries somehow in an android application and run them (they act like services and must run in the background) ?
I'd like to avoid changing the existing code to support a JNI interface, but writting a small JNI/C code that just exec the other binaries is fine.
Bonus question: once embedded, is there a way to know the path of the installed binaries ?
http://www.ibm.com/developerworks/opensource/tutorials/os-androidndk/index.html
i found the nice tutorial in IBM developersworks about Android NDK

Check what files are compiled during "make"

I am trying to port pulseaudio to Android. I have compiled pulse audio on Ubuntu and it works fine with my build. However, I want to do this on Android and for that I need the list of files that are compiled during "make". I have disabled a lot of optional components by passing args to configure.
Is there an easy way to find the list of files that are being compiled so that I can use them on Android and discard rest of the files.
I know the hard way to do this using a strace and look for all open calls for .c files, but that obviously is not a good option (especially when the file count is very high).
Thanks,
If you run make -Bn, you should see all the compiled files.

what is the difference between ndk-build and make APP for android?

I am having too many confusions in native coding for android. My application wants to play mms:// stream and I'm facing some serious problems in that. But the basic question is
What is the difference between ndk-build (that i usually use) and make APP (i have seen many blogs on them one of them is this)
Another related question
Suppose my project is in E:\WorkSpace\mmsTests\AnotherMMS (path edited if you want to test : it contained whitespace)
And my ndk path is D:\android-ndk-r4b-windows\android-ndk-r4b
How can i use make APP with cygwin?
My os is windows xp sp2.
EDIT : I have added ndk location in my PATH variable
Thanks in advance
The 'make APP=...' method was the original NDK build system but is now deprecated in favor of the ndk-build method.
Anything that can be built with make APP=xxx can be built with ndk-build. ndk-build requires less manual setup and hard coded paths.

Categories

Resources