G4 Camera Mods FPS [MM]

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
in system/etc/camera_config.xml

look for
Code:
 <item name="video_size_rear_supported">
            3840x2160,
			[email protected],
            1920x1080,
            1280x720,
            [email protected],
            640x480,
            320x240,
            176x144
        </item>
change it to

Code:
 <item name="video_size_rear_supported">
            3840x2160,
			[email protected],
            1920x1080,
            1280x720,
            [email protected],
            640x480,
            320x240,
            176x144
        </item>
in /system/etc/media_profiles.xml
look for
Code:
minFrameRate="15" maxFrameRate="120"
change that to 240
in camera id 0 look for 1080 change frame to 90 | look 4kuhd change that to 60 or raise value by like 5 like say 35 fps 40 fps till it maxes out somewhere

if you open the lib with hex editor like hex workshop search for int16 value 6144 it will show all the resolutions

6144 is the Number of horizontal lines the number next to it is vertical the 4 bytes before it are active pixels w x h

Capture res example
HEX
Code:
C014 AC0B 0018 E00B 402E7021 0018BF1E 01000000 00000040 713DF041 01
aW aH W H Pixel Clock Output Clock Binning Min Fps Max Fps Sensor Mode
DEC
Code:
5312 2988 6144 3040 561000000  515840000           1             2              30.03                1
Pixel Clock = W * H * Max Fps
Output Clock When Not in HFR Mode = Pixel Clock it limits actual fps. When in HFR mode = Pixel Clock / 2

Sensor Mode 1 = Normal 2 = HFR 3 = HDR

G4 Video Res runs at Full sensor res @ 30 fps reducing aW aH W H to say 3840 2160 6144 2190 would let the G4 Gain more FPS in UHD Mode thats how i got 32fps UHD on OG SD800 i reduced the H value from 2219 to 2170.

so if you want to achieve 240fps without pushing device a aW/8 aH/8 W H/8 Max FPS * 8
this would give a guaranteed 240fps
Code:
664  373 6144 380 561000000  515840000  1 2 240.24 1
All that is needed is a camera 2 app that lets you set custom res and fps for video then you can play with these values

Output Clock is what limits the fps i dunno what the SD808 maxes out it could be higher than the default 515K

Hopefully the camera_config.xml mod method works for the stock camera
 

pikachukaki

Senior Member
Jan 27, 2012
5,041
2,746
253
Thessaloníki, Greece
in system/etc/camera_config.xml

look for
Code:
            3840x2160,
[email protected],
            1920x1080,
            1280x720,
            [email protected],
            640x480,
            320x240,
            176x144
change it to

Code:
            3840x2160,
[email protected],
            1920x1080,
            1280x720,
            [email protected],
            640x480,
            320x240,
            176x144
in /system/etc/media_profiles.xml
look for
Code:
minFrameRate="15" maxFrameRate="120"
change that to 240
in camera id 0 look for 1080 change frame to 90 | look 4kuhd change that to 60 or raise value by like 5 like say 35 fps 40 fps till it maxes out somewhere

if you open the lib with hex editor like hex workshop search for int16 value 6144 it will show all the resolutions

6144 is the Number of horizontal lines the number next to it is vertical the 4 bytes before it are active pixels w x h

Capture res example
HEX
Code:
C014 AC0B 0018 E00B 402E7021 0018BF1E 01000000 00000040 713DF041 01
aW aH W H Pixel Clock Output Clock Binning Min Fps Max Fps Sensor Mode
DEC
Code:
5312 2988 6144 3040 561000000  515840000           1             2              30.03                1
Pixel Clock = W * H * Max Fps
Output Clock When Not in HFR Mode = Pixel Clock it limits actual fps. When in HFR mode = Pixel Clock / 2

Sensor Mode 1 = Normal 2 = HFR 3 = HDR

G4 Video Res runs at Full sensor res @ 30 fps reducing aW aH W H to say 3840 2160 6144 2190 would let the G4 Gain more FPS in UHD Mode thats how i got 32fps UHD on OG SD800 i reduced the H value from 2219 to 2170.

so if you want to achieve 240fps without pushing device a aW/8 aH/8 W H/8 Max FPS * 8
this would give a guaranteed 240fps
Code:
664  373 6144 380 561000000  515840000  1 2 240.24 1
All that is needed is a camera 2 app that lets you set custom res and fps for video then you can play with these values

Output Clock is what limits the fps i dunno what the SD808 maxes out it could be higher than the default 515K

Hopefully the camera_config.xml mod method works for the stock camera
@defcomg I edit the two xml files now i will see what it can capture...but i dont have the knowlage to edit the so file...you seem to have it so edit it if you want and have the time and release a flashable zip to test it if you dont have the device

 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
@defcomg I edit the two xml files now i will see what it can capture...but i dont have the knowlage to edit the so file...you seem to have it so edit it if you want and have the time and release a flashable zip to test it if you dont have the device

might require apk mod or a camera app which lets you set fps i think L camera let you do that
 

Tomek33

Member
Sep 29, 2015
21
13
0
Im interested in testing this with my G4 but i am on LP 5.1 to get root without unlocking bootloader. I am still able to copy your file? or this file is different on LP and i need MM to test it?
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Im interested in testing this with my G4 but i am on LP 5.1 to get root without unlocking bootloader. I am still able to copy your file? or this file is different on LP and i need MM to test it?
i need libmmcamera_imx234.so from your rom then i can change the same values as on MM

also in theory if i kill UHD res i could make FHD run at 75 fps
 

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
240 fps on HD resolution would be fantastic!!!:D
the 808 is unable to pull 240fps and yes the 5X is capable because it has to pull less Horizontal lines

Cap is 6.95 Gbps / 579,010,560 clock +/-
so
for 240 fps
12.92Gbps / 1,076,428,800 clock

so far ive seen g4 max out 124fps

Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 124.035 fps
Minimum frame rate : 107.143 fps
Maximum frame rate : 127.841 fps
from another imx234 device it has 240 fps 640x360
 

pepo930

Senior Member
Dec 5, 2012
306
115
43
Can you try recording in 4096x2160 24fps?

Today I tried FilmicPro and it managed to record video in 4096x2160 although it was buggy.
I tried modding media_codecs.xml media_profiles.xml and camera_config.xml so that the stock camera app does it however once I start video recording it crashes.
 
Last edited:

defcomg

Senior Member
Dec 10, 2006
3,852
3,297
0
30
Can you try recording in 4096x2160 24fps?

Today I tried FilmicPro and it managed to record video in 4096x2160 although it was buggy.
I tried modding media_codecs.xml media_profiles.xml and camera_config.xml so that the stock camera app does it however once I start video recording it crashes.
buggy?