[Q] How to modify media_profiles.xml to increase camera quality? - One (M8) Q&A, Help & Troubleshooting

I've been trying to increase my camera's quality by editing the "media_profiles.xml" file, without luck. It seems like it's been ignoring my changes to the file. The first thing I've tried to do was simply to increase the fps from 30 to 60, to see what happens. There are many different encoder profiles for 1080p video, so I've edited them all, without luck.
I know that you can already record in 60 fps by selecting the different mode i the camera app, but I'd also like to increase the bitrate of both the video and the audio, and also the resolution (if possible) to the camera sensor's maximum of 2688х1520 pixels. (120 fps possible, for ultra slowmotion?)
I'm s-off with the newest firmware for 4.4.3 and running Android Revolution 9.1 (wiped this morning, so fresh installation).
I know about this thread: http://forum.xda-developers.com/showthread.php?t=2743174&page=52
But unfortunately it doesn't work for my phone since the 4.4.3 update (even though there's a person saying that it does work for him/her) I also want to learn how to edit the settings so I can customize it so it suits me.
Thanks for reading

Bump!

I'd really appreciate some help!

Help will be greatly appreciated!

KKLD said:
I've been trying to increase my camera's quality by editing the "media_profiles.xml" file, without luck. It seems like it's been ignoring my changes to the file. The first thing I've tried to do was simply to increase the fps from 30 to 60, to see what happens. There are many different encoder profiles for 1080p video, so I've edited them all, without luck.
I know that you can already record in 60 fps by selecting the different mode i the camera app, but I'd also like to increase the bitrate of both the video and the audio, and also the resolution (if possible) to the camera sensor's maximum of 2688х1520 pixels. (120 fps possible, for ultra slowmotion?)
I'm s-off with the newest firmware for 4.4.3 and running Android Revolution 9.1 (wiped this morning, so fresh installation).
I know about this thread: http://forum.xda-developers.com/showthread.php?t=2743174&page=52
But unfortunately it doesn't work for my phone since the 4.4.3 update (even though there's a person saying that it does work for him/her) I also want to learn how to edit the settings so I can customize it so it suits me.
Thanks for reading
Click to expand...
Click to collapse
I can't help with this, but have you tried asking in the picture thread? There are a couple of guys in there that might help.
Pictures Taken With M8

Alright, in the thread I linked in OP, I followed the instructions some users suggested and made the mod work again
It works flawlessly for me and many others.
Unfortunately OP is banned, so I've attached the file that's I've edited to work (per the instructions) with Sense 4.4.3 ROMS, happy flashing!

Related

Looking for optimized video recording setup

Hello folks,
I tried to record decent 1080p video on my SGSII. Turned out that really gets a problem.
My device runs on Android 4.0.3 (IML74.XXLPQ) in combination with the Siyah kernel (3.0.32-Siyah-v3.2.5.2+ [email protected] #113). Secondrom is some CM9 ROM.
First, I just tried the stock Samsung camera app, but I can't work with the refocusing. Seems impossible to turn off the autofocus.
Besides that, the automatic white balance is crap. When I run through, wearing an orange shirt, it fu**s up the white balance and the picture gets a blue tint for a few seconds. Presets aren't the best, too.
I tried the ICS camera (while using CM9 secondrom). Same problems, but video stops recording after 16 minutes or so, and it doesn't proceed. I mean, what the f**k?
At this point, I'm looking for a camera app that:
- (optionally) has manual white balance (for me to set it using a white sheet of paper).
- can set the focus to fixed.
- records as long as I want it to, until the memory is full or I interrupt it. (When hitting 4GB, it will have to split, but it should automatically continue recording).
That was when I started looking for good camera apps. I tried some, and the best I could find until now was lgCamera. I used the free variant.
It works mostly like I want it to, though I have to set the white balance to some fixed setting. Focuses and fixes it. Everything seems to be okay.
Then it continuously stopped recording, after 4:17 minutes (@30Mbit/s), or after 1:32 minutes (@100Mbit/s). Looking at the files, it only uses 765 MB before stopping. Remember, it has to run as long as I don't stop it and there's memory left!
Of course, I used the free version, but the Play Store says:
Free version limitations:
-sometimes program shows BUYME dialog.
-program icon with red label FREE.
Click to expand...
Click to collapse
I tried the Pro version, but it keeps stopping.
BUT not enough with stopping recording! lgCamera also freezes some times. Especially while recording at 100Mbit/s (usind only 65) when stopping, it just freezes to death, leaving the phone unusable and I have to reboot. Yup, I waited whole 15 minutes, before I rebooted. I also saw how it worked like it should. Very slow when stopped, but hey, no freezes.
At this point, the app also should:
- never freeze! (Can't be that hard to find for an ex-mainstream phone...)
In addition to all that what I mentioned above, the phone loses battery like hell, of course. So I also look for a ROM which is very stable (!) and also very battery-saving while not limiting power used by the video recording app.
Aaand... And this one is a huge bummer... Absolutely every app with which I recorded produces unbelievable crappy framerates!
I set it to 30fps and I get random sh*t between 25 and 32 fps. This is a big downside, because I really get problems working with it in Adobe Premiere/After Effects and also encoding it. Even if I encode it to a “real” framerate, which all editing programs understand, it's still async!
So after I collected hours and hours of material, I don't really want to encode (assuming it would work) every single video (of whose every single one has a different framerate!), because it would take ages (and, of course, the encoding will cost a little quality)!
At this point, it has to:
- have conform fps output (29.970 or 30.000) or at least another fps which stays the same in every video!
- run on a stable, battery-saving ROM.
I don't need any other apps besides the recording one, because I will edit the video on my computer.
If you have read all this, I hope you also help me out.
Which ROM should I use as a pure video recording ROM?
Which app is a stable one for use on the SGSII and has the features I mentioned above?
Do you have any tips for me, how to get the perfect video?
I really hope anyone will help me with this.
Thanks in advance!
Great post.
I will be recording a conference using my SGS2 but, its a long video and I wanted to recorded without crashing the app after I stop the record as it happen using the deffault camera with ICS 4.0.3
Nice post.
I'm looking for exactly what you had written especially a camera application that can automatically resume recording after it reach 4Gb file limit.
I tried several program such as IgCamera and others application but it won't work.
After googling around and spend about a few hours, I found some methods that might workaround this issue.
A. Month External_sd card to NTFS.
This method might workaround 4Gb limit problem for FAT file system and with this I think that Camera application may not automatically stop when recording video file reach their limit.
From camera behavior , It seem that camera application can record video at maximum size upon maximum size of current file system.
Then , I suggest that if event "Reach max file size" occurred , android system whose monitor events will send some signal and command to stop camera application.
So if I can month external_sd card with NTFS file system , I can workaround this issue.
Unfortunately , After I read several topic and spend a few hours to find out how to month NTFS on my android device.
I'm still no luck . I got "fuse device is missing try modprobe fuse as root" and I read somewhere on internet,
someone said that this message may telling me that my kernel won't support the NTFS month.
Now I'm going to move forward to another kernel that have capable of month NTFS as native and trying to month external_sd in NTFS format in a few day.
B. Modify Camera.apk
This method can workaround 4Gb limit problem for FAT file system If you could modify camera.apk.
by modifying method that will be called when recording file reach 4Gb file limit, adding a few line of code to start a new record automatically. I think that this might work.
Some of xda member (Potatoman and rafalense), had successfully modified bitrate and audio sampling rate of camera application
(http://forum.xda-developers.com/showthread.php?t=1104051)
They grab some camera application for their phone , decompile binary source into .class to locate a sample rate of video. After they found an integer that represent a sample rate of video, they made another decompile binary source into a file called ".smali" with a lot less understandable than a class file then edit it and recompile the program.
But, This method won't only just modify a sample rate of video, we needed to modify some part of method.
Since modify Camera application won't easy like sample rate, you needed to grab your camera application from your phone, decompile a binary source, unsign , sign , compile and etc and it is a long story. So I decided to move to another method.
C. Automatic touch simulate program by period.
This workaround work without modify any of your file format , kernel or anything.
If you could find some application to trig the record button after some period of time. So file size limit event won't occur anymore.
Only concern about this method is automatic touch simulate program may not survive long enough to trig the record button for all day.
I'm finding these kind of application and if anyone whose read this topic and know these kind of application , please let me know.
D. Compile your Camera application from Opensource
This is a last method I will ever choose. This is a really hard method but really easy to explain.
This method is about download sourcecode of your rom , edit camera application at the first place then complie it yourself. Since I din't complete reading a guide for compile a rom , I suggest that inorder to make modified camera application work , you may need to compile all of rom.
From my phone manufacturer(samsung), they had released some sourcecode of for Galaxy S2 ICS ROM
For anyone whose interest please find it in the link below.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Update
Hi , all
I just successfully found a workaround for video file size limit issue.
This workaround is based on approach C. Automatic touch simulate program by period and it also need a root access.
All credit goes to Yahor Paulavets from
http://softteco.blogspot.com/2011/03/android-low-level-shell-click-on-screen.html
To complete this workaround , I write some shell script that send a low-level script via Scripting Layer for Android (SL4A) to stop video recording then send the same command again to start new record before its size reach 4 Gb. After finished writing shell script, I use terminal editor (with root access) to run this script when I start recording video.
That sound easy, but in fact, you need to capture a "touch event" with have difference signature based on the device.
Yahor Paulavets write some great article which explain how to capture this signature in the link below
http://softteco.blogspot.com/2011/03/android-clickonscreenxy-shell-script.html
____________________________________________________________________________________
Below are list of related topic that might help you
[1] Is there anyway around the 4GB video recording limit?
http://forum.xda-developers.com/showthread.php?t=1140483
[2] How to mount NTFS or EXT4 format microSD to tab
http://forum.xda-developers.com/showthread.php?t=1552674
[3] [MOD] Hacked Camera.APK for better audio quality, usage with any battery life & MORE!
http://forum.xda-developers.com/showthread.php?t=1104051
[4] App for long video recording
http://forum.xda-developers.com/showthread.php?t=1471449
[5] How can I bypass the 4gb limit on filesizes for HD Recording?
http://forum.xda-developers.com/showthread.php?t=1130973
[6] Month ExternalSD Card to NTFS for Android
http://forum.xda-developers.com/showpost.php?p=15167790&postcount=41
[7] Samsung opensource
http://opensource.samsung.com

Camcorder hack for (Much?) better video recording

OK,I guess most experienced people would know about this,but still,here goes.
If you have a root browser(downloadable from play store),then you can edit the media_profiles.XML found in system/etc.
This can be edited to get your video recording from 640*480 @ 24fps to 720*480 @ 30 fps.(This is excellent for viewing on the wildfire S.)While technically higher resolutions and frame rates are possible,the stock Gingerbread camcorder app doesn't seem to list it in settings.Plus,higher frame rates don't work properly for me anyway.
So,here's how to do it :
In media_profiles.XML,under encoder profile high, change the width to 720,height to 480 and frame rate to 30.
(I'm not really sure about the following part,although no harm in trying.I'm just not sure whether this is really necessary).
Under each of the encoders below that (h264,h263,m4v) make the maximum height and width to anything you want above 720*480 and frame rate(if below 30) to 30.Max bitrates can be changed too,if you want.
I think its possible to change the camera encoding quality too,although for general day to day purposes,It's not too useful.
I'm open to any suggestions/Improvements if found.
Thanks for reading!
have u tried it??
kye04 said:
have u tried it??
Click to expand...
Click to collapse
Well,yeah.I don't see how I could have known this otherwise.
Actualy on the stock 2.26 these values are 720/480/24 by default dunno what rom were you testing this at.
If you do it once,even if you completely reset it,it goes to 720*480/24.
Maybe it's an update by HTC,as initially it's supposed to be 640*480/24.
Anyway the main thing is changing the framerate to 30 fps.....really improves overall video recording.

[REQUEST][4.1.2][APP][MOD]Camera with ability to choose proper fps

Hello, respected developers!
As the topics concerning camera app are slowly fading down, I start a new one here.
I tried both existing mods/apps of a 4.1 standard camera and a custom apps like lgCamera. Still I can't get 25 fps in recorded videos even when I set it to this particular value. I can get it when i use AxelVoyager in-car videorecorder, but it's quite buggy and not that common-to-operate and this setting must be applied manually every time before I start record.
I need this 25 fps setting because my other video recordings are in PAL (25 fps) and it's not a common task to convert fps correctly to match each other.
As far as I can understand with my many-years-ago-IT-background, this should not be a problem for an experienced person to compile a version of a standard camera app with pathced media profiles that have 25 instead of 30 fps in 1080p and 720p HD media-profiles. So I kindly ask for that.
Thanks.

[MOD] Camera - Image/Video/Audio Bitrate Increases for Best Quality [NEW PROFILES!]

I AM NOT RESPONSIBLE FOR ANY NEGATIVE IMPACTS OR CONSEQUENCES ON YOUR PHONE IF YOU SO CHOOSE TO USE THIS GUIDE.
It had come to my attention that recording for long periods of time will result in large file sizes when using my mod. For this reason, I have now created different profiles to increase quality in either images or video/audio, including a new experimental version!
It has been stated that stock 1080P video runs around 20Mbps on the G2 (I consistently have 30Mbps). These mods can increase 1080P video to approximately 40-50Mbps. 720P, images, and audio Kbps can also be increased to max potential. The following steps help you unleash the best quality on the G2 camera!
WARNING: INCREASED BITRATES MEANS MORE STORAGE SPACE IS TAKEN UP.
PREREQUISITES
1) You MUST be rooted.
2) You MUST have recovery installed.
3) Download 1 of 6 media profiles:
media_profiles.xml (Increases to Image/Video/Audio)
media_profiles.xml (Increases only to Image)
media_profiles.xml (Increases only to Video/Audio)
media_profiles.xml (Stock)
media_profiles.xml (Experimental - Further Increases to Image/Video/Audio)
media_profiles.xml (Experimental - Further Increases solely to Image)
NOTE: I have tested the experimental Image/Video/Audio version. The image is a tad bit better. The video seems more stabilized and averages around 45Mbps. Audio stays about the same.
4) Download either Jishnu Sur's version 1 or version 2 mod (I prefer version 1). He now has version 2.5, 2.5.1, and 2.5.2, but only 2.5.2 has been successfully tested with my mod.
5) Download the stock file to revert from Jishnu Sur's versions.
MOD METHOD #1 (RECOMMENDED) - Requires most files from above.
1) Place all the downloaded files somewhere in the phone.
2) Boot into recovery.
3) Flash the stock zip.
4) Reboot system.
5) Boot back into recovery.
6) Flash the Jishnu Sur mod downloaded.
7) Reboot system.
8) Use a file explorer (like Root Explorer) app to open the folder where the downloaded media profiles file is.
9) Rename the media profiles file to be "media_profiles.xml".
10) Copy the media_profiles.xml file.
11) Navigate up to the root folder and go the "etc" folder.
12) Paste the media_profiles.xml file.
13a) A message may appear asking for rewrite (R/W) capability. Select "yes".
13b) A message will appear asking to confirm overwriting the current version. Select "yes".
14) Reboot the phone 1-4 times.
INSTALLATION METHOD #2 - Requires only the media_profile.xml and Stock file from above.
1) Place all the downloaded files somewhere in the phone.
2) Boot into recovery.
3) Flash the stock zip.
4) Reboot system.
5) Use a file explorer (like Root Explorer) app to open the folder where the downloaded media profiles file is.
6) Rename the media profiles file to be "media_profiles.xml".
7) Copy the media_profiles.xml file.
8) Navigate up to the root folder and go the "etc" folder.
9) Paste the media_profiles.xml file.
10a) A message may appear asking for rewrite (R/W) capability. Select "yes".
10b) A message will appear asking to confirm overwriting the current version. Select "yes".
11) Reboot the phone 1-4 times.
REBOOTS: The reason for the last step is that it needs at least one reboot (but probably two) to increase the quality of video. The images should already be at their highest quality.
AUDIO ISSUES: If the issue where audio can no longer be heard occurs, it has been confirmed that going back to stock and repeating the steps fixes this.
QUALITY INCREASES: I found that after at least one (as many as four) reboot I was getting extremely high video bitrates; between 38Mbps and 50Mbps! The image quality should increase above stock as well as above Jishnu Sur's mods. Audio increases between 190-210Kbps.
MOD DIFFERENCES: I found a few differences in these mods. Jishnu Sur's version 1 seems to help with focus and a few other things. His version 2 adds to his first by restricting high ISO or low FPS in low-lit areas. His newer versions decrease bitrates. My mod increases the quality of images and videos above Jishnu Sur's, but does not have the other features.
PREVIEW OF IMAGES AND VIDEO: Here is a large zip file of images I took while testing. There were an abundance from my reboots, but I only chose one set per folder since the file is almost 70MB!
HOW TO CHECK QUALITY:
Images - Check the storage sizes of two or more images. Open an image in Preview or any viewer that can zoom. Zoom in on the curtains. Open the other image(s) for comparison and perform the same amount of zoom. Compare the clarity (sharpness) of the images.
Video - Check the storage sizes of two or more videos. Right-click on a video and click Properties. Click the Details tab. Check the bitrate of the video. Right-click on the other video(s) and perform the same actions. Compare the difference in bitrates.
A quick lesson on Lighting (ISO, FPS, Exposure): The higher the ISO the more light for the camera, but with more noise in the image. The lower the frame rate (FPS) the more light for the camera, but less smoothness for video. Exposure can help you compensate for images (or parts of images) that come out too bright or dark. Exposure should be used when optimal ISO or FPS settings have been found and changing them will alter quality in some manner.
Credits: Jishnu Sur for his mods.
nice man. just flashing his mod now and your media profiles..i'm excited!
Can you post some examples of before and after the mod?
Sent from my VZW LG G2
Any way to download without signing up for a sky drive account?
Sent from my Nexus 10 using XDA Premium HD app
idk if its this or his camera mod, but audio doesn't work anymore.
---------- Post added at 02:13 PM ---------- Previous post was at 02:10 PM ----------
yes it's this mod.
flashing this for me took away audio during video recording. i went back to the old media profiles and audio is back.
jayochs said:
idk if its this or his camera mod, but audio doesn't work anymore.
---------- Post added at 02:13 PM ---------- Previous post was at 02:10 PM ----------
yes it's this mod.
flashing this for me took away audio during video recording. i went back to the old media profiles and audio is back.
Click to expand...
Click to collapse
Sorry to hear that. Just went back through my test files of video and each one I created had audio (The Simpsons were playing in the background). I am not sure why this is not working for you, anyone else with this issue?
Heatshiver said:
Sorry to hear that. Just went back through my test files of video and each one I created had audio (The Simpsons were playing in the background). I am not sure why this is not working for you, anyone else with this issue?
Click to expand...
Click to collapse
really weird. yeah, i made a backup of the stock media profiles after flashing his mod, and audio is back now...weird.
trickster2369 said:
Any way to download without signing up for a sky drive account?
Click to expand...
Click to collapse
You should not have to create a SkyDrive account as I have it open for public download. I logged out of my account, tested it, and I had no problem accessing it. Please check again and reply if the problem persists for you.
"NOTE: Flashing other Media Profiles may loose the quality as the camera.msm8970 is synced with the Media Profile."
i wonder if flashing this mod would've actually made it worse bc of that?
jayochs said:
really weird. yeah, i made a backup of the stock media profiles after flashing his mod, and audio is back now...weird.
Click to expand...
Click to collapse
I'm a bit confused, his mod, or mine? If the audio occurs after his (it doesn't for me), you can try my mod without his. My mod is purely for quality increases. I have done this for other phones before and never lost audio.
I have no audio either...
Kenchi* said:
I have no audio either...
Click to expand...
Click to collapse
Can you confirm if this is after flashing the other mod, or did you just try mine?
Heatshiver said:
You should not have to create a SkyDrive account as I have it open for public download. I logged out of my account, tested it, and I had no problem accessing it. Please check again and reply if the problem persists for you.
Click to expand...
Click to collapse
All good. I downloaded in browser mode. And, apparently, I have an account, just haven't used it in forever.?
Thanks Devs. From my VZW G2.
jayochs said:
"NOTE: Flashing other Media Profiles may loose the quality as the camera.msm8970 is synced with the Media Profile."
i wonder if flashing this mod would've actually made it worse bc of that?
Click to expand...
Click to collapse
I would have to say no just from the test files I have. I think the statement refers to media profiles that have yet to be altered (stock settings), which would definitely bring down your bitrates (back to stock).
Heatshiver said:
I would have to say no just from the test files I have. I think the statement refers to media profiles that have yet to be altered (stock settings), which would definitely bring down your bitrates (back to stock).
Click to expand...
Click to collapse
ah. what i did was flashed his mod, then pushed your media profiles and lost all audio.
also, the videos that were recorded with your media profiles didn't work correctly on my PC. they would freeze up and wouldn't play right...then i went back to his media profiles and it worked fine. weird.
jayochs said:
ah. what i did was flashed his mod, then pushed your media profiles and lost all audio.
also, the videos that were recorded with your media profiles didn't work correctly on my PC. they would freeze up and wouldn't play right...then i went back to his media profiles and it worked fine. weird.
Click to expand...
Click to collapse
Okay, now were getting somewhere. It is odd this works for me without issues, but not for you. One thing I can think of is I flashed another zip at the same time when flashing his.
Maybe you can help diagnose this issue with me. First, what variant of G2 do you have (I assume an American carrier)? Second, would you be willing to undue his mod and try just my mod to see the results? These two things would tell me a lot about what is happening...
Heatshiver said:
Okay, now were getting somewhere. It is odd this works for me without issues, but not for you. One thing I can think of is I flashed another zip at the same time when flashing his.
Maybe you can help diagnose this issue with me. First, what variant of G2 do you have (I assume an American carrier)? Second, would you be willing to undue his mod and try just my mod to see the results? These two things would tell me a lot about what is happening...
Click to expand...
Click to collapse
hey..actually out right now so i won't be flashin stuff or playin around, but i can say that i'm running the Verizon version of the G2.
From another thread a user modding the media_profiles didnt see any changes to vids and images r u sure it works for anything except for codec checks? Make sure the modded apk, libs and media_profile all match with the same bitrate and settings perhaps.
somemadcaaant said:
From another thread a user modding the media_profiles didnt see any changes to vids and images r u sure it works for anything except for codec checks? Make sure the modded apk, libs and media_profile all match with the same bitrate and settings perhaps.
Click to expand...
Click to collapse
These can be hit or miss on different phones. On my S4 changes to the media profile would not take if replaced. I could change the values in-file and they would stay, but the quality would not change at all. On my ZTE U950, the file would indeed change and improve.
This mod works with more than just the codec checks, here are a few simple reasons why:
1) You can check the audio in the my media profile. The audio in the file is at 320Kbps, however, the video file for preview is a bit above 192Kbps. So this should disprove that only codec checks are being done since the audio is not being pumped up as high as I would like (yet).
2) The video storage sizes are also different, and if they were at the same bitrates (even if the codec read differently) the sizes should be similar since they are of similar length and content.
3) I performed some basic math to determine what percentage of my Jishnu Sur preview video is compared to my preview video. How does this help? If the storage size and bitrate percentages come out about the same, then the codec should be displaying the correct information since the storage sizes can't be incorrect. Both came out to about 83%. I can provide this simple equation if people wish to check for themselves.
I do welcome the question and any others people may have. People should make informed decisions before using mods.
Hello,first i want to thank you for your work.I have the Korean F320S model and i have the same problem with audio too.I dont think its model dependent as it seems.I did the same as the other guy,flashed the other mod and after that pushed your profile in.Im willing to help with the issue if you have something i can try.

More options for video recording quality?

I'm on Viper 4.06 ROM.
Is there an option i'm not seeing or perhaps an apk or Zip I can flash etc to give me more options for video quality?
All I have is:
1920x1080 HD
1280x720 HD
then, straight down to super small bad quality: 177x144 MMS.
adult photo sharing
Reason I ask is that I've only got the 16gb model One X and with 1280x720 HD quality selected, it says i've only got enough room for 1 hour and 24 mins recording time.
Surely there is an app or zip I can flash with perhaps more options with regards to video quality, like instead of going from the option of HD, then next step down is 177x144...perhaps next step down something like 800x480 or something?
Which would still give me good enough quality and probably double the amount of recording time.
Anything I can do, apart from changing my phone?
Anyone know of any mods, or .apks or Zips I could flash etc to give me more options to choose from in video quality recording?
Any help, much appreciated.
Matt
You asked this in the rom's dev thread, and now in the apps & themes section. Please be aware that this is a question, it belongs in the Q&A section !
And no i haven't seen a mod around that enables that.....
are the was.. a long time ago.. frames.. mp/s

Categories

Resources