FORUMS
Remove All Ads from XDA

[MOD] Increase Camera Audio/Video/Image Quality [Updated - 18th Dec 2012]

1,072 posts
Thanks Meter: 1,112
 
Post Reply Email Thread
Hey everyone!

First and Foremost, DO A NANDROID BACKUP!!!!! I am not responsible for any mistakes that you make or if anything happens to your phone.

Seeing that some users are complaining about the noise present in the video recordings, I've been able to increase the video bitrate to 20mbps.

Here's how to do it.
  • Using a file browser (like root explorer/es file explorer etc) go to the /system/etc folder
  • Make sure your system is mounted RW
  • Search for the media_profiles.xml file and open it up in any text editor
  • Once you scroll down you will see the following:

    Code:
    <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
                <Video codec="h264"
                       bitRate="12000000"
                       width="1920"
                       height="1080"
                       frameRate="30" />
                <Audio codec="aac"
                       bitRate="96000"
                       sampleRate="48000"
                       channels="1" />
            </EncoderProfile>
  • Change the bitRate from 12000000 to 20000000
  • Save, make sure permissions are rw-r--r-- and then reboot.

I have tested this and it works perfectly.




I have not messed around with anymore settings yet, will be doing so next weekend. I'm kinda busy with finals week so if you all want, you can try changing other settings and report back your findings!
Note that all the details under <CamcorderProfiles cameraId="0"> are for the rear camera and the ones under <CamcorderProfiles cameraId="1"> are for the front facing camera.

Hope this can inspire more findings and more ways to make the image and video quality better!

Update
Here are some flashable zips. I have tested them and they are working fine.

Stock
Increase 1080p video bitrate to 20mbps

I will be testing tocirahl's findings and adding flashable zips for those MODs soon.

Update 2 (18th Dec 2012)
Here is another flashable zip with the following additions:-

Both 1080p and 720p audio bitrate has been boosted to 288k (this is the max for now)
Both 1080p and 720p audio channels have been changed from 1(mono) to 2(stereo). [NOTE: I can't confirm whether this is useful as on testing, it seems like a very small increase in quality but that could be a placebo. However, I have still added it]
1080p video bitrate has been boosted to 20mbps (this is the max that is can go for now)
720p video bitrate has been boosted to 12mbps (this is the max that is can go for now)
All the above has been changed for both the regular 720p and 1080p videos and the time lapse 720p and 1080p videos.
Image Decoding Memory Cap has been doubled from 20mb to 40mb. (Image quality seems to have become slightly better)

Download Here

NOTE: All these MODs will increase the file size of the videos and images.

Thanks a lot to the following users for their findings:-
0.0
cguru
a5ehren
IAmAN00bie
terr


If this is in the wrong section, please could one of the MODs move it? Thanks and sorry for the inconvenience!
The Following 165 Users Say Thank You to mohit1234 For This Useful Post: [ View ] Gift mohit1234 Ad-Free
 
 
10th December 2012, 06:13 AM |#2  
elliot.newnham's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 317
 
More
This does indeed work, many thanks!
10th December 2012, 06:32 AM |#3  
Senior Member
Thanks Meter: 21
 
More
Quote:

<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="12000000"
width="1920"
height="1080"
frameRate="30" />
<Audio codec="aac"
bitRate="96000"
sampleRate="48000"
channels="1" />
</EncoderProfile>

What about changing bitRate under audio to something like 320000? Would that make it 320kbs and improve audio?
How about changing channels from 1 to 2 (I assume 2 channels means stereo?)

Also, you picked 20Mbps bitrate for video... can we go higher than this, or is this the limit?

Thanks.
10th December 2012, 07:22 AM |#4  
OP Senior Member
Flag Seattle
Thanks Meter: 1,112
 
Donate to Me
More
Quote:
Originally Posted by sparky_boi

What about changing bitRate under audio to something like 320000? Would that make it 320kbs and improve audio?
How about changing channels from 1 to 2 (I assume 2 channels means stereo?)

Also, you picked 20Mbps bitrate for video... can we go higher than this, or is this the limit?

Thanks.

I haven't tried any of those yet. I have my finals this week, so I'll be testing all possible options on the weekend and updating the OP accordingly.
However, technically they should work, but can't say for sure.
For the video bitrate, I remember the Sensation could go upto 40mbps, so I guess we could try increasing it and seeing how far it could go..

Just thought I'll put this out so that others can play around with the numbers and find ways to make the camera better.
10th December 2012, 08:28 AM |#5  
Account currently disabled
Thanks Meter: 24
 
More
If you look at the bottom of the file, it looks like the maximum audio rate you can get is 288000

Changing Channels to 2 seems to do nothing, but I can confirm that the audio goes up to 284k (288000)

Best I can tell, any number above 20000000 breaks Gallery.

Also, this might be placebo effect, but I definitely feel like I'm getting better quality images by changing the three <ImageEncoding quality="" /> lines to 100, 95, 80 and changing memCap to 40000000 (doubling it)

EDIT: There seems to be a very small increase in quality from changing the ImageEncoding lines, especially in HDR mode. I'll see if I can get some outdoor shots later.
The Following User Says Thank You to tocirahl For This Useful Post: [ View ] Gift tocirahl Ad-Free
10th December 2012, 09:41 AM |#6  
Senior Member
Flag Ulm
Thanks Meter: 169
 
More
Quote:
Originally Posted by tocirahl

If you look at the bottom of the file, it looks like the maximum audio rate you can get is 288000

Changing Channels to 2 seems to do nothing, but I can confirm that the audio goes up to 284k (288000)

Best I can tell, any number above 20000000 breaks Gallery.

Also, this might be placebo effect, but I definitely feel like I'm getting better quality images by changing the three <ImageEncoding quality="" /> lines to 100, 95, 80 and changing memCap to 40000000 (doubling it)

EDIT: There seems to be a very small increase in quality from changing the ImageEncoding lines, especially in HDR mode. I'll see if I can get some outdoor shots later.

Could you make a flashable ZIP with the working maximum? I've changed the values and after a reboot I've got a bootloop. Maybe it works with a flashable ZIP?
10th December 2012, 02:54 PM |#7  
Qbancelli's Avatar
Senior Member
Flag NYC
Thanks Meter: 91
 
More
Something went wrong!
I tried this. Follow the instructions carefully, but when I did a restart the phone got stuck on the Android logo.
10th December 2012, 03:18 PM |#8  
XupModz's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 147
 
More
Quote:
Originally Posted by Qbancelli

I tried this. Follow the instructions carefully, but when I did a restart the phone got stuck on the Android logo.

Did you backup? And if not you need to flash another rom

Sent from my Nexus 4 using xda app-developers app
10th December 2012, 03:58 PM |#9  
Senior Member
Flag Kolkata
Thanks Meter: 201
 
More
Haha! I actually did the same thing on my Nexus 4 today. This media_profiles.xml mod is very common. The GNexus also had it.

The first thing I did after rooting my N4 was to edit the media_profiles.xml file
10th December 2012, 04:56 PM |#10  
Member
Thanks Meter: 8
 
More
Hi, I wanted to know if using this method it is possible to increase from 30 to 60 fps for 720p resolution.
thanks
greetings
Simone
The Following User Says Thank You to lovelymobile For This Useful Post: [ View ] Gift lovelymobile Ad-Free
10th December 2012, 07:28 PM |#11  
exadeci's Avatar
Senior Member
Flag Sydney
Thanks Meter: 218
 
More
Quote:
Originally Posted by lovelymobile

Hi, I wanted to know if using this method it is possible to increase from 30 to 60 fps for 720p resolution.
thanks
greetings
Simone

I tried but it just crashes the camera interface
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes