Question

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!

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top