yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] mohit1234:
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.
[Nexus 4 Android Development] 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.
[Nexus 4 Android Development] mmeidl78:
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?
[Nexus 4 Android Development] Qbancelli:
Something went wrong!

I tried this. Follow the instructions carefully, but when I did a restart the phone got stuck on the Android logo.:(
[Nexus 4 Android Development] XupModz:
Did you backup? And if not you need to flash another rom
[Nexus 4 Android Development] eRajesh:
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
[Nexus 4 Android Development] 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
[Nexus 4 Android Development] exadeci:
I tried but it just crashes the camera interface
[Nexus 4 Android Development] Audioboxer:
Editing myself resulted in a lot of weird issues, no bootloop, but I lost the ability to choose camera resolution settings (720p/1080p), and it FC on change to front camera.

Will await someone with more skill to release some user friendly mods for the camera.
[Nexus 4 Android Development] mohit1234:
No problem!

Awesome! I'll try these out before making a flashable zip for them.

Thanks for the info! :good:

Added a flashable zip in the OP.

Not sure why you are getting a bootloop. Did you set the permissions to rw-r--r--?

Haha yeah its quite common. I had it in the Desire HD and Sensation threads as well! :D

I'm not having any weird issues. I never released any MOD without making sure that its working as intended.

I've added a flashable zip in the OP. Try that.

Added one for going back to the stock settings as well, just in case users are having issues.

Will be adding more MODs as and when I get time to test them fully.
[Nexus 4 Android Development] hatyrei:
Hi Mr. Developer :),

Do I need to edit xml iles after i flashed that one? thanks.
[Nexus 4 Android Development] mohit1234:
Nope, no need to edit any files! :)
[Nexus 4 Android Development] blinde:
Maybe future releases include possibility to record stereo instead of mono...
[Nexus 4 Android Development] Qbancelli:
No, I don't think I did.

I'm going to try flashing it now.
[Nexus 4 Android Development] fresh_TD:
Trust me You would know if you set permissions or not..

Sent from my Nexus 4
[Nexus 4 Android Development] enyceckk:
At least give me the credits for finding this out....

http://xdaforums.com/showthread.php?t=2038651

nice work btw :good:
[Nexus 4 Android Development] DforDesign:
If I see someone telling "give me credit for..." he can be sure I wont do this.

Media profile xml editing is well known and I did this in several phones. Nothing spectacular...
[Nexus 4 Android Development] defiftyae:
I did the mods manually on the stock jb and have no problems.
[Nexus 4 Android Development] alejandroo80:
Camera Samples before and after MOD.v2 !!!!

:good:Hi mohit1234 and everyone, first, thanks for the work done here in this MOD.

I´m running stock ROM 4.2.1, rooted. And as a lot of you asked for the comparison shots and videos that's what I did, every picture and video taken was made on a tripod (the steadiest way that I could), I put as much items that I can in front of the camera, and with various colors so somebody can analyze the quality (I'm not an expert on it), for the video I also put a clock on the scene as dagles want it. That's all for now and I hope this will help.:good:

Pictures:

First, I took 2 pictures full auto without flash, and the other 2 full auto with flash (both without the MOD).

Second, same thing as above but with the MOD.v2.

Videos:

(will be in youtube, the links at bottom)

First, 2 videos in 720p and 2 more in 1080p with and without flash (both without the MOD).

Second, same as above but after flashing MOD.v2.

Original 720p w/o flash

http://youtu.be/wkB5E4PW-94

Original 720p w flash

http://youtu.be/pdF9Ve5OGTY

Original 1080p w/o flash

http://youtu.be/OL0yKahfKxM

Original 1080p w flash

http://youtu.be/zfdQc5sYdgQ

MOD.v2 720p w/o flash

http://youtu.be/t0zyYAqxB-Q

MOD.v2 720p w flash

http://youtu.be/zCjJ4QaMPbo

MOD.v2 1080p w/o flash

http://youtu.be/7eF_iEkAB14

MOD.v2 1080p w flash

http://youtu.be/ABQJk0lWS44

Ok, If someone needs the original video files, just let me know and I'll upload them to some server. Best regards to everybody and I'm glad to help on this !!!!!:good:

PS: I found another thread that talks about something similar (is for the Sprint LG Optimus G), some people talk about using PIMP my ROM, or Sensor Camera app, if you guys can also take a look at it, maybe there's something helpful for our nexus4 (it's almost the same hardware), here's the link to the thread: http://xdaforums.com/showthread.php?t=2065799, (sorry for the english, is not my native language).

Bye bye from CHILE, Southamerica with love and dedication to XDA Nexus 4 Yeahhhhhh !!!!!!
[Nexus 4 Android Development] Gibsonflyingv:
I'm no expert at comparing this kind of thing, but the only difference I notice is that the picture on the wall in the background is more visible (colorful) in the unmodded pictures/movies. The colors on close objects might be a minute amount better in the modded video... but I can't tell for sure.

Anyone else see the same thing?
[Nexus 4 Android Development] daglesj:
I have to admit looking at the before and after clips and checking the labels on the boxes etc. switching back and forth full screen using Pause.

I really can't see any/much difference between the two. If it's there it's really subtle.

It just looks like fairly poor to average 720p/1080p video performance either way. Most puzzling.

Are you seeing a sizeable difference in the data size of the modded video files?

However, thanks for taking the time to present some usable shots to compare. Really useful!:good:
[Nexus 4 Android Development] abse:
Another one: http://www.youtube.com/watch?v=XKSgccWoP3Q
[Nexus 4 Android Development] alejandroo80:
Yes there's a difference in picture size and video size, this is the breakdown:

Pictures:

original w/o flash = 1,90 MB for both.

original w flash = 2,04 & 2,05 MB

mod w/o flash = 3,22 & 3,11 MB

mod w flash = 3,61 & 3,66 MB

Videos:

original 720p w/o flash = 5,12 MB

mod 720p w/o flash = 7,15 MB

original 720p w flash = 4,71 MB

mod 720p w flash = 7,92 MB

original 1080p w/o flash = 7,47 MB

mod 1080p w/o flash = 12,5 MB

original 1080p w flash = 9,36 MB

mod 1080p w flash = 13,6 MB

I don't know if there's a real difference in size or it's just the variation between the time that took the camera to stop recording (I pushed the stop button on the 5th second in all of the videos, but maybe the real recording time is not equivalent for all, like 5,02sec, 5,78sec, etc), if anyone can check on that would be great. I also checked the properties of the files on windows and with the MOD it shows the modified bitrates for both resolutions and 2 channels in audio.
[Nexus 4 Android Development] Drzfr3shboialex:
So the stock is for stock roms? Let's say me just rooting the phone and not changing Roms, will it work?
[Nexus 4 Android Development] kyokeun1234:
This will work on stock rom. I have stock room right now and works flawlessly
[Nexus 4 Android Development] Gibsonflyingv:
If you made that vid, would you mind doing the same thing without the mod? I just want to see if there is less ghosting (from motion) with the mod
[Nexus 4 Android Development] gd6noob:
I cant for the life of me see any difference..

for anyone who wants to see them side by side.. youtubedoubler.com is awesome..

1080p video. Left is without MOD, right is with MOD
[Nexus 4 Android Development] daglesj:
Just makes me wonder if the limitation with the Nexus camera is something else rather than the data rates.

Perhaps its just a crappy sensor.:eek:
[Nexus 4 Android Development] chenthechen:
I don't think there is a visible difference between the bitrates, obviously there are some changes mathematically but I don't think its not a level where it's easy to notice visually. Also, it seems like it's not even recording at 30FPS 1080p. Putting it into After Effects and it shows as 25fps for the composition (no I did not change the settings). Hmm. On an off topic note.. the camera manages to pick up my mouse's optical laser where my eyes can't that was pretty cool lol
[Nexus 4 Android Development] alanwyl:
Off topic: try your TV remote control when a button is pressed.

Didn't notice as much difference with the new mod.

But definitely a better colour saturation.
[Nexus 4 Android Development] wbbigdave:
you should try and get a shot of something moving, like take a 30 second video of cars going past.
[Nexus 4 Android Development] neo6776:
Is the sound noticeably different with this mod?

Just looking at 1080p videos online the sound is absolutely awful!
[Nexus 4 Android Development] knoxie:
The camera on my 3 year old HTC wildfire produces better pictures than the cam on my Nexus 4, still lovethe phone but the camera is utter rubbish
[Nexus 4 Android Development] Drzfr3shboialex:
I think the camera is awesome, but its Google's camera software that sucks. I had a my touch 4G slide that took beautiful pictures, but when I flashed an aosp based ROM the camera was pretty bad because HTC made sine great camera modifications.
[Nexus 4 Android Development] Ƶero:
i tried it out and made 2 Videos with both 10 seconds in length, (same objects).

first with bitRate="12000000" and then

width bitRate="20000000" as said. (I also tried out change Channels to 2).

What i seen so far is:

The File size of 1 Video is more than 50% bigger than the other.

But there isnt a single increase in Quality.

I Compared both Videos with Zoom and there isn't a single increase in Quality.

Also the Channels still say Mono (Channel: 1) even as i changed it to 2.

In my Opinion the Mod (Works) the File size is getting bigger.

But i think you won't get more Quality in your Videos.

But the Camera Quality is both better Photo and in Video than my Samsung Galaxy Nexus (Even if Photo's are only slightly better in Quality...)
[Nexus 4 Android Development] iiDeadSeriousii:
If I didn't do a Nandroid backup how do I get the default settings back? Can someone post the default values or possibly a flashable zip? Or will I be OK if I just flash my latest nightly tonight and wipe everything out? For some reason my gallery isn't working even after wiping dalvik and rebooting.
[Nexus 4 Android Development] Ƶero:
i think http://xdaforums.com/showthread.php?t=2087306

he has a flashable zip that can undo it.

But if you want i can post the file too
[Nexus 4 Android Development] mohit1234:
Flash the zip I have linked in the OP (the one under update 2). That one has the mod for changing channels to 2. But yeah eventhough its written 2, it doesn't seem like that.

There's a link for going back to stock under the first update in the OP.
[Nexus 4 Android Development] iFalcon:
The link for #2 isnt working. Can the op look into that please?
[Nexus 4 Android Development] iiDeadSeriousii:
I tried flashing the stock settings, and even though I see that the settings are indeed back to normal I still get a FC on my camera. I'll just wait until I flash my next nightly and hopefully it just fixes itself.
[Nexus 4 Android Development] mohit1234:
Its working fine from my end. Try again.

Try wiping cache and dalvik. That might help.
[Nexus 4 Android Development] matiu:
someone has tested on xenon 2.0 rom?
[Nexus 4 Android Development] daglesj:
Shame. Looks like this is going to get filed under "seemed a good idea at the time!" :(

Double the data but zero boost in quality.

Anyone know any digital video specialists that could hazard a guess at what's going on?
[Nexus 4 Android Development] Ƶero:
i think that is really hard to understand because for that you need to know how H.264 does work and how the pixels that come from the camera are used to make the mp4 video. Changing bitrate doesn't really mean to boost the quality up.

I can't explain it because i don't know either smth about H.264 and mp4 but what i know is that you need a few things to calculate the bitrate

http://www.dr-lex.be/info-stuff/videocalc.html

There you can enter Dimensions: 1920x1080 and Frame 30 + Seconds on top : 1 then press mp4 or H.264 and it calculates the bitrate.

You also can press H.264 but what you get is never bitrate over 13.
[Nexus 4 Android Development] 0.0:
So what I have been reading lately in this thread is this is a bust? It doesn't actually work?

Sent from my Nexus 4
[Nexus 4 Android Development] daglesj:
Yeah could well be that there is a limiting factor in the camera somewhere before the encoding takes place. Maybe we need to break down the chain of events of video capture on the N4 and analyse each part to see if improvements can be made.

Maybe it has sharpness/edge enhancement/de-blocking/mosquito factors buried somewhere?
[Nexus 4 Android Development] tom619:
So does this actually improve camera quality cause ATM the camera I find isn't isn't very good at all.
[Nexus 4 Android Development] daglesj:
So is this mod done and mythbusted?

The increased bit rate does nothing to improve the video quality?
[Nexus 4 Android Development] AppReviewBros:
Yeah, the difference in file size is huge yet the image quality does not change.
[Nexus 4 Android Development] Crisisx1:
So don't flash it?
[Nexus 4 Android Development] daglesj:
I reckon the quality issues are nothing to do with bitrates on the Nexus 4. I reckon the Sony sourced camera has other features such as noise reduction, deblocking etc. all hardcoded into it out of the box and it's these that need adjusting, not the bitrate so much.

If the other features could be reduced then upping the bitrate another 2Mbps or so might make a difference.
[Nexus 4 Android Development] MrPhilo:
Everything is down to software. The iPhone 5 for example, it uses the same camera module as many of other android phone (S3, HTC One X), yet it provides a better quality.
[Nexus 4 Android Development] AppReviewBros:
Agreed. The software needs to be improved.

The question is, can it be done?
[Nexus 4 Android Development] KCRic:
Yes, its been done before. Done it myself. Things are well, different once you decompile so its just a matter of figuring out were everything is at and what will work.
[Nexus 4 Android Development] sargate:
So this zip does not work? it works? for 4.2.2?

Can you post apk/files/tutorial for improving image quality?

Thanks
[Nexus 4 Android Development] m3nster:
So what do you guys and galls think what's the best android camera software currently out there?
[Nexus 4 Android Development] Orion575:
Hopefully Google will make a better camera software in the next version of android
[Nexus 4 Android Development] KCRic:
That's a great question. One that I honestly can't answer but from the looks of things this does the same thing it did in GB and ICS - that is, absolutely nothing. Editing an XML is great for some things but this is a coding issue.

In older versions there was a .smali file with an array of values. Editing those would allow you to adjust every aspect of the camera. Yes, the quality of video would go up (past 24Mbps didn't do much, but stock was like 14 on the SGSII) also, audio quality went up. Stock even for us is 96KHz... that's just sad. What's worse is that most Android phones can handle up to 320KHz.

Now, I've decompiled the gallery apk which is where our camera is located. I also made a jar file so its easier to read. If you've ever looked at a smali file you'll understand why. However, I can't seem to locate anything that handles the cameras encoding parameters. I need to get on an IRC or send some PM's because I'm sure someone knows what's going on. I hope its not all handled by the hardware.
[Nexus 4 Android Development] Shaky156:
Framerates handled by hardware lol
[Nexus 4 Android Development] Shaky156:
Had a couple of seconds

Test this kernel zImage if you dont know how to flash a zImage I recommend for you to NOT TOUCH this

test for fps, and video quality its modified

http://d-h.st/Kz5
[Nexus 4 Android Development] KCRic:
Hmm... Not sure if you're serious or something else.
[Nexus 4 Android Development] Shaky156:
kernel I released needs a little more modified but outputs this

OMXCodec: [OMX.qcom.video.decoder.avc] AVC profile = 100 (High), level = 51, success?

EDIT: boot.img for flashing via fastboot flash boot boot.img

http://d-h.st/MCb enjoy!
[Nexus 4 Android Development] Shaky156:
http://xdaforums.com/showthread.php?t=2158124
[Nexus 4 Android Development] AdamUpNorth:
Going to try this weekend. Really excited about this if it works. Always looking for increased video or photo quality.
[Nexus 4 Android Development] Mr_Comple:
i would like to try it...is there any main zip that includes all the mods....?
[Nexus 4 Android Development] alessa:
Good afternoon. mod to work there beneath 4.2.2, and the diference is worth the effort? thank you.
[Nexus 4 Android Development] :
Hi,

All is in the OP :rolleyes: :

Hi,

Hum, a little. I think we can wait for that, maybe it will be worth than the actual mod:

Nexus 4 camera recording(AVC high profile & LEVEL 4 achieved!) (60FPS tests)

:)
[Nexus 4 Android Development] simondva:
Sorry if this is a silly question, but now that I've flashed the MOD, how can I check that I'm now recording 1080p at 20mbps, 720p at 12mbps, or if my new pictures are actually better from the stock ones?
[Nexus 4 Android Development] sargate:
What this kernel does? what is the difference with the stock one?
[Nexus 4 Android Development] mohit1234:
In Windows, right click on the file and go to the details tab. There you will be able to see the bitrates.

If you wanna see if its actually better, then take a video/image of the same thing before and after the mod and see for yourself.

Check the thread for the kernel mod for more information.
[Nexus 4 Android Development] daglesj:
On a side note I installed the LG Camera application that allows on the fly bitrate adjustment for video/pics and audio.

With the video there was noticeable degradation as I cranked the bitrate down. The video looked better as I cranked it back up but the difference between the 12Mbps to 20Mbps settings was harder to tell.

The file sizes and Windows reported the clips as the bitrates and settings set.

I still think the prize is to tweak the image processor for better quality not the bitrates. I feel the Nexus 4's camera was just put together and installed totally stock with zero tweaking.
[Nexus 4 Android Development] AppReviewBros:
Agreed, I an pretty sure the camera can be tweaked somehow.
[Nexus 4 Android Development] hp420:
If I'm not mistaken, isn't our camera in the same series as the Optimus G's? Yes, theirs is 12mp and ours is 8mp, but isn't that the only difference? Their camera must be tweaked to the gills if so, because the difference in image quality with pics taken with each camera can't possibly just be the megapixels. It's as if they are totally different because it's soooo much better!!
[Nexus 4 Android Development] Ace42:
Nexus and iPhone 5 have same camera... The difference is that Apple has great camera software engineers and Google? Not so much.
[Nexus 4 Android Development] daglesj:
Yeah I have to say the only aspect of my Nexus 4 that gives any embarrassment is the camera. The pics don't look much better than what you would get from an old $100 phone from 5 years ago.
[Nexus 4 Android Development] hardnrg:
update 2 not working for me

I'm not sure if I am missing something but I flashed the update 2 zip, and the video mode of the camera seems stuck in very low resolution (the image is blurry/blocky) and there is no longer any resolution options in the video menu...

Tried wiping cache and dalvik cache and the same low-res / no resolution options issues persist.

Trying the 20Mbps 1080p mod now... if that doesn't work, I'll try the stock mod and editing file

AOKP MR1 build 2

Edit: with 20Mbps 1080p the low resolution issue happened again, I tried flipping to the front camera and this results in a Gallery FC. Flashed with stock mod and I just get a Gallery FC when opening the camera.

Clearing the Gallery data allows the camera app to run, but the low-resolution video issue remains, and switching to front camera results in FC again.

Pretty annoyed with myself for not making a backup before trying this mod...
[Nexus 4 Android Development] daglesj:
Yeah the secret doesn't appear to be in the bitrates.
[Nexus 4 Android Development] mohit1234:
Do a dirty flash of your ROM. That should get it back to stock.
[Nexus 4 Android Development] hardnrg:
heh, I'll try that next time... I saw AOKP JB-MR1 Build 5 was released recently and new gapps, so did a clean flash this time
[Nexus 4 Android Development] the1dynasty:
thanks... doing this now!!
[Nexus 4 Android Development] imeem:
does anybody have b4 and after images when taking pictures and/or videos?
[Nexus 4 Android Development] Connor Baker:
Is it weird that I'm still using this? :D

Connor Baker
[Nexus 4 Android Development] 0.0:
I thought this didn't work?

Sent from my Nexus 4
[Nexus 4 Android Development] Connor Baker:
I'm not gonna say no to a placebo...

Hey! That rhymes!

Connor Baker
[Nexus 4 Android Development] foreman31:
There is nothing wrong with the Nexus 4 camera
[Nexus 4 Android Development] badboy47:
You are either trolling or needs to check up your eyes. N4 has 8 MP. It works very well. The only time people start whining when its compared to other phones such s3, iPhone. Even though there isnt much a difference comparing it to these phones.

Yeah show me a $100 phone that takes better pictures?
[Nexus 4 Android Development] daglesj:
The pics are fine for posting up on Facebook, a webpage at an eighth of the size and party snaps but if you take a slightly more critical look when shown at full size there is far too much noise and artefacts.

In my opinion the camera on the N4 just isn't all that great. It's okay, just not great. Not much if any of an improvement over the 5MP on my old Palm Pre2 which was very average.

Just my opinion.
[Nexus 4 Android Development] HB66:
So I am confused is this a PHONE or a Camera?
[Nexus 4 Android Development] daglesj:
Ahhh so the camera isn't important in a smartphone?! Okay then. Maybe you should send a memo to Nokia and HTC telling them then.....

:laugh:
[Nexus 4 Android Development] TheeWolf:
Does anyone know if rom developers are using this in their roms? I don't know if I should flash this or it is redundant...
[Nexus 4 Android Development] r4yN:
AW: [MOD] Increase Camera Audio/Video/Image Quality [Updated - 18th Dec 2012]

No they're not, because it's nothing but a placebo.

All this mod does is increasing the file size without improving the quality.

But there's another thread in the original android development section that might have a real effect on quality.

Gesendet von meinem Nexus 4 mit Tapatalk 2
[Nexus 4 Android Development] |Logic|:
Wut? Why say that and then not link to it?