[Galaxy S I9000 Themes and Apps] rafalense:
No concrete info at all anywhere I guess

Here I show how I do it, but you should know after modifications, audi and video are out-of-sync

Firstly get a copy of you 'camera.apk', obviously (system/ folder)

Now, decompile

A nice tool I use is dex2jar: http://code.google.com/p/dex2jar/

With it you get .class files

You can open them with JD-GUI: http://java.decompiler.free.fr/?q=jdgui

"MediaRecorderProfile.class" has the power

**************************************

package com.sec.android.app.camera;

public class MediaRecorderProfile

{

private static final int PROFILE_1280_720 = 0;

private static final int PROFILE_176_144 = 4;

private static final int PROFILE_320_240 = 3;

private static final int PROFILE_640_480 = 2;

private static final int PROFILE_720_480 = 1;

private static final int PROFILE_MMS = 5;

private static final int PROPERTY_AUDIO_BITRATE = 7;

private static final int PROPERTY_AUDIO_ENCORDER = 6;

private static final int PROPERTY_AUDIO_NUM_CHANNELS = 8;

private static final int PROPERTY_AUDIO_SAMPLINGRATE = 9;

private static final int PROPERTY_VIDEO_BITRATE_FINE = 2;

private static final int PROPERTY_VIDEO_BITRATE_NORMAL = 3;

private static final int PROPERTY_VIDEO_BITRATE_SUPERFINE = 1;

private static final int PROPERTY_VIDEO_ENCORDER = 0;

private static final int PROPERTY_VIDEO_FRAME_RATE = 4;

private static final int PROPERTY_VIDEO_OUTPUT_FORMAT = 5;

private static final String TAG = "MediaRecorderProfile";

public final int mAudioBitrate;

public final int mAudioChannels;

public final int mAudioEncoder;

public final int mAudioSamplingRate;

public final int mOutputFormat;

private int[][] mProfileTable;

public final int mVideoBitrate;

public final int mVideoEncoder;

public final int mVideoFps;

public final int mVideoHeight;

public final int mVideoWidth;

public MediaRecorderProfile(AbstractCameraActivity paramAbstractCameraActivity, int paramInt)

{

int[] arrayOfInt1 = new int[6];

int[] arrayOfInt2 = { 2, 12000000, 10000000, 8000000, 30, 2, 3, 62900, 1, 16000 };

arrayOfInt1[0] = arrayOfInt2;

int[] arrayOfInt3 = { 2, 3449000, 2834000, 2298000, 30, 2, 3, 62900, 1, 16000 };

arrayOfInt1[1] = arrayOfInt3;

int[] arrayOfInt4 = { 2, 3078000, 2553000, 2019000, 30, 2, 3, 62900, 1, 16000 };

arrayOfInt1[2] = arrayOfInt4;

int[] arrayOfInt5 = { 2, 767000, 641000, 518000, 30, 2, 3, 62900, 1, 16000 };

arrayOfInt1[3] = arrayOfInt5;

int[] arrayOfInt6 = { 2, 161000, 154000, 134000, 30, 2, 3, 62900, 1, 16000 };

arrayOfInt1[4] = arrayOfInt6;

int[] arrayOfInt7 = { 1, 96100, 96100, 96100, 15, 1, 1, 12200, 1, 8000 };

arrayOfInt1[5] = arrayOfInt7;

this.mProfileTable = arrayOfInt1;

int i = 1;

int j = paramAbstractCameraActivity.getCameraSettings().ge tCamcorderResolution();

int k = 3;

switch (j)

{

case 8:

case 11:

default:

if (paramAbstractCameraActivity.getCameraSettings().g etRecordingMode() == 1)

{

i = 5;

j = 13;

}

switch (paramInt)

{

default:

case 0:

case 1:

case 2:

}

case 9:

case 10:

case 7:

case 12:

case 13:

}

while (true)

{

int m = this.mProfileTable[0];

this.mVideoEncoder = m;

int n = this.mProfileTable[k];

this.mVideoBitrate = n;

int i1 = this.mProfileTable[4];

this.mVideoFps = i1;

int i2 = this.mProfileTable[5];

this.mOutputFormat = i2;

int i3 = CameraResolution.getIntWidth(j);

this.mVideoWidth = i3;

int i4 = CameraResolution.getIntHeight(j);

this.mVideoHeight = i4;

int i5 = this.mProfileTable[6];

this.mAudioEncoder = i5;

int i6 = this.mProfileTable[7];

this.mAudioBitrate = i6;

int i7 = this.mProfileTable[8];

this.mAudioChannels = i7;

int i8 = this.mProfileTable[9];

this.mAudioSamplingRate = i8;

return;

i = 0;

break;

i = 1;

break;

i = 2;

break;

i = 3;

break;

i = 4;

break;

k = 1;

continue;

k = 2;

continue;

k = 3;

}

}

}

********************************************

16000Hz Samplerate

62900bps Bitrate

But, I'm not able to directly edit those .class files

So, I get .smali files decompiling with apk manager, and then I edit there

.smali files are less understandable than .class

On 'MediaRecorderProfile.smali', at the end you will find these tables:

.array-data 0x4

0x2t 0x0t 0x0t 0x0t //VIDEO_ENCORDER

0x0t 0x1bt 0xb7t 0x0t //BITRATE_SUPERFINE

0x80t 0x96t 0x98t 0x0t //BITRATE_FINE

0x0t 0x12t 0x7at 0x0t //BITRATE_NORMAL

0x1et 0x0t 0x0t 0x0t //VIDEO_FRAME_RATE

0x2t 0x0t 0x0t 0x0t //VIDEO_OUTPUT_FORMAT

0x3t 0x0t 0x0t 0x0t //AUDIO_ENCORDER

0xb4t 0xf5t 0x0t 0x0t //AUDIO_BITRATE

0x1t 0x0t 0x0t 0x0t //AUDIO_NUM_CHANNELS

0x80t 0x3et 0x0t 0x0t //AUDIO_SAMPLINGRATE

.end array-data

This one is equivalent to this one on 'MediaRecorderProfile.class':

arrayOfInt2 = { 2, 12000000, 10000000, 8000000, 30, 2, 3, 62900, 1, 16000 };

Blue: Sample rate [Hz]

Green: Bitrate [bps]

This first table is profile for 1280x720, recording at 16000Hz 62900Kbps

So, if you want to record at , lets say, 32000Hz 128000bps, now we work on hexadecimal, but in little-endian format (http://en.wiktionary.org/wiki/little-endian)

before: 16000 -> 00003E80h -> 0x00 0x00 0x3E 0x80 -> 0x80t 0x3Et 0x0t 0x0t

Now: 32000 -> 00007D00h -> 0x00 0x00 0x7D 0x00 -> 0x0t 0x7Dt 0x0t 0x0t

before: 62900 -> 0000F5B4 -> 0x00 0x00 0xF5 0xB4 -> 0xB4t 0xF5t 0x0t 0x0t

Now: 128000 -> 0001F400 -> 0x00 0x01 0xF4 0x00 -> 0x0t 0xF4t 0x1t 0x0t

Final result:

.array-data 0x4

0x2t 0x0t 0x0t 0x0t

0x0t 0x1bt 0xb7t 0x0t

0x80t 0x96t 0x98t 0x0t

0x0t 0x12t 0x7at 0x0t

0x1et 0x0t 0x0t 0x0t

0x2t 0x0t 0x0t 0x0t

0x3t 0x0t 0x0t 0x0t

0x0t 0xF4t 0x1t 0x0t

0x1t 0x0t 0x0t 0x0t

0x0t 0x7Dt 0x0t 0x0t

.end array-data

Recompile and test

Voilà! ;)