Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Can anyone tell me how to encode a MP3 file in Android (as you would by using lame.dll in Windows or lame.so in Linux)?

share|improve this question

2 Answers 2

You can't use the Linux or Windows versions of LAME in Android, just like you can't run the PC versions of MS Word or OpenOffice in Android. Applications are written for particular OSes and architectures, or for cross-platform frameworks like Java. (Android doesn't have a true full JVM, though.)

A quick search returned Lame4Android, an Android app you can use to encode WAVE files as MP3. It doesn't look like it can do anything else; if you need more functionality then you probably need to find or make a native port of LAME or another encoder.

share|improve this answer

From the help of lame.exe:

usage: lame [options] <infile> [outfile]

    <infile> and/or <outfile> can be "-", which means stdin/stdout.

RECOMMENDED:
    lame -V2 input.wav output.mp3

OPTIONS:
    -b bitrate      set the bitrate, default 128 kbps
    -h              higher quality, but a little slower.  Recommended.
    -f              fast mode (lower quality)
    -V n            quality setting for VBR.  default n=4
                    0=high quality,bigger files. 9=smaller files
    --preset type   type must be "medium", "standard", "extreme", "insane",
                    or a value for an average desired bitrate and depending
                    on the value specified, appropriate quality settings will
                    be used.
                    "--preset help" gives more info on these

    --priority type  sets the process priority
                     0,1 = Low priority
                     2   = normal priority
                     3,4 = High priority

    --longhelp      full list of options

    --license       print License information

Running lame.exe --longhelp has a ton more options if you need them as well.

share|improve this answer
2  
What does this have to do with Android? –  onik Sep 21 '11 at 16:43
    
@onik The original question mentions needing the parameters for Windows. The Lame parameters I've listed are the same across platforms for native binary ports. I assumed they were using it to create ringtones or some other audio files for notifications for Android. –  travis Sep 26 '11 at 16:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.