Better camera quality through media_profile.xml editing - Samsung Galaxy S 4 Zoom

Hello all,
I don't actually have S4 Zoom yet but for those who adventurous enough you could try editing media_profile.xml inside /system/etc/ such can be found here
ImageEncoding quality (95.99|80|70|60|50|40)
^^^^^^
Change default max 90% JPG to 95.99%
<ImageEncoding quality="95.99" />
<ImageEncoding quality="95.99" />
<ImageEncoding quality="95.99" />
<ImageDecoding memCap="40000000" />
^^^^^^
Change default 90, 80, 70 JPG to force 95.99% all the time and increases the file size cap to 4MB from 2MB. You will need to change this settings in two places.
Click to expand...
Click to collapse
For those who tried please report back. I quite interested with this phone but the image compression looks pretty bad.

nX3NTY said:
Hello all,
I don't actually have S4 Zoom yet but for those who adventurous enough you could try editing media_profile.xml inside /system/etc/ such can be found here
For those who tried please report back. I quite interested with this phone but the image compression looks pretty bad.
Click to expand...
Click to collapse
Has anyone tried this yet? (I haven't, without rooting my phone)
I am currently using "superfine" 16M pixel option, file szie is ~ 5MB per picture
thanks

do you think there is a mod to increase the resolution of the panorama mode?
With galaxy s4 i can make panorama 22000x1500 pixels! With s4 zoom not more than 4000x500px :crying:

yeah.... i dont understand... panorama photos are ugly & small... WTF ?! i made lot of them & then at home i was like, are you fuucking kidding me.... ?! its totally uselles mode, photos looks like 8bit thumbnails...

Related

[MOD] Enable fullscreen recording for Froyo

The following instructions will enable you to record videos in fullscreen ( 800x480 )
1. Pull the file from the phone
adb pull /system/etc/media_profiles.xml
2. Make a copy of "media_profiles.xml" ( in case you want to restore it )
3. edit "media_profiles.xml" and change the following line from
-----
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720" <---- this value
height="480"
frameRate="24" />
-----
to
-----
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="800"
height="480"
frameRate="24" />
-----
4. Save the changes and reupload the file
adb push media_profiles.xml /system/etc/
5. Reboot the phone
adb shell reboot
** Upon request, I've uploaded the file "media_profiles.xml.zip". Unzip and skip to step 4.
Regards,
Kenny N
Thanks for the info. Could u maybe just upload an already edited version off the xml to maybe save some of us some time? Would appreciate it
agriff said:
Thanks for the info. Could u maybe just upload an already edited version off the xml to maybe save some of us some time? Would appreciate it
Click to expand...
Click to collapse
done and done - have fun
I guess they used the standard 3:2 aspect ratio that is used by DVD movies to keep things standardized. The 800x480 resolution should be better though if you are just watching the movies on your phone and computer.
Yes, they use the standard 3:2 aspect ratio. However, not sure about the others, I use the phone for playbacks
Is it possible to make the same with foto!!! to change resolution for widescreen fotos on Froyo, to display it on widescreen TV and laptop.....
Hey vnbuddy, I haven't tried to do your mod yet but there's something I think you should be aware of. There's a guy here in the forum whos been trying to enable 720p video recording on the Nexus One. Heres the thread: http://forum.xda-developers.com/showthread.php?t=672823
Check it out, you might be interested in helping.
thanks, will check it out and report
fiuza91 said:
Hey vnbuddy, I haven't tried to do your mod yet but there's something I think you should be aware of. There's a guy here in the forum whos been trying to enable 720p video recording on the Nexus One. Heres the thread: http://forum.xda-developers.com/showthread.php?t=672823
Check it out, you might be interested in helping.
Click to expand...
Click to collapse
Yeah - I saw the thread. You can try to change frameRate="24" to frameRate="30" if you want to play around with. There shouldn't be any side affects. But not sure if you will be able to achieve 30fps
Regards,
Kenny N
alexdzn said:
Is it possible to make the same with foto!!! to change resolution for widescreen fotos on Froyo, to display it on widescreen TV and laptop.....
Click to expand...
Click to collapse
I've checked their codes. At this point, it's not possible to adjust this setting without major modifications
Regards,
Kenny N
As it's written in that file shouldn't the high profile encode the video in mp4 (h264)? If I take a video it always saves it as 3gp...
Does changing the bitRate value have any noticeable effect?
vnbuddy2002 said:
Yeah - I saw the thread. You can try to change frameRate="24" to frameRate="30" if you want to play around with. There shouldn't be any side affects. But not sure if you will be able to achieve 30fps
Nice find vnbuddy, works great on Froyo leak, no FC's. Full screen and noticably sharper
Click to expand...
Click to collapse
vnbuddy2002 said:
The following instructions will enable you to record videos in fullscreen ( 800x480 )
1. Pull the file from the phone
adb pull /system/etc/media_profiles.xml
2. Make a copy of "media_profiles.xml" ( in case you want to restore it )
3. edit "media_profiles.xml" and change the following line from
-----
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720" <---- this value
height="480"
frameRate="24" />
-----
to
-----
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="800"
height="480"
frameRate="24" />
-----
4. Save the changes and reupload the file
adb push media_profiles.xml /system/etc/
5. Reboot the phone
adb shell reboot
** Upon request, I've uploaded the file "media_profiles.xml.zip". Unzip and skip to step 4.
Regards,
Kenny N
Click to expand...
Click to collapse
Is this supposed to play existing mp4 files full screen by way of camera. I pushed the zip, rebooted but camera plays mp4 same, not full screen. ?
kamasi36 said:
Is this supposed to play existing mp4 files full screen by way of camera. I pushed the zip, rebooted but camera plays mp4 same, not full screen. ?
Click to expand...
Click to collapse
No, as stated in the thread title and OP, it makes it to where you record from here on out in 800x480, which is the same resolution as our screens (fullscreen). The video's that you have previously recorded were recorded in 720x480 (3:2).
vnbuddy2002 said:
The following instructions will enable you to record videos in fullscreen ( 800x480 )
1. Pull the file from the phone....
Click to expand...
Click to collapse
Trouble Pushing xml
I don't know what the problem is. Following instuctions, but I'm getting this message when I try to push the file..
C:\AndroidSDK\tools>adb push media_profiles.xml /system/etc
failed to copy 'media_profiles.xml' to '/system/etc/media_profiles.xml': Read-on
ly file system
C:\AndroidSDK\tools>
I'd love to try this mod out.
Luckycookie I think your phone has to be rooted to use "push" in adb. Mine is stock and I got the same error
Edit: oh, yours is rooted? Dunno then :s
luckycook82 said:
I don't know what the problem is. Following instuctions, but I'm getting this message when I try to push the file..
C:\AndroidSDK\tools>adb push media_profiles.xml /system/etc
failed to copy 'media_profiles.xml' to '/system/etc/media_profiles.xml': Read-on
ly file system
C:\AndroidSDK\tools>
I'd love to try this mod out.
Click to expand...
Click to collapse
do :
adb remount
adb push X:/media_profiles.xml /system/etc
awesome! does it just "stretch" the video, or does it truly capture in widescreen with this mod?
pakraider said:
awesome! does it just "stretch" the video, or does it truly capture in widescreen with this mod?
Click to expand...
Click to collapse
It truly captures the video using that resolution.
Regards,
Kenny N

[MOD][ICS&GB][4/26/12]Camera HQ Mod: Extreme vs High (UPD: MDPI GB version updated)

[MOD][ICS&GB][4/26/12]Camera HQ Mod: Extreme vs High (UPD: MDPI GB version updated)
So, after searching around, i finally modded sony camera ui to have higher 10mbps bitrate @ 720p. It was not editable with media_profiles.xml because of the apk predefines the profile by itself, thanks to user Xperia-Ray user feedback on the next thread . So i altered the profile it needs for 720p. I chose at 10mbps to reduce hiccup or dropped frames and to comply with media_profiles.xml default bitrate cap.
As for photo quality, I think ics beta camera apk already gives you 90% compression value (file [email protected]) and think it can be modified simply from media_profiles.xml (since the apk only have 3 stepping of level, and after that the quality of 1-100 is determined by native code so no APK editing will solve that)
UPDATE: Added modified one for Gingerbread. Taken & Modded from Larut mod here. Thanks to him for 100% JPEQ Quality Mod
UPDATE 2: Added modified one for MDPI-devices Gingerbread.
UPDATE 3: MDPI Gingerbread updated, added override in JPEG Quality to 100%. apparently Gingerbread ignores media_profiles.xml.
UPDATE 4: Added Alternative Xperia Pro GB version.
UPDATE 5: Added new ICS 562 Leaked version based camera apk and 14Mbps quality.
UPDATE 6: Added new ICS 562 Official Nordic version with improvement of 14Mbps for 720p and 4Mbps for 480p.
UPDATE 7: ICS version Official is split into 2 option, Extreme Quality and High Quality, Extreme supports 14Mbps 720p + 6Mbps VGA Quality. while high is set at 10Mbps 720p + 4mbps VGA Quality.
UPDATE 7: Gingerbread version is split into 2 option, Extreme Quality and High Quality, Extreme supports 14Mbps 720p + 6Mbps VGA Quality. while high is set at 10Mbps 720p + 4mbps VGA Quality.
UPDATE 8: Added 5MP Option for 8MP module. Thanks to Xperia-Ray for the tips!
UPDATE 9: Added Alternative Version for ICS which reduce (or eliminate?) choppiness while recording HD. Please Try and give me feedback. Thanks to Xperia-Ray for the tips!
UPDATE 10: MDPI version is split into Extreme and High version.
DOWNLOADS
Gingerbread MDPI Version Download link:
http://www.mediafire.com/?03uqm3ktyzcv7rk Extreme: For 14Mbps quality + 6Mbps VGA Quality + 100% JPEG Quality
http://www.mediafire.com/?ao5wnia6cmanv4d High: For 10Mbps quality + 4Mbps VGA Quality + 100% JPEG Quality
https://www.box.com/s/81039f09e6b3de792181 Stock File. Thanks to Till-Kruspe
Gingerbread HDPI Version Download link:
http://www.mediafire.com/?apnu5jm4fu8en6x Extreme: For 14Mbps quality + 6Mbps VGA Quality + 100% JPEG Quality
http://forum.xda-developers.com/showpost.php?p=25165187&postcount=161 High: For 10Mbps quality + 4Mbps VGA Quality + 100% JPEG Quality + 5MP Still Capture, thanks to Xperia-Ray!
http://forum.xda-developers.com/attachment.php?attachmentid=1007250&d=1334589298 Stock File. Thanks to Lightspeed_x
ICS Official HDPI Version Download link:
http://www.mediafire.com/?deuzi41qakbmljd Extreme: For 14Mbps quality + 6Mbps VGA Quality + 5MP Still Capture
http://www.mediafire.com/?goy888j58fystt9 High: For 10Mbps quality + 4Mbps VGA Quality + 5MP Still Capture
http://www.mediafire.com/?59tw5c5mfdrlmp2 Normal: For stock quality + 5MP Still Capture
ICS Official Version Alternate Video Codec Download link:
http://www.mediafire.com/?tbeg1yh1uk0laa3
G'day!
FAQ:
Q: My Recording is only up to 10Mbps even though i use 14Mbps pack
A: Change the following in etc/media_profiles.xml from:
Code:
<VideoEncoderCap name="h264" enabled="true"
minBitRate="96000" maxBitRate="10000000"
minFrameWidth="176" maxFrameWidth="1280"
minFrameHeight="144" maxFrameHeight="720"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="96000" maxBitRate="10000000"
minFrameWidth="176" maxFrameWidth="1280"
minFrameHeight="144" maxFrameHeight="720"
minFrameRate="1" maxFrameRate="30" />
to
Code:
<VideoEncoderCap name="h264" enabled="true"
minBitRate="96000" maxBitRate="[COLOR="Red"]14000000[/COLOR]"
minFrameWidth="176" maxFrameWidth="1280"
minFrameHeight="144" maxFrameHeight="720"
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="96000" maxBitRate="[COLOR="Red"]14000000[/COLOR]"
minFrameWidth="176" maxFrameWidth="1280"
minFrameHeight="144" maxFrameHeight="720"
minFrameRate="1" maxFrameRate="30" />
Q: In ICS it's choppy!
A: Turn Off Video Stabilization, seems like the stabilization is done in software, causing stuttering. Hope somebody can fix the camera driver for that.
Q: The Sound is only mono? Help!
A: Change media_profiles.xml from
Code:
<AudioEncoderCap name="aac" enabled="true"
minBitRate="128000" maxBitRate="128000"
minSampleRate="48000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
to
Code:
<AudioEncoderCap name="aac" enabled="true"
minBitRate="128000" maxBitRate="128000"
minSampleRate="48000" maxSampleRate="48000"
minChannels="1" maxChannels="[COLOR="Red"]2[/COLOR]" />
Q: How to change JPEG Compression value in ICS?
A: Change the following in etc/media_profiles.xml from:
Code:
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
to
Code:
<ImageEncoding quality="[COLOR="Red"]100[/COLOR]" />
<ImageEncoding quality="[COLOR="Red"]90[/COLOR]" /> [I]// This is the medium quality, u can set it to 100% to override if you wish[/I]
<ImageEncoding quality="[COLOR="Red"]80[/COLOR]" /> [I]// This is the low quality, u can set it to 100% to override if you wish[/I]
<ImageDecoding memCap="[COLOR="Red"]30000000[/COLOR]" />
These lines depend on how many cameras you get. There will be 2 camera setting if your device has front cam, so if you want to improve the front one, set the above twice to the respective parent tag.
sent from my white ray using XDA App
Oh, thanks you so much!
Great work hansip, Now thats a Truely working Mod...
Short of thanks for today...
hansip87 said:
So, after searching around, i finally modded sony camera ui to have higher 10mbps bitrate @ 720p. It was not editable with media_profiles.xml because of the apk predefines the profile by itself. So i altered the profile it needs for 720p. I chose at 10mbps to reduce hiccup or dropped frames and to comply with media_profiles.xml default bitrate cap.
As for photo quality, I think ics beta camera apk already gives you 90% compression value (file [email protected]) and think it can be modified simply from media_profiles.xml (since the apk only have 3 stepping of level, and after that the quality of 1-100 is determined by native code so no APK editing will solve that)
Ok it's uploaded now, flash thru CWM & have a fun time!
G'day!
sent from my white ray using XDA App
Click to expand...
Click to collapse
great work!!thx!
but can it run in 2.3 firmware??
hjf9259 said:
great work!!thx!
but can it run in 2.3 firmware??
Click to expand...
Click to collapse
Unfortunately no. But I can build one if someone lend me the apk.
sent from my white ray using XDA App
yeah he just got nothing to do .. he definitely do OVERTIME
c'mon give him the apk!
hansip87 said:
Unfortunately no. But I can build one if someone lend me the apk.
sent from my white ray using XDA App
Click to expand...
Click to collapse
Finally!! Thank you, please check my post on same subject
http://forum.xda-developers.com/showpost.php?p=24138141&postcount=6
There is the link for the moded camera with quality mod (2.4 mb pics) pliz mod it to use 10Mbs
The phone can support up to 13mbs with lgcamera [email protected] 30fps.
10Mbs will be enough.
P.s do you know what would happen if you enable wmv,wma in the media_profiles?
Can we record at this format?
I didnt try to enable it because I read someone got boot loop. I still dont have backup and flash tools.
Xperia-Ray said:
Finally!! Thank you, please check my post on same subject
http://forum.xda-developers.com/showpost.php?p=24138141&postcount=6
There is the link for the moded camera with quality mod (2.4 mb pics) pliz mod it to use 10Mbs
The phone can support up to 13mbs with lgcamera [email protected] 30fps.
10Mbs will be enough.
P.s do you know what would happen if you enable wmv,wma in the media_profiles?
Can we record at this format?
I didnt try to enable it because I read someone got boot loop. I still dont have backup and flash tools.
Click to expand...
Click to collapse
Ok already added now Please try and report back if there's an issue with that.
hansip87 said:
Ok already added now Please try and report back if there's an issue with that.
Click to expand...
Click to collapse
Works perfectlly! Thank U
On the EXIF's there is no change. Everything is the same.
On Neo V photos are approximately 3 times bigger (0.5MB->1.5MB)
At videos there is change in info only about bitrate
Stock Bit rate : 5 993 Kbps
Custom Bit rate : 9 986 Kbps
And the size of videos is approximately 2 times bigger - in my test 15 sec movie at stock was ~11MB, at custom it was ~20MB.
Differences... I just did one shot of photo and video and weather sucks so there is no very good visible details.
JoHnNy08PL said:
On the EXIF's there is no change. Everything is the same.
On Neo V photos are approximately 3 times bigger (0.5MB->1.5MB)
At videos there is change in info only about bitrate
Stock Bit rate : 5 993 Kbps
Custom Bit rate : 9 986 Kbps
And the size of videos is approximately 2 times bigger - in my test 15 sec movie at stock was ~11MB, at custom it was ~20MB.
Differences... I just did one shot of photo and video and weather sucks so there is no very good visible details.
Click to expand...
Click to collapse
Jpeg has incomplete details, lacking the compression value. So the only parameter left, is the file size.
The video, well at least the metadata tells you the truth, so please report back if you can spot the differences.
Me myself is not a quality nitpicker (6mbps is quite good actually for me) so i'll give it to you all to decide
sent from my white ray using XDA App
GB 100% JPEQ Quality can working on ICS Beta ?
langtudongnai45 said:
GB 100% JPEQ Quality can working on ICS Beta ?
Click to expand...
Click to collapse
Edit the media_profiles.xml to fix your needs. no need for APK editing for ICS one. and yet, ICS already give you much larger file than Gingerbread, which indicates that the compression is already on 90%-100% level.
hansip87 said:
Edit the media_profiles.xml to fix your needs. no need for APK editing for ICS one. and yet, ICS already give you much larger file than Gingerbread, which indicates that the compression is already on 90%-100% level.
Click to expand...
Click to collapse
Thank u so much can do 120%
support for LWW please
tks for share ...
trantiena10 said:
support for LWW please
tks for share ...
Click to expand...
Click to collapse
well if you have the apk i'll mod that for you
you can download at : http://www.mediafire.com/?4c28r3wc0qe1e0l
tks for helping
can you change the resolution to 1080p??
Will this work on Rayonium(stock based GB rom) ??
Sent from my Optimus 2X using XDA
andrewfx1 said:
can you change the resolution to 1080p??
Click to expand...
Click to collapse
technically it's possible, but the CPU won't behave normally. Lack of processing power.
nexus: it should be. Backup first and try it.

[MOD] Modded stock CAMERA apk For Better Image Quality-(6MP 16:9 opt added!)

Update: I have modded somemadcaaant camera apk and added it below
Update 09/05/12 - 6mp 16:9 added like you requested
Post feedback!
Hi all,
I'm new to android and development and this is my first modded apk
After great thread on ray forum I tried to dig and try different settings.
this is my final version of the apk, I don't think that the quality can be improved any more without modifying camera lib files.
*In this version you will get more camera MP options:5MP 4:3,6MP 16:9
*All the bitmaps changed to ARGB_8888 for better quality.
*Tried to enable inPreferQualityOverSpeed and inDither to the bitmap
Enjoy!
Xperia-Ray said:
Hi all
I made some mod to the stockcamera apk to get better image quality of Ray and ARC.
can you upload framework-res and SemcGenericUxpRes and the stock SemcCameraUI and I will mod it?
If your SemcCameraUI is the same as arcs ics you can try it here:
http://forum.xda-developers.com/showthread.php?p=25567173#post25567173
Click to expand...
Click to collapse
You can just grab it from the 2.3.7 Xperia S firmwares or roms in the dev section
It's better to do that before starting a thread in themes & apps, requests need to be done in general
Hope your mod will be good
krabappel2548 said:
You can just grab it from the 2.3.7 Xperia S firmwares or roms in the dev section
It's better to do that before starting a thread in themes & apps, requests need to be done in general
Hope your mod will be good
Click to expand...
Click to collapse
cant you use the arc ics camera?
I think that the ics camera APK is supporting all xperia line, in the setting it has the recommended setting for 12mp camera, 8mp camera,5mp camera
can someone try and report?
Cool, check my signature for the files and edit what you like. If I've read your thread correctly I've already made those value changes?
You should also be able to use my apk on your arc
Sent from my LT26i using xda premium
somemadcaaant said:
Cool, check my signature for the files and edit what you like. If I've read your thread correctly I've already made those value changes?
You should also be able to use my apk on your arc
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
nice mod !
I have moded your apk and added my mod, can you try it? also you should get 5MP option- I think its must for your 12MP camera, you will get sharper and full detailed photos!
Hey awesome yes I will, I'll let you know how I go today with it.
Sent from my LT26i using xda premium
I can see the 5mp setting thats cool, i've tested photos and they come out in correct resolution. I think the images are a little larger, did you add any of your other mods?
-smc
somemadcaaant said:
I can see the 5mp setting thats cool, i've tested photos and they come out in correct resolution. I think the images are a little larger, did you add any of your other mods?
-smc
Click to expand...
Click to collapse
I have added the same tweaks I used in the arc thread. Do you like the 5mp quality? Please share full size 5mp photos
Just make 16:9 aspecr ratio... 4:3 realy sucks.
Sent from my LT26i using XDA
Yes, really I wish I could select 16:9 also for 5 and 12 MPX, I really hate 4:3 on a 16:9 screen
I can add 6mp as 16/9, what do you say?
oh yes, 6mpx sounds good.
btw, I cannot install the apk. I'm not rooted, is it needed?
wanzer said:
oh yes, 6mpx sounds good.
btw, I cannot install the apk. I'm not rooted, is it needed?
Click to expand...
Click to collapse
Yes to be root.
Copy apk into system folder, set permissions rw,r,r
reboot
PuhapÖcsi said:
Yes to be root.
Copy apk into system folder, set permissions rw,r,r
reboot
Click to expand...
Click to collapse
Yes root needed!
and I found out that you can install the apk without reboot,
1)stop camera service and clear data at apk manger
2)copy the modded apk to "root" folder and apply permissions
3)cut the apk from "root" folder and go to system/app
4)locate the old semcameraUI and delete it
5)past the modded apk
and walla! the apk installed
it works for me- you try it on your risk!
Thanks for your work.
Do this mod improve the JPEG file compression (increasing file size)?
Does it have any improvements in color balance, white/shadow levels or anything like that?
It'd be nice to have this info in the first post... because as far as I can understand you ported the features included in the mod from somemadcaaant but they are not described here... And then you added the possibility to have 5 and 6MP image size.
Just a small feedback.
Thank you for your work!
ErichSan said:
Do this mod improve the JPEG file compression (increasing file size)?
Does it have any improvements in color balance, white/shadow levels or anything like that?
It'd be nice to have this info in the first post... because as far as I can understand you ported the features included in the mod from somemadcaaant but they are not described here... And then you added the possibility to have 5 and 6MP image size.
Just a small feedback.
Thank you for your work!
Click to expand...
Click to collapse
thank you for your feedback,
I posted the link describing this mod at the arc thread ("for more info about the mod click here!"), and I modded the somemadcaaant coz it already improved over stock apk.
the jpeg size not really increased coz it already at 100%
and I tried fv-5 apk that can save photos at PNG format (17MB for 8mp pic) and no improvement in quality (photoshop 800% zoom)
the quality and details only can be changed in camera drivers (post processing)
not working in ARC S..dorce close
omarfaieq007 said:
not working in ARC S..dorce close
Click to expand...
Click to collapse
YOU ARE IN XPERIA S FORUM!
go to my thread in signature and there you find arcs version (ICS or GB)
Yep working very well with the new 5mp and 6mp options, thanks for your work!
We still need to raise the image quality some how, i dislike how the software blurrs the image when zoomed in with so much colour noise added on, doesn't make sense for a 12mp sensor and seems to be inconsistent with results.
Hopefully ICS will have a fix, the ArcS ICS i read somewhere on the XDA forum fixed image compression.
PNG image size is incredible from what you say, would it be better saving the image as a pure bmp instead? I don't think most of us would be worried about image size if it meant better images over all
-smc

[31/08] Camera Development [[email protected]] Developers Needed For 0% Compression.

KERNEL DEVELOPERS NEEDED( reverse enginering with .so files for jpeg compression )
Please, to all developers on motorola razr, i need a hand to fully remove compression and optimize the drivers if you have
knowledge about reverse enginering, .so, and generally android development, please PM me to Co-op and make much better the camera.
Click to expand...
Click to collapse
NEW METHOD, please download the attached file on this post, it has media profiles and build prop from the MIUI rom, so im not sure if will work on all roms
but you can try it, anyway RECOMENDED, to try this on MIUI ROMS only.
Updated everything, how to increase the video recording bitrate, and unlock 60FPS for 720P
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
And also, increase video recording quality.
You must be asking yourself, why 60FPS? there is any diference? YES, there is a really really good diference.
why??? because, at 60FPS, the camera takes much more frames per second, at higher shutter speds, then reduces the
blur effect, making much more sharp, clear and fast recordings, usually at 60FPS the camera takes the photo at
1/60 exposure, at 30FPS 1/30 so, it double the speed shutter, causing less blurred videos when you are in movement.
Also, its good for those who wants to do video editting ( like a race, street park, acrobatics...etc ).
Anyway, its worth the while to have 60FPS.
Click to expand...
Click to collapse
Take a cofe, relax and read slowly and carefully, this can take few minutes of your life but its worth :good:
You need to edit the following files.
Build.prop located on /system
Media_profiles.xml located on /system/etc
TiCameraCameraPropieties.xml located on /system/etc ( not present on ICS )
What you should modify/add.
In Build.prop if you scroll down, you will see this.
RED: Framerate
BLUE: Bitrate
PURPLE: Added line.
GREEN: Modified value.
ro.media.camcorder.1080p=mp4,h264,30,10000000,aac,128000,44100,2
ro.media.camcorder.720p=mp4,h264,30,8000000,aac,128000,44100,2
ro.media.camcorder.d1NTSC=mp4,h264,30,4000000,aac,256000,44100,2
ro.media.camcorder.vga=mp4,h264,30,2000000,aac,128000,44100,2
ro.media.camcorder.cif=mp4,h264,30,1500000,aac,128000,44100,2
ro.media.camcorder.qvga=mp4,h264,15,500000,aac,64000,44100,2
ro.media.camcorder.mms=3gp,h264,15,128000,amrnb,12200,8000,1
ro.media.camcorder.mmsres=qvga
ro.camcorder.zoom=true
ro.media.capture.maxres=5m
ro.media.capture.fast.fps=4
ro.media.capture.slow.fps=120
ro.media.capture.flash=led
ro.media.capture.flashMinV=3300000
ro.media.capture.torchIntensity=40
ro.media.capture.flashIntensity=100
ro.media.capture.classification=classF
ro.media.panorama.defres=3264x1840
ro.media.panorama.frameres=1280x720
Click to expand...
Click to collapse
You must modify the red, and blue values, and also the green ones.
Then, it should look like this one ( you can copy and paste to your build prop, but be carefull ).
ro.media.camcorder.1080p=mp4,h264,30,30000000,aac,128000,44100,2
ro.media.camcorder.720p=mp4,h264,60,25000000,aac,128000,44100,2
ro.media.camcorder.d1NTSC=mp4,h264,30,10000000,aac,128000,44100,2
ro.media.camcorder.vga=mp4,h264,30,8000000,aac,128000,44100,2
ro.media.camcorder.slowmotion=mp4,h264,120,4000000,aac,128000,44100,2
ro.media.camcorder.cif=mp4,h264,120,1500000,aac,128000,44100,2
ro.media.camcorder.qvga=mp4,h264,15,500000,aac,64000,44100,2
ro.media.camcorder.mms=3gp,h264,15,128000,amrnb,12200,8000,1
ro.media.camcorder.mmsres=qvga
ro.camcorder.zoom=true
ro.media.capture.maxres=8m
ro.media.capture.fast.fps=120
ro.media.capture.slow.fps=120
ro.media.capture.flash=led
ro.media.capture.flashMinV=3300000
ro.media.capture.torchIntensity=60
ro.media.capture.flashIntensity=100
ro.media.capture.classification=classF
ro.media.panorama.defres=3264x1840
ro.media.panorama.frameres=1280x720
ro.camcorder.videoModes=true <- Seems to not work, so slowmotion still not ready.
ro.media.camera.skew=0.0 ( Experimental dont add if you dont know what it does )
ro.media.camera.distortion=0.0,0.0,0.0,0.0,0.0 ( Experimental dont add if you dont know what it does )
Click to expand...
Click to collapse
Okay, with this, you have done the build.prop modifications, now its time to get the media profiles.xml.
you should search and modify ( red, blue or green values ).
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="30000000"
width="1920"
height="1080"
frameRate="120" />
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="2" />
</EncoderProfile>
Click to expand...
Click to collapse
Also, now you must find the 720P and modify it, put it 60FPS
( and dont forget to adjust the bitrate to 25mbps if you want 60FPS )
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="25000000"
width="1280"
height="720"
frameRate="60" />
<Audio codec="aac"
bitRate="128000"
sampleRate="44100"
channels="2" />
</EncoderProfile>
Click to expand...
Click to collapse
If you continue scrolling down, you should find this, this just its used to "remove"
compression on pictures, not work on most phones, and on razr definetly doesn't work...
Anyway, you just modify and leave it that way.
<ImageEncoding quality="100" />
<ImageEncoding quality="100" />
<ImageEncoding quality="100" />
<ImageDecoding memCap="80000000" />
Click to expand...
Click to collapse
And you're almost done, the last thing you have to modify.
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="30000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="1" maxFrameRate="60" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="8000000"
minFrameWidth="176" maxFrameWidth="720"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="1" maxFrameRate="60" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="64000" maxBitRate="20000000"
minFrameWidth="176" maxFrameWidth="1920"
minFrameHeight="144" maxFrameHeight="1080"
minFrameRate="1" maxFrameRate="60[/COLOR]" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8192" maxBitRate="320000"
minSampleRate="16000" maxSampleRate="44100"
minChannels="1" maxChannels="2" />
Click to expand...
Click to collapse
And you're done! reboot your phone, put your fingers in X and pray...
If your phone starts up normally, you have did it well.
Now, please, download LG Camera, or ICS Camera from market, because stock camera
it must be modified to handle the 60FPS, so it will ForceClose at 720P resolutions, but
you can use it with 1080P and other video modes.
This is all for now, please report if the tutorial its working, but i think i dont screwed anything.
Thanks and excuse my bad english.
nice to see a camera mod topic :laugh:
Omap 4 is capable of videorecording at 120fps in 480p, if that feature will be 'unlocked' it would be awesome!
Sent from my XT910 using xda app-developers app
Tieskuh123 said:
Omap 4 is capable of videorecording at 120fps in 480p, if that feature will be 'unlocked' it would be awesome!
Sent from my XT910 using xda app-developers app
Click to expand...
Click to collapse
that would actually be really awesome
pseudoheld said:
that would actually be really awesome
Click to expand...
Click to collapse
Awesome indeed, but now what the topic starter talks about. Just to make better pictures wiith no compression....
I'm listening here too, but I'm not a dev....
Great topic.... Really the only thing my maxx needs.
Sent from a really small keyboard
I think this is what you're thinking of, at least for fixing the compression.
http://photo.stackexchange.com/questions/24758/motorola-razr-maxx-compression-removal
Sent from my DROID RAZR using xda app-developers app
kintwofan said:
I think this is what you're thinking of, at least for fixing the compression.
http://photo.stackexchange.com/questions/24758/motorola-razr-maxx-compression-removal
Sent from my DROID RAZR using xda app-developers app
Click to expand...
Click to collapse
I'm not allowed to change this file even having made root.
Sent from my XT910 using xda premium
kintwofan said:
I think this is what you're thinking of, at least for fixing the compression.
http://photo.stackexchange.com/questions/24758/motorola-razr-maxx-compression-removal
Sent from my DROID RAZR using xda app-developers app
Click to expand...
Click to collapse
No, definetly that doesnt work, media profiles doesnt have anything to do here, y have modified all the parameters, but nothing, the compression
still there, no matter how many times you try...
So that compresion must be done on some other place ( libraries maybe ).
And for those one who say, 120FPS whould be awesome, y think 60FPS at 720P would be much more awesome and i think its possible ( actually th phone, seems to have, some modifications for 60FPS ).
But all those things need to be unlocked,i'll try to do something, but i need help for more experienced developers.
I hope this can be fixed when the kexec is out, then you can experiment with the kernels as you like
Added media profiles, with basic video recording tweaking ( much better quality )
How did you do that? In the mentioned file?
Sendt fra min XT910 med Tapatalk2
xodeus said:
How did you do that? In the mentioned file?
Sendt fra min XT910 med Tapatalk2
Click to expand...
Click to collapse
Just editing the bitrate, on every place ( like this one ).
Its pretty easy this, the most easy way to increase video quality ( but not all the phones does the same ).
bitRate="25000000"
Click to expand...
Click to collapse
This is where you specify the bitrate, and there are 2-3 more values, but never get it higher than 25mbps, OMAP4 seems to have a limitation, that
doesn't allow you to pass the 30mbps for some reason, i dont know if its hardware related, or software limitation.
About the image compression, i think is in the libraries.
|ErosizeD| said:
Added media profiles, with basic video recording tweaking ( much better quality )
Click to expand...
Click to collapse
But this is still not working for CM9 based ROMs, right?
woonaval said:
But this is still not working for CM9 based ROMs, right?
Click to expand...
Click to collapse
Yes only for ICS Stock ( and maybe epilson rom )
Interesting.... Do you think this could impact Google play movies? Right after trying these setting I noticed play movies won't playback.
Just testing from my phone ill look more carefully tonight from. A larger screen.
Sent from a really small keyboard
DROIDESP said:
Interesting.... Do you think this could impact Google play movies? Right after trying these setting I noticed play movies won't playback.
Just testing from my phone ill look more carefully tonight from. A larger screen.
Sent from a really small keyboard
Click to expand...
Click to collapse
No, it only impact on video recording, because all the settings for video playback, are same as stock.
And yes please, check it out and report if there is any diference with the increased bitrate.
It was a permissions issue I had just happened at the same time. I'll play around with video now
Sent from a really small keyboard
Will this mod affect a camera apps on the system or just the stock?
stiffi2011 said:
Will this mod affect a camera apps on the system or just the stock?
Click to expand...
Click to collapse
just stock

[q] razr camera sucks..!

is it me or you guys also feeling that ..
RAZR camera sucks..!
is there any way to improve the camera quality ??
Tell that to motorola..... Unlocked bootloader would allow us to disable JPEG compression, and greatly improve the picture quality..
Is there any other way... ? To improve..?
On the RAZR MAXX (which is the OG RAZR with a bigger battery), you can adjust the compression on a rooted phone as follows:
Copy the file /system/etc/media_profiles.xml to /system/etc/media_profiles.xml-ORIG. Keep the copy because you'll need the original file when future system updates come along.
In the file /system/etc/media_profiles.xml:
About 30 lines from the top, change
Code:
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
to
Code:
<!ATTLIST ImageEncoding quality (100|95|90|85|80|75|70|60|50|40) #REQUIRED>
also in the file, you need to look for a set of lines for each camera (front and rear) that looks like:
Code:
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
To remove compression altogether, change the quality values to 100. Change the memCap to at least twice the number of megapixels in your device's camera. Larger will not improve the quality of your photos; smaller will force Android to pick a compression value that makes the image fit into that number of bytes.
After making the change, reboot your device.
will it also work with normal razr..?
have you tried this and how are the results...!
can u upload some pics taken from your device..?
With these changes, the compression is still high and quality is bad :\ I'm using Vignette! With stock camera the photos are around 0.9 and 1.5 MB, with Vignette yesterday I took a 4MB photo! So I think that the compression is lower in that app!
vikcie said:
will it also work with normal razr..?
have you tried this and how are the results...!
can u upload some pics taken from your device..?
Click to expand...
Click to collapse
I haven't done it, but it will work for OG RAZR. There's nothing different between the OG RAZR and OG RAZR MAXX other than battery size.
For me, I haven't found the pictures to be that bad, so I haven't mucked with these settings.
solefero69 said:
With these changes, the compression is still high and quality is bad :\ I'm using Vignette! With stock camera the photos are around 0.9 and 1.5 MB, with Vignette yesterday I took a 4MB photo! So I think that the compression is lower in that app!
Click to expand...
Click to collapse
These are just suggestions I found while searching and others have stated they have helped. As I stated above, I haven't implemented them because I'm happy enough with what I'm getting right now.

Categories

Resources