PkmX / lcamera

A camera app using the new camera2 API in Android Lollipop
1.28k stars 220 forks source link

Feature Request (Nexus 6 1080p 60FPS) #122

Open jerzyiroc opened 9 years ago

jerzyiroc commented 9 years ago

Any chance of 1080p 60FPS for the Nexus 6?

PkmX commented 9 years ago

In theory, the Nexus 6 should be able to support 60fps recording with the new high speed video recording API, and therefore library hacks like the ones we have on N5 is not needed. However, I don't have a Nexus 6 to test, and it seems that this feature is not enabled on N6 as well.

jerzyiroc commented 9 years ago

Thank you very much for the reply. I more than willing to test anything if you'd like to try some things to get 60fps on the Nexus 6. Also, the Nexus 6 exposure time seems to only go to 1/2 second. Is this a hard coded limitation of the camera driver?

On Thu, Jan 15, 2015, 12:26 PM PkmX notifications@github.com wrote:

In theory, the Nexus 6 should be able to support 60fps recording with the new high speed video recording API, and therefore library hacks like the ones we have on N5 is not needed. However, I don't have a Nexus 6 to test, and it seems that this feature is not enabled on N6 as well.

— Reply to this email directly or view it on GitHub https://github.com/PkmX/lcamera/issues/122#issuecomment-70124971.

iRub1Out commented 9 years ago

Has there been any work on this for the N6? I will gladly give you any files you need to make changes - testing - whatever it takes to get this ability.

Google really has a POS camera app, and for whatever reason no Apps that CAN do it allow the hardware to actually work - so please, I will do whatever I can to get this going.

stephenstud commented 9 years ago

I would be happy to help also. I have a Verizon 32gb, and a T-Mobile 64gb. I only use the 64gb on Verizon, but at least thats 2 rom versions:)

Nixola commented 9 years ago

I'd help testing as well, but it looks like development stopped months ago...

nathan-osman commented 8 years ago

I have a Nexus 6 running 6.0.1 and I would love to see this happen. I found the following shared libraries in /vendor/lib/:

According to Wikipedia, the Nexus 6 has a Sony IMX214 - the same sensor as the OnePlus One. According to the spec. sheet, it has the capability to shoot at 1080p @ 60fps.

I tried grabbing the libmmcamera_imx214.so library from the OnePlus build and dropping it into /vendor/lib but that didn't work. I opened the original file in http://disassembler.io and was able to find the location in .data containing the pixel array size (0x4168 for the width and 0x416c for the height). However, I'm having trouble locating the configuration struct and the active pixel array size appears nowhere in the file.

Any help would be greatly appreciated.

nathan-osman commented 8 years ago

I finally found the section of libmmcamera_imx214.so that contains the camera modes. The first one seems to be the one Android uses. The information (at offset (0x5414) is as follows:

Active pixel width: 4208
Active pixel height: 3120
Pixel array width: 5008
Pixel array height: 3190
Sensor timing: 480000000
Output timing: 465000000
[8 bytes]
FPS: 30
[16 bytes]

I've tried plugging in different numbers here. I used the numbers provided later in the file. I used the numbers from the OnePlus library. I made up numbers. Each time, one of the following happened:

Does anyone have any idea what else I could try?

PkmX commented 8 years ago

Have you tried what the patcher for IMX179 does, i.e. halve both the height and output timing, and double the fps?

FluorescentHallucinogen commented 8 years ago

Try https://github.com/troop/chromatix_hex_wrapper

nathan-osman commented 8 years ago

@PkmX I tried halving the active pixel heigh, the active array height, and the output timing and doubling the maximum FPS values but it didn't work ("unable to open camera"). I also tried adjusting the pixel array size in an earlier spot in the file, but that didn't help.

If I change only the maximum FPS, I can select the 1920x1080@60fps mode in lcamera but, of course, it only records at 30fps.

@FluorescentHallucinogen this struct seems to match what I find in the file but I haven't had any luck changing the values.

digitalcircuit commented 8 years ago

@nathan-osman The 60/120 fps modification for the Nexus 5 crops the sensor output to a corner rather than using pixel binning/grouping as (I imagine) the One Plus does. Perhaps LCamera or something elsewhere in the path of the Camera2 API needs modified?

I have a Nexus 6 and I'd be willing to help test, but I unfortunately don't know any of the technical details with camera modifications. Official documentation would greatly help, and however doubtful I may try the One Plus forums to see if any engineers would be able to offer a pointer in the right direction.

defcomk commented 8 years ago

Any nexus 6 users add me on telegram @ defcomk I would like to get 60fps working on it