0

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!

Lemur
  • 2,659
  • 4
  • 26
  • 41

2 Answers2

1

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

Community
  • 1
  • 1
Lemur
  • 2,659
  • 4
  • 26
  • 41
  • @fairytale47 - I edited the post. It seems that LAME will work, but as I said, you need to "convert" to for Android – Lemur Apr 13 '13 at 02:54
  • I tried FreeMp3Droid but it only convert and change bitrate of "pcm, wav" file extension to mp3 format. It cannot change to (higher/ lower) bitrate of mp3. Its core is lame library. that's all I know about it... – fairytale47 Apr 13 '13 at 04:47
  • In order to change bitrate of an MP3 the program must convert it to raw format (mostly). Convert the MP3 to WAV and the back to MP3, now with demanded bitrate – Lemur Apr 13 '13 at 04:52
1

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