yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] jovienc:
Hi there, great work you've done !

I've been using this mod (Froyo one) with Modado FR17 and it was perfect ! Last we I've switch to CM7 using some kangs, and now #39.

I've tried to install it (the Gingerbread one) on both kang and #39, but I think it doesn't work :-s it's supposed to change the default camera.apk with an LG-like ?

On mine it doesn't. Or if it's normal, how can I change resolution on stock Camera app ? I can only choose between (HD, High, Low).

And Auto-focus doesn't work either :-s
[LG Optimus 2x] aMpeX:
just a thought, since many SD cards struggle to keep up with the high bitrates, why not use the internal SD card (mounted at mnt/emmc in CM7)?

Since it isn't used for anything anyway, it might serve as a fast destination for video recordings.

Cheers

aMpeX
[LG Optimus 2x] pa.pn2:
yeah, youre right.the internal storage is almost useless right now..
[LG Optimus 2x] .:george:.:
Any way to get rid of the focus locked sound? TIA
[LG Optimus 2x] biasquez:
when i try to install zip file with cwm, i don't have any error but installation process doesn't change camera.apk...why?
[LG Optimus 2x] jacobmllr95:
because the camera looks the same.
[LG Optimus 2x] biasquez:
no.... i have same problem with new ril released by lg (different file like size and date)
[LG Optimus 2x] LeJay:
How are you testing if it's working?
[LG Optimus 2x] biasquez:
i can test installing for example apk that increase quality of video (mbit) and see if mbit is high or not
[LG Optimus 2x] svceon:
Lejay, awesome work with the new apk, really feels the difference, now tell me, are you planning, or is it possible to enable focus while recording?
[LG Optimus 2x] LeJay:
It seems changing focus while recording is very hard to do or maybe impossible. It would at least require quite a bit of hacking around in android. It sounds like a lot of fun to try, but problem is I'm extremely busy until august doing the stuff people are actually paying me to do in real life :).

At that time I might start a more serious project to improve the camera app for cm7. I think it's an important aspect of a modern smartphone OS and there's a lot of room for improvement (no offence :p).

If anyone knows how to change the parameters of the camera while recording is in process I could do at least manual focus and probably some kind of continuous autofocus.
[LG Optimus 2x] LeJay:
And you haven't seen any changes whatsoever? Which zip did you try? Did it say it installed correctly? Are you using CM7? Try downloading it again.
[LG Optimus 2x] biasquez:
i'm using cm7 build 49, i downloaded:

BitrateMod(720p only)-signed.zip

Autofocus1.1-signed.zip

FullHDmod_mid1.0-signed.zip (

and i installed it with rom manager and with cwm too, installed correctly but .apk isn't changed...
[LG Optimus 2x] pa.pn2:
why do you flash the bitrate mod and the 1080p cam together?

this cant work or am i wrong?
[LG Optimus 2x] LeJay:
All of them should change the bitrate. Can you tell me what you're using to test the bitrate and which rates your getting?
[LG Optimus 2x] biasquez:
i can see bitrate in detail dialog in windows or in property in vlc...but this problem with installation of zip with cmw is the same problem that i have when i try to install lg ril zip with cwm...so i think that cwm has some problem or installation script in your zip is wrong...
[LG Optimus 2x] svceon:
You best to check that, i didn't had any kind of problem at all, installed fine, ran it fine, noticed differences... most probably that's a cwm issue...
[LG Optimus 2x] BritSwedeGuy:
FullHDmod_mid 1.0

For me the audio was out of sync when playing back on the device but was in sync when playing back on PC - inferring that the problem is not with the app.
[LG Optimus 2x] biasquez:
one question about autofocus on lg o2x with cm7: i installed FullHDmod_mid 1.0 and then Autofocus zip...camera works fine but i don't know how works autofocus...it seems that autofocus isn't available...
[LG Optimus 2x] LeJay:
Auto focus should be enabled by default. You have to install the auto focus zip as the last thing, though.

Honestly, I dont recommend installing it. Its really buggy.
[LG Optimus 2x] pastime1971:
zoom by volume up/down

i searched this forum, and didn't find anyone mentioning it.

if i enable zoom by volume buttons, zoom jumps from 1x to 8x and vice versa.

if i'm not the only one, could LeJay fix this ?
[LG Optimus 2x] abeeshek:
brilliont work lejay

i was on CM7(50) yestrday and i tried ur FullHDmod 1.0mid.

the improvement was significnt mate !!! bravooo !!!

only HDMI mirroring wasnt working well with that mod.

but i think its more of CM7s fault,wht do u reckon???
[LG Optimus 2x] pa.pn2:
@lejay

maybe interesting for you

a guy in the cm7 nightly thread solved some fixes for the cam

maybe you have a look at it

here is what he made

in cm7 camera app, enabling volume zoom disables long focus, which i think is a bug.

also volume zoom jumps to 1x or 8x only, which is not so convenient (for me at least)

so, i fixed those, and re-compiled Camera.apk

now volume zoom changes the zoom by 0.5x step or so.

also added that search button focus (but no snap) when search shutter is not enabled.

lastly, i did a little dirty trick and forced the camera app to name the front camera as "Front". it is only cosmetic fix, but if you are so bothered by having "Back" and "Back", this will ease your pain.

update it from CWM recovery, or extract Camera.apk and push to /system/app/

frontcamera.zip (not signed)

md5sum: 8650637ecceea2dab39b590c7f4e3293

http://www.mediafire.com/?rqrto7acvqa8grh
[LG Optimus 2x] williemeiser:
Nice work dude! Btw, if i already applied the camera tweak from this thread,will it be overwritten by urs when i apply it? Thanks in advance. U juz made my LG Optimus 2X getting nearer to perfection. >_<

Edited:btw,do i need to flash these all camera tweaks everytime i flashed new nightlies?
[LG Optimus 2x] pa.pn2:
i havent done this sorry.but lejay maybe should have a look at it and implement that fix..
[LG Optimus 2x] xmarkclx:
Does it support zooming?

Is there any hope of getting this into the official builds?
[LG Optimus 2x] jackdowsan:
I am on cm7 latest nighty, I tried installing FullHDmod 1.0mid, but it didnt work for me, I still get around 10mbps and fps also dropped to around 15.... What could have gone wrong?
[LG Optimus 2x] LeJay:
There's a small minority for whom 30fps@20mbps becomes 15fps@10mbps. I have absolutely no idea why this is happening and is the reason the patch haven't been added to the official build.

We've even tried flashing the exact same build with the mod working on one phone, but not the other. It's very strange.

It's either actual hardware differences or maybe something like baseband... I dunno.
[LG Optimus 2x] LeJay:
Source code(simple fork of cm7 camera app with 1080p added) is finally up,

https://github.com/LeJay/Camera
[LG Optimus 2x] jackdowsan:
Actually this is chain of process I went through

1.Backed up camera.apk through titanium

2. Applied FullHDmod 1.0 through CWM

3. Applied bitrate

4. Applied autofocus

(got 720p at 30fps and 20mbs at this point though)

5. Realized that I did it wrong and that I had to flash FullHDmod 1.0 and autofocus (still wrong I suppose...lol)

6. restored camera.apk from titanium

7. flashed back the fullHDmod and then autofucs

8. Checked and was getting 15fps and 10mbps

9. again restored camera.apk

10. flashed only fullhdmod

11. Again got 15fps and 10mbps

12. I was sad :(

Should I install CM7 again and this time just flash the fullhdmod? Would that help?
[LG Optimus 2x] jackdowsan:
I am on a G2X btw..
[LG Optimus 2x] LeJay:
As mentioned a few posts earlier, some people are not getting 1080p at 30fps and I don't know why.

I'd recommend going with 720p at 20mbps. If you know android/java programming, I put up the source code to play around with, maybe there's an easy fix for those with your issue.

Which baseband, cwm version and where did you buy the phone? (trying to pinpoint any patterns).

EDIT: Didnt see your last post, i guess ur from the us, then?
[LG Optimus 2x] pastime1971:
@ pa.pn2

a similar patch was already submitted, verified, and approved (yet to be merged) http://review.cyanogenmod.com/#change,6315

it fixes volume zoom in camera mode. (volume zoom in video is not supported in there.)

another issue with our camera app is that it crashes if one tries to change preferences while shooting video.
[LG Optimus 2x] jackdowsan:
Well I am not so much into java/android, but here are my phone details

running on: CM 7.1.0RC1-g2x

baseband: m6600a-scauntz-2.0.9720t 1 [mar 27 2011 10:00:00] mp:trulge_08.09.02r_mdm

Kernel: 2.6.32.41-cyanogenmod shade@toxygene #1

Build: GRJ22

Would be great if you can somehow make a fix for me,I am sure lots of people would get benefited :)
[LG Optimus 2x] petyo.tsanov:
running on: cm7 rc1

install first FullHDmod_mid1.0-signed.zip

after replace camera.apk with Autofocus1.1-signed.zip

Auto F working only on 1080p recording

1080p record of 7260 kbps ? not 17mbps

720p record of 4084 kbps ? not 12mbps

Picture quality is very low? 8mpx size of the pictures is ~ 1 - 1.5mb ? ( stock 8mpx ~ 3-5 mb) ?
[LG Optimus 2x] vitaminxero:
Bug in these the bitrate mods cause the FFC to be rotated upside down (180 degrees, or 1 pi radians =P) in latest CM7.1 RC1
[LG Optimus 2x] pastime1971:
Change Ifcf5786f: Enable 1088p at 30fps recording on LG optimus 2x and T-Mobile G2x

@LeJay,

dear lejay,

are you the one who submitted that change at http://review.cyanogenmod.com/#change,5743

it looks like your work to me. (if not, i'm terribly sorry.)

i think i found a typo in src/com/android/camera/CameraSettings.java

line 545, params.set("nv-sensor-mode", "3264x1224x30");

shouldn't it be params.set("nv-sensor-mode", "3264x2448x30");

could that be a reason it didn't work (for some people) ?
[LG Optimus 2x] LeJay:
I was playing around with different settings and just stayed with what worked. I did test "3264x2448x30" and it still works. Dont know if it will help those with issues, though. It might give ever so slightly better picture, though.

@ vitaminxero

As the mod replaces the Camera.apk, any fixes that has been added to cm7s camera app since i made it will be removed. I'll consider an updated version.
[LG Optimus 2x] pastime1971:
you are right. it doesn't seem to make any difference if i put "3264x2448x30", or "3264x1224x30", or "1920x1088x30". i always get 30 fps at HD setting. this is great, lejay.

p.s. it seems that i lost zoom menu. weird...
[LG Optimus 2x] vitaminxero:
Ah that explains it! I'll keep my eye out for a possible update then!
[LG Optimus 2x] jackdowsan:
Yea, please see if you can roll out an update, that would be great! may be it will fix my issue too :)
[LG Optimus 2x] petyo.tsanov:
@LeJay

Is it possible to replace "Low"-option (176x144@400kbps) video quality to (720x480@2-3mbps) ?
[LG Optimus 2x] petyo.tsanov:
+ front facing camera not working correct... (image is inverted)
[LG Optimus 2x] pastime1971:
not a bug. that is because cm recently changed FFC handling in nightly #59. http://review.cyanogenmod.com/#change,6361

lejay's mod was compiled before that change, and it just needs to be re-compiled.
[LG Optimus 2x] pastime1971:
it is my understanding that resolution/bitrate is only saved in /system/etc/media_profiles.xml. for example, if you unzip bitratemod.zip, it only contains that file. that specific part reads

######################################################

<EncoderProfile quality="low" fileFormat="3gp" duration="30">

<Video codec="h264"

bitRate="384000"

width="176"

height="144"

frameRate="30" />

<Audio codec="amrnb"

bitRate="12200"

sampleRate="8000"

channels="1" />

</EncoderProfile>

######################################################

it's pretty straightforward to read what it means.

you can adb-pull it, change it to your flavor, and push back in.

that gives me an idea. maybe someone can write an app that you can select one of many configurations (let say, high, medium, low resolution/bitrate) on the fly not by flashing.

that would be convenient.
[LG Optimus 2x] petyo.tsanov:
@pastime1971 in /system/etc/media_profiles.xml , i edited "media_profiles.xml"

<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="2000000"
width="720"
height="480"
frameRate="30" />

but video record is 176x144@384kbps :(
[LG Optimus 2x] pastime1971:
@lejay

if i add params.set("nv-sensor-mode", "3264x2448x30"), i lose zoom menu in video mode.

did you experience that as well ?

edit: never mind. it's not that. it's preview. i changed the preview size to "800x480" and it's fixed.

p.s. even in cm nightly, when you change quality to "High" which happens to be "1280x720", zoom menu disappers, and it comes back at 1920x1088 or 720x480. i do not understand why, but it seems 1280x720 is causing some issue. since o2x display is 800x480, i figured it wouldn't need more than that in preview, but it may cause some lag when it starts recording and changes resolution ? (any comment welcomed...)
[LG Optimus 2x] pastime1971:
yes, i confirm that.

you have to reboot the phone for that setting to be effective, it seems.

(you might want to increase the audio setting as well...)

try reboot yours.

p.s. there goes my idea of an app of changing it on the fly. unless someone can enlighten me, it will have to be flashing/adbing and restart phone. i'm a noobie, and i don't know how /system/etc/media_profiles.xml is loaded.
[LG Optimus 2x] petyo.tsanov:
after reboot the phone is working ^_^ thanks :)
[LG Optimus 2x] pastime1971:
you're welcome, but don't thank me. thank lejay. he is the one who did all the work.

i just interpreted his work.
[LG Optimus 2x] jackdowsan:
I checked the media_profiles.xml under astro file manager, I did the mod, and it says 30fps and 20mbps in this file also, still I get 15fps and 10mbps...whats wrong?

Also, should I edit the file to say 60fps and 40mbps to see if it works at half of it like before?

and I mean changing it via editor in astro manager file phone is on and I can then restart it, would it work?
[LG Optimus 2x] petyo.tsanov:
I found a new bug... immediately after the video recording(without close camera.apk), i take a photo and "quality drop" ?
[LG Optimus 2x] pastime1971:
sorry, maybe you are one of those unlucky.

it is known that it works for some and not for others.

i believe doubling spec won't work. it's just that 30fps mod is not working for you for some reason.
[LG Optimus 2x] petyo.tsanov:
with stock cm-camera this trick not working... i dont know why :confused:
[LG Optimus 2x] pastime1971:
could you elaborate a bit more ?
[LG Optimus 2x] jackdowsan:
May be if I change it to say 29fps and 19mbs? Any chance that would work, also you were talking about some update with the new cyanogen RC rom, would it effect something?

I am thinking of tweaking the xml file and packing it again in that zip and flashing it. Should I do something else also to include changes to RC or something.
[LG Optimus 2x] pastime1971:
first of all, this is camera app that has lejay's work.

i just recompiled for nightly 61 (with a minor debugging that i saw)

second, this is a kang-testing, not final nor official nor ....

but if you want to try it, here is a link http://www.mediafire.com/?crogcj4in8des5t

flash it from CWM recovery.

it works for me.

my debugging is as follows:

fixed zoom menu disappearing at 1280x720 preview (typically quality high)

disabled changing preference while recording video to avoid crash

fixed volume zoom to be gradual (also in video mode)
[LG Optimus 2x] pastime1971:
it was my impression that lejay's mod worked for some units and not for others. and devs at cm couldn't figure out why. but it is not the configuration (media_profiles.xml) problem.

the way i understand lejay's mod, it's probably has nothing to do with those changes in RC rom. i'm guessing it's probably libnvmm_camera.so, which is proprietary.

edit: the change i mentioned was the orientation of front facing camera. if you have nightly later than 51 or so, and use lejay's mod, FFC images are inverted.
[LG Optimus 2x] jackdowsan:
It will also work for the g2x, right? I have the g2x, I will try this straight away and post the results.
[LG Optimus 2x] pastime1971:
please do, cuz i have O2X, and no way to test it.

but i'm guessing it should ? as long as it has the same cameras ? (lots of question marks...)
[LG Optimus 2x] jackdowsan:
Alright doing it right now, will post back in 5 mins max.
[LG Optimus 2x] jackdowsan:
I got 15fps and 8.8 mbps :(
[LG Optimus 2x] jackdowsan:
and I tried changing it to 40mbps and 60fps in your file but got installation aborted from clockward recovery..lol

so there must be more to it then changing the xml.
[LG Optimus 2x] pastime1971:
sorry. i guess maybe G2X is different after all.

this is 3 sec video that i just shot. http://www.mediafire.com/?rhenirilcerquc6

fedora totem reports 30fps, but i didn't really check it.

mplayer reports 1000fps, so useless.
[LG Optimus 2x] jackdowsan:
I guess It will never work on my g2x...that just sucks..
[LG Optimus 2x] pastime1971:
sorry to hear that...

maybe someone with G2X can help you.
[LG Optimus 2x] pastime1971:
better volume zoom handling by the other person is finally merged to cm...
[LG Optimus 2x] LeJay:
Yea, you probably need to re-sign the zip. The easy way to play around with it is to use adb push (remember to mount system as read/write first)

EDIT:

Alternatively, you can delete everything in the META-INF folder EXCEPT the com folder, make your changes and use AndroidSigner to resign the zip (it's basically drag and drop):

http://forum.ppcgeeks.com/android-development/126517-pc-ppcgeeks-android-apk-zip-signer.html
[LG Optimus 2x] jackdowsan:
Thanks for the link LeJay

I am trying to get it signed, but It throws an error saying

The System cannot find the file specified.

I am attaching the file that I am trying to sign. (Its pastime's file with values changed in xml for 40mbps and 60 fps.)

Can you sign it and up it for me please :) , I will try this with the latest RC of cyanogen rom and see if it changes anything.
[LG Optimus 2x] LeJay:
I just signed it as you gave it. Strange you got an error, maybe java is not set up correctly?
[LG Optimus 2x] jackdowsan:
Thanks :)

I installed it and took a video...no luck, I am getting 12mbps and 14fps...

there has to be someway to make it work...
[LG Optimus 2x] LeJay:
The initial reason for 1080p@30fps was not working for me on CM7 was that the sensor was set to 3264x2448x15 by default. That is, the sensor is only capturing in 15fps.

Even though it's not listed as a supported parameter by the camera I set it to 3264x1224x30. It would accept the new settings, however whenever I started to record it would reset to 3264x2448x15. After trying lots of random things, I changed the preview resolution (the video you're seeing on screen as you're recording) from 1600x1200 to 1280x720. For reasons I don't understand, this actually solved the problem.

Looking at the logcat from people who still record in 15fps I can see that this is exactly what is still happening, even after the changing the preview resolution.

It's really hard to debug this because, (a) I cannot reproduce this and (b) I dont have the source code for all the proprietary stuff.

My best bet at a quick fix is to play around with preview resolution.
[LG Optimus 2x] pastime1971:
that about sums it up....

since it works on mine, i can't debug the issue, either.
[LG Optimus 2x] jackdowsan:
Where can I access and change the preview resolution?
[LG Optimus 2x] LeJay:
You have to do that in source code (CameraSettings.java).
[LG Optimus 2x] jackdowsan:
You mean the code that complies the camera.apk file? Where is that code?
[LG Optimus 2x] LeJay:
The source code for the camera mod is here:

https://github.com/LeJay/Camera

However, it depends on stuff in CyanogenMod 7, so you basically need to set yourself up to building cm7, then replace the Camera folder (system/packages/apps/Camera) with mine.

If you're on linux, the lazy way of getting yourself set up for cm7 is this script:

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

It's going to take some hours for everything to download, though.

EDIT: btw. you dont need to compile all of cm7, just write "make Camera" while in system folder.

EDIT2: Only do this if you'll think it'll be fun, it's going to be quite a bit of work.
[LG Optimus 2x] pastime1971:
@ jackdowsan,

maybe i could try and build for P999, but i need proprietary files.

can anyone upload it ?

if you don't have cm7 source set up, i prepared a bash script that extract them and put it under "vendor" under your current directory. (linux only)

http://www.mediafire.com/?l883vkugnk045ek
[LG Optimus 2x] pastime1971:
it is fun ... :)
[LG Optimus 2x] jackdowsan:
Alright :)

Which files do you need? I am on windows, let me know which files you need and I will upload. :)
[LG Optimus 2x] pastime1971:
if you open that bash script, it adb-pulls a bunch of files.

it would be quite laborsome if you try to do it manually.

i will post it on G2X forum and see if anybody else can upload it.
[LG Optimus 2x] LeJay:
I flipped a few things around at random. I have no reason to think it should help, but if you have time, give it a try.
[LG Optimus 2x] jackdowsan:
I got 14fps and 7mbps with this..but thanks for trying :)
[LG Optimus 2x] pastime1971:
i come to think that maybe P999 cm7 is run differently.

in the init.rc for P999, it starts /system/bin/mediaserver as service

init.rc for P990 doesn't have that.

i have no idea if it makes any difference or not though.

it is weird because i thought P999 only differs in radio and filesystem. maybe not...
[LG Optimus 2x] pastime1971:
no dice

nobody answered my request for P999 proprietary files over G2X forum.

must be that user base is smaller, considering G2X is only available in US ?

@jackdowsan, sorry about that.
[LG Optimus 2x] jackdowsan:
I wil try and run that bash file tomorrow through linux live cd, would I need to install adb drivers before I can run that script?
[LG Optimus 2x] petyo.tsanov:
@jackdowsan try to manually install @LeJay mod with root explorer?
[LG Optimus 2x] pastime1971:
@jackdowsan,

no need.

i just remember that koush had uploaded proprietary files for both P990 and P999.

i had them all along.... (well, my memory doesn't serve well....)
[LG Optimus 2x] pastime1971:
comparing p990 and p999 in cm7, libcamera.so is identical. libnvmm_camera.so is NOT.

that might explain why it doesn't work on p999 ?

md5sum's are

94354279e06ff152e3a1f003243c1f7b *p990/out/target/product/p990/system/lib/libnvmm_camera.so

cd168deaae525494ba2e833881917ac0 *p999/out/target/product/p999/system/lib/libnvmm_camera.so

077017695de40c931e00c4d661e1536c *p990/out/target/product/p990/system/lib/libcamera.so

077017695de40c931e00c4d661e1536c *p999/out/target/product/p999/system/lib/libcamera.so
[LG Optimus 2x] Xargon321:
now the big question is can they be interchanged? i know the roms can be used from the p990 to p999 but if you do the baseband is changed and you brick youre radio chip and you cant get a signal but the phone is till functional
[LG Optimus 2x] bmann_420:
Oi vae, i was super stoked when I started reading this thread, then hopped onto page 8 and read until now, and not so much.. lol I have a G2x myself, got linked from another thread and realized i was in an O2x section! But the 'camera' threads over their are not as popular by any means sadfully. If this can be uniformed for cm7 (I use 7.1 rc) on the G2x, that would be fenominal! Thanks for all the effort regardless :D

The camera was the main reason I bought this phone, besides the stock 2.2 froyo of course easily modded. But the camera is very nice, and cm7's camera, eh.