5,600,725 Members 38,484 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
mohit1234
Old
(Last edited by mohit1234; 31st December 2012 at 05:50 AM.)
#1  
Recognized Contributor - OP
Thanks Meter 1101
Posts: 1,072
Join Date: Oct 2010
Location: Atlanta

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

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!

Current Devices: HTC Desire HD, Nexus 4 & Nexus 5

HTC Sense UI Modding Kitchen



Customize Sense 3.0 Lockscreen Background!! (Desire HD) / (HTC Sensation)
Customize ALL Sense Lock Rings!! (HTC Sensation) / (HTC Amaze)
Ultimate Lock Ring Tool for Sense 3.0/3.5!!

If you like my work, don't forget to hit the Thanks button
The Following 159 Users Say Thank You to mohit1234 For This Useful Post: [ Click to Expand ]
 
elliot.newnham
Old
#2  
elliot.newnham's Avatar
Senior Member
Thanks Meter 316
Posts: 689
Join Date: Mar 2011
Location: Atlanta
This does indeed work, many thanks!
Don't forget the Thanks button!
 
sparky_boi
Old
#3  
Senior Member
Thanks Meter 21
Posts: 118
Join Date: Feb 2011
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.
 
mohit1234
Old
(Last edited by mohit1234; 10th December 2012 at 06:27 AM.)
#4  
Recognized Contributor - OP
Thanks Meter 1101
Posts: 1,072
Join Date: Oct 2010
Location: Atlanta

 
DONATE TO ME
Quote:
Originally Posted by sparky_boi View Post
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.

Current Devices: HTC Desire HD, Nexus 4 & Nexus 5

HTC Sense UI Modding Kitchen



Customize Sense 3.0 Lockscreen Background!! (Desire HD) / (HTC Sensation)
Customize ALL Sense Lock Rings!! (HTC Sensation) / (HTC Amaze)
Ultimate Lock Ring Tool for Sense 3.0/3.5!!

If you like my work, don't forget to hit the Thanks button
 
tocirahl
Old
(Last edited by tocirahl; 10th December 2012 at 08:01 AM.)
#5  
Account currently disabled
Thanks Meter 22
Posts: 174
Join Date: Jun 2012
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: [ Click to Expand ]
 
mmeidl78
Old
#6  
Senior Member
Thanks Meter 137
Posts: 365
Join Date: May 2010
Location: Ulm
Quote:
Originally Posted by tocirahl View Post
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?
 
Qbancelli
Old
#7  
Qbancelli's Avatar
Senior Member
Thanks Meter 75
Posts: 262
Join Date: Feb 2012
Location: NYC
Default Something went wrong!

I tried this. Follow the instructions carefully, but when I did a restart the phone got stuck on the Android logo.
 
XupModz
Old
#8  
XupModz's Avatar
Senior Member
Thanks Meter 146
Posts: 520
Join Date: Aug 2011
Location: Atlanta
Quote:
Originally Posted by Qbancelli View Post
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
 
eRajesh
Old
#9  
Senior Member
Thanks Meter 171
Posts: 519
Join Date: Jul 2010
Location: Kolkata
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
 
lovelymobile
Old
#10  
Member
Thanks Meter 5
Posts: 42
Join Date: Nov 2008
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: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes