General Deleted - Realme GT 2

Deleted

Hi! I've tested the mod but it's not working, bitrate is still at 96, test with "media info" from Google play...
I think you need to modify the file from /odm/etc/, those from vendor are not used by android anymore. Check my magisk module regarding what files I've changed and how I've did it, here: https://forum.xda-developers.com/t/...-recording-quality-mod-magisk-module.4587667/
I will also include a higher bitrate, it helps a little, but I'm more focused on reducing the white/static noise and tuning the equalizer...
Keep up the good work!

I test it with stock RUI C10 EU, with stock camera on 4K 60FPS but again the bitrate is 96kbps.

Thanks for letting me know I'll try to do some more revisions on this

Temporary removing file to prevent further problems for people

Related

[MOD][CAM] [email protected]@20mbps + auto-focus on CM7

EDIT: [email protected] has been added to nightly and bitrate has been set to 12mbps which is not that bad. Its hence not recommended to flash these anymore. If you want higher bitrate look in the thread for those. I think it was pastime who made them. Alternatively use root explorer to manually edit /etc/mediaprofiles.XML. again, read pastimes and related posts in the thread on that.
This will replace the Camera.apk from CM7 with a more tegra2 friendly version that enables [email protected] recording. There's also included an updated media_profiles.xml file that'll enable different bitrates. Choose wisely . To test the bitrate I recommend having it running for at a minute to make sure everything can keep up. Usually it starts out smooth and then starts stuttering as the ram gets filled up. I also upped the quality for still.
Videos (I'll add experimental stuff as well, such as ultra high bitrates and auto focus):
http://www.youtube.com/user/O2XdevVids
I would stay away with 64mb ram hacks for the time being. Maybe we can find some middle ground in the future .
Anyway, please give me feedback on how it works. Some beautiful videos would be nice. Weather is really depressing here.
Please don't use this for non-tegra 2 devices.
Also, I'm experimenting a lot. Expect a lot to be buggy. I do my best not to put something out that doesn't work, but a couple of runs is really the extend of my testing before it goes up (to be honest). The autofocus-mod is seriously buggy. The bitrate-mod should be pretty much as buggy as the std. cm7 Camera app.
And, of course, thx to all the great ppl who works on cm.
------------------------------------------------------------
Source code (just the 1080p mod):
https://github.com/LeJay/Camera
Versions & Changelog & TODO
--------------Autofocus1.1----------------- (Note this is horribly buggy)
Just adds auto focus (and 25/30fps if you're on nightly), no change to bitrate. Flash this AFTER you do the bitrate mods. Flashing with any of the bitrate mods will replace the Camera app and you'll lose autofocus.
----------------------------------------------
--------------FullHDmod 1.0---------------
->Video:
HD: [email protected]@20mbps
High: [email protected]@12mbps
----------------------------------------------
--------------FullHDmod_high 1.0---------- (works for some, requires fast sd card)
->Video:
HD: [email protected]@26mbps
High: [email protected]@12mbps
----------------------------------------------
--------------FullHDmod_mid 1.0---------- (Recommended)
->Video:
HD: [email protected]@17mbps
High: [email protected]@12mbps
----------------------------------------------
--------------FullHDmod_low 1.0----------
->Video:
HD: [email protected]@14mbps
High: [email protected]@12mbps
----------------------------------------------
--------------FullHDmod_LG 1.0---------- (It's the settings used as stock LG... except for 1080p being 30fps)
->Video:
HD: [email protected]@9mbps
High: [email protected]@4mbps
----------------------------------------------
----------BitrateMod(720p only)---------- (Does not replace Camera.apk. Works for 64mb ram hack, until we find other solution)
->Video:
HD: [email protected]@20mbps
High: [email protected]@10mbps
----------------------------------------------
All audio is 128 kbps and all stills are:
Super fine: 100
Fine: 90
Normal: 80
--------------------------------CHANGELOG----------------------------------------
1.0 Initial release.
---- Small bugfix of CM7s camera app + tegra 2 specific stuff.
1.1-pre-alpha
---- Enables autofocus prior to video capture. Cannot be turned off(I don't do UIs,lol). Need to restart app for each video.
Autofocus 1.1
---- No need to restart app.
Known issues:
Does no longer auto adjust for exposure while recording. In between recordings it will auto adjust again. (I have no idea why).
Cannot disable autofocus (have no idea how to do UI).
Rather buggy, lots of freezes. For best results, don't push it. Ie. don't start and stop recordings rapidly, stuff like that.
Don't switch quickly to video when opening app... I think that might be a cm7 issue.
---------------------------------------TODO----------------------------------------
Touch to focus.
continuous auto-focus.
FAQ
Q: Does this work for non-CM7 ROMS?
A: Probably not. Certainly not froyo. But feel free to try and let me know. On stock rom-based builds, please look at somemadcaaant's awesome work at http://forum.xda-developers.com/showthread.php?t=1090785.
Q: T-Mobile LG G2x support?
A: Yes.
Q: What are the disadvantages?
A: Larger filesize. Takes longer to save (give it time to save before doing anything else with the phone). Potential issues with playback on phone.
Q: Does this work with 64 mb ram hack?
A: No. You can still use a high bitrate 720p mod for that kernel, though.
Q: It stutters after a few secs of recording or freezes once in a while, why is this?
A: Your phone/sdcard is having issues trying to keep up. Try a lower bitrate mod. If there is no lower, ask for one. I'm experimenting a little myself, trying to find a stable bitrate.
Q: If I open the Camera app and very quickly change to video I get a black screen?
A: Don't do that. I get the same bug on std. cm7 Camera app.
Q: Isn't it overkill with an FAQ for a camera mod?
A: Yes. But people kept asking the same questions last time I made a thread.
THX so much I will test it and report.
i would also add "touch to re-focus during video capture"(like in htc's) to the to-do list
Tegra 2 is some impressive hardware.... bitrate goes up crazy high. I'll add some different versions, but do people have any thoughts on what kind of bit rates they'd like to see?
Damn, I think maybe my sdcard cant keep up with the ultra high bit rates I'm testing. Starts stuttering after 10 sec. Maybe someone out there with a class 10 card?
When switching on video mode, i get a black screen and FC afterwards.
ranrick said:
When switching on video mode, i get a black screen and FC afterwards.
Click to expand...
Click to collapse
I purposely made my tweaks so code is first running when you actually start recording... If it's a new problem it's because of the settings file.
Tried restarting the app?
Work great for me on Kang today buid !
gregman26 said:
Work great for me on Kang today buid !
Click to expand...
Click to collapse
Great news.
LeJay said:
I purposely made my tweaks so code is first running when you actually start recording... If it's a new problem it's because of the settings file.
Tried restarting the app?
Click to expand...
Click to collapse
I reinstalled. Thereafter i was able to start it. But Recording doesn't work so far.It starts at 720P but when ending the recodring, I get a FC. 1080p keeps black screen and no FC and no recording. Maybe because of the 64MB RAM hack in the vorkKernal.
Thanks LeJay
But i have a bug.... The video is lagging(I think my Sd Card is Class 2), so i think it is because of the high bitrate. And sometimes after shooting a video the camera just freezes and i have to pull the battery..
LG O2x, Latest Kang, stock kernel.
ranrick said:
I reinstalled. Thereafter i was able to start it. But Recording doesn't work so far.It starts at 720P but when ending the recodring, I get a FC. 1080p keeps black screen and no FC and no recording. Maybe because of the 64MB RAM hack in the vorkKernal.
Click to expand...
Click to collapse
Okay, so it officially doesn't work with the 64 mb ram hack. Not surprising. You can enable high bitrate 720p with some of my other mods.
TattooHtc said:
Thanks LeJay
But i have a bug.... The video is lagging(I think my Sd Card is Class 2), so i think it is because of the high bitrate. And sometimes after shooting a video the camera just freezes and i have to pull the battery..
LG O2x, Latest Kang, stock kernel.
Click to expand...
Click to collapse
Isnt that the case with cm7 nightlies and 1080p recording?
Can someone up a vid?
TattooHtc said:
Thanks LeJay
But i have a bug.... The video is lagging(I think my Sd Card is Class 2), so i think it is because of the high bitrate. And sometimes after shooting a video the camera just freezes and i have to pull the battery..
LG O2x, Latest Kang, stock kernel.
Click to expand...
Click to collapse
Hmm... I just recorded for 1 min straight with no issue. I do get similar issues on som2e of the higher bitrates I've been toying with(40mbps can make most sd cards cry). Does it start lagging as soon as you start recording?
I'm going to make higher and lower bitrate versions.
Works beautifully on the G2x as well. Thanks
@LeJay: you should contact arcee to include your mod in CM tree
TattooHtc said:
Thanks LeJay
But i have a bug.... The video is lagging(I think my Sd Card is Class 2), so i think it is because of the high bitrate. And sometimes after shooting a video the camera just freezes and i have to pull the battery..
LG O2x, Latest Kang, stock kernel.
Click to expand...
Click to collapse
Could you try the low bitrate mod?
Works grat! 40 sec of video went from 18mb to 99mb. Now that we need a fast memory isn't better to use the internal memory?
buch85 said:
@LeJay: you should contact arcee to include your mod in CM tree
Click to expand...
Click to collapse
Agreed.
LeJay, I also think that you should contact Ricardo (arcee) and see if he can merge you changes. He just changed from 1080 to 1088 the other day in the .xml file so we can record 1080p nativly. Kinda wierd that you have to set it to 1088?
The best thing would of course be if he could include all the different modes/profiles for us to freely choose:
"FPS: 15, 25, 30"
"Resolution: 1080p, 720p, ..."
"Bitrate: X, Y, Z"
"Sound: 44 Khz, ..."
etc... because I know my class 2 card can't keep up at the best options. Going to buy me a new one soon though.
Send him a message and see if he's interested. His todo list probably is long though....

[Q] Corrupt photos if larger than 5 MB, using any camera app

Hi,
I'm unrooted, stock V10h.
After noticing that the stock camera photos are very compressed (8MP photos never go above 3MBs) with no option to change that, I installed Camera Zoom FX. All seemed good, but then on a sunny day after taking *lots* of photos, noticed I couldn't view some of them on the phone, although thumbnails were there. Came home, transferred to PC, opened and noticed that the ones the phone couldn't display were corrupted. All of them, had a gray bar at the bottom, some more, some less. Obviously the compressed jpg stream was broken after some point.
Thought it was Camera Zoom FX's problem, because this never happened with the native camera app. Uninstalled.
Still wanting better quality, installed Camera ICS. Great too. But same problem too (on some photos again).
Went on to install Camera MX. Same.
Finally narrowed it down to this:
if resulting photo is > 5MB (more precise: if > 5130 KB) then it's corrupted
(and that's why the native camera doesn't have this problem: there's no way to choose better JPG quality for it to make 5MB photos).
I thought: memory speed problem. But then again, the photos were saved in the phone internal memory. Internal memory is not supposed to have speed problems. Anyway, I tried saving to Class 6 and Class 10 SD card, and the results were the same.
Anyone know about this?
Also, please report if your >5MB pictures are fine (in case you shoot at that quality), and what app you use to take them.
Note: the problem seems to be there with jpg photos in general, irrespective of device. Here's a link of someone experiencing the same photo corruption on a normal camera (Casio EX-F1). The problem with my photos is exactly as in the photo he posts a bit later in the thread.
Ok noone seems to know anything about it.
Could someone at least please report if you can get photos equal to or above 5Mb in size, whatever camera app you are using and whether the photos are ok?
(to get that quality, you must select 8 megapixels and then the highest quality in some other setting. For example camera zoom fx and camera mx have a percentage slider (set it to 100), while camera ICS names the quality (select ultra). Also a steady shot and lots of light is needed for the pictures to go up to 5Mb even in these settings.)
EPa said:
Ok noone seems to know anything about it.
Could someone at least please report if you can get photos equal to or above 5Mb in size, whatever camera app you are using and whether the photos are ok?
(to get that quality, you must select 8 megapixels and then the highest quality in some other setting. For example camera zoom fx and camera mx have a percentage slider (set it to 100), while camera ICS names the quality (select ultra). Also a steady shot and lots of light is needed for the pictures to go up to 5Mb even in these settings.)
Click to expand...
Click to collapse
Just tested with Camera ICS.... Same issue as you. Photo was 5,266,434.00 bytes.
Using V10h Euro Open.
i had the same issue on deodexed ICS i had a week after purchase, and after i installed this mod:
http://forum.xda-developers.com/showthread.php?t=1855818
i tought the mod broke my camera, but i guess it was this bug/limit.
Thank you both for reporting. At least now we know it's an (LG implementation?) android bug.
Really annoying to me, as I would like to use the camera's full potential. Hope this gets fixed in the upcoming JB for 4X.
(although in order for something to be fixed, LG would have to know. And this problem surely hasn't received attention since it seems I am the first one to bring it up).
It would be interesting to see what would happen if someone with v20a tested this.
Yes indeed.
On another note, I also checked GeoCam and sometimes it gives an error (not enough memory or something). The photos that it saves with no problem are maximum < 5 Mb, so I assume it is the same problem. But this app demonstrates that there is a way for the programmer to know that during saving the photo something did not go as expected.
Where exactly the bug lies, is another matter.
EPa said:
Yes indeed.
On another note, I also checked GeoCam and sometimes it gives an error (not enough memory or something). The photos that it saves with no problem are maximum < 5 Mb, so I assume it is the same problem. But this app demonstrates that there is a way for the programmer to know that during saving the photo something did not go as expected.
Where exactly the bug lies, is another matter.
Click to expand...
Click to collapse
i might try the mod in official 4.1 when it's out and someone releases a deodexed version, just to check if it works on JB.
this is quite a strange problem we have on our hands, i did some search on google, and haven't found many similar problems.
Flying_Bear said:
i might try the mod in official 4.1 when it's out and someone releases a deodexed version, just to check if it works on JB.
Click to expand...
Click to collapse
I too am anxiously waiting for the official 4.1 and was hoping that it would not have this problem.. just wishful thinking..
i already know it a long time ago, and i asked about this at the camera MOD thread by ksekhar http://forum.xda-developers.com/showthread.php?t=1855818. but no one seems to bother
iceddeath said:
Ale-xs said:
Hello ksekhar. I found a problem in the LG firmware, it appears in your mod too.
In third-party programs (ICS camera+) and in your camera mod of the compression quality jpeg minimum, maximum file size.
In some conditions, such as the leaves in the sun, the size of the file begins to exceed 5 megabytes. Then the problems start.
This file is written to the error (broken jpeg file). I've been thinking why this is so and finally got it.
In your version, you just increase the compression quality to any situation the file size is not more than 4-5 MB.
Also, if you is not difficult, please do me a version (as we did earlier) which fixes only compression jpeg,
but the quality of compression should be a cross between the standard version and your version.
Or tell me how I myself can change the quality of compression.
For example (like photoshop - compression level from 0 to 12)
Original LG camera - compression 9
Your mod - compression 12
The required - compression 10.
Link to example of broken jpeg file: http://narod.ru/disk/61445464001.4b4c982386ce7c47b2214e33a90a25aa/bug_IMG_20120923_124127.jpg.html
Click to expand...
Click to collapse
i have this problem too
when photo taken exceeds 5MB.. it is broken...and it happened too often. any solutions?
Click to expand...
Click to collapse
Ok, that's bad...
For now, I check whether the thumbnail of the just taken photo appears correctly (inside the photo application). If not, it's a sign the photo has exceeded 5 mb. Then I go to settings, reduce the quality, reshoot.
Or, one can use Camera MX and set the quality slider to 90-95. Then the photos are better than stock camera, and they don't exceed 5 mb.
Since noone cares for this problem I can only hope the new firmware automagically hasn't got this problem. If it does.. we'll see then...
Bad news... Just updated to official V20a, and the same issue persists. a 5.02mb JPEG resulted in an image which was half ok, half greyed out and corrupt.
Only hope now a mod, or a custom ROM..
Ok, is there a way mother LG can be notified about this? (and don't tell me phone support in my country, they can only handle basic stuff. They won't understand what I'm talking about and respond like "use the official camera application"...)
Insomniac535 said:
Bad news... Just updated to official V20a, and the same issue persists. a 5.02mb JPEG resulted in an image which was half ok, half greyed out and corrupt.
Click to expand...
Click to collapse
thanks for the info.
yeah, my country doesn't even have proper support for LG devices. we could try mailing them?
I just noticed this problem yesterday. Is there any fix for this?
lm007 said:
I just noticed this problem yesterday. Is there any fix for this?
Click to expand...
Click to collapse
Not that I know of.
i have no idea why, but yesterday i took some pictures with my 4x (with the stock lg camera app!).
the most pictures had around 1,5-2,5mb , one hat 4,7mb and one 5,05..
the ->5mb pic is corrupt..
never saw this error on stock, im using stock camera app on my CM
Anyway, i reported this bug to CM on the 4X forum, lets see if they can help. would good if more people confirmed this bug on CM forum..
I have a little experience about this bug.
Last time I flashed google's camera 4.2 with photosphere, camera.tegra.so and libnvmm_camera.so (modded to disable denoise filter) and stock camera. The result was that wherever camera I used (stock, cm, google's) the pic were corrupted (taking photos in dark). Just few of them were OK.
Here are modded .so files - works with CM10.1 (made by me, if you want i can made thread for them):
http://db.tt/2Lfxuehq - camera.tegra.so pasted to /system/lib/hw
http://db.tt/LXdwvJUZ - libnvmm_camera.so pasted to /system/lib
Sth more I will say when I come from holidays.

Google/AOSP Camera issue

So this is our main problem.
Logcat says only: bufferitemconsumer: [stagefright-camerasource] failed to release buffer: unknown error -1
It's only related to google and aosp camera. every other cam working without this logcat message.
According to google we got this info:
http://forum.xda-developers.com/attachment.php?attachmentid=3887247&stc=1&d=1474924978
http://forum.xda-developers.com/attachment.php?attachmentid=3887250&stc=1&d=1474925299
Pass metadata in video buffers(HAL1 only). If HAL1 stores metadata instead of real YUV frame data in video buffers, the HAL must not store anything that is invalid across process boundaries, including native handles. If HAL passes native handles in the metadata in video buffers, you must update it to use kMetadataBufferTypeNativeHandleSource as the metadata buffer type and pass VideoNativeHandleMetadata in video buffers.
With VideoNativeHandleMetadata, camera and media frameworks are able to pass the video buffers between processes by serializing and deserializing the native handles properly. If HAL chooses to continue using kMetadataBufferTypeCameraSource as the metadata buffer type, the metadata must be able to be passed between processes as plain values.
Buffer handle address does not always store same buffer (HAL3 only). For each capture request, HAL3 gets addresses of buffer handles. HAL cannot use the addresses to identify buffers because the addresses may store another buffer handle after HAL returns the buffer. You must update the HAL to use buffer handles to identify the buffers. For example: HAL receives a buffer handle address A, which stores buffer handle A. After HAL returns buffer handle A, buffer handle address A may store buffer handle B next time the HAL receives it.
Click to expand...
Click to collapse
What do you think about this?
With media.stagefright.codecremote=false prop the glitch is gone and all working fine on aosp camera (but logcat message still persist). But in google camera still persist a green flickering on video record.
Edit:
So. Preview state is fine, Recording state is fine too. It seems the main problem will be stagefright/omx/encoder.
On marsmallow camera related stuff and codecs was in the same process/mediaserver/. Now on nougat camera service is out from mediaserver and it looks like in the code, all the codecs / video encoder and etc / are gone too to a separate codec process.
kamarush said:
So this is our main problem.
Logcat says only: bufferitemconsumer: [stagefright-camerasource] failed to release buffer: unknown error -1
It's only related to google and aosp camera. every other cam working without this logcat message.
According to google we got this info:
http://forum.xda-developers.com/attachment.php?attachmentid=3887247&stc=1&d=1474924978
http://forum.xda-developers.com/attachment.php?attachmentid=3887250&stc=1&d=1474925299
Pass metadata in video buffers(HAL1 only). If HAL1 stores metadata instead of real YUV frame data in video buffers, the HAL must not store anything that is invalid across process boundaries, including native handles. If HAL passes native handles in the metadata in video buffers, you must update it to use kMetadataBufferTypeNativeHandleSource as the metadata buffer type and pass VideoNativeHandleMetadata in video buffers.
With VideoNativeHandleMetadata, camera and media frameworks are able to pass the video buffers between processes by serializing and deserializing the native handles properly. If HAL chooses to continue using kMetadataBufferTypeCameraSource as the metadata buffer type, the metadata must be able to be passed between processes as plain values.
Buffer handle address does not always store same buffer (HAL3 only). For each capture request, HAL3 gets addresses of buffer handles. HAL cannot use the addresses to identify buffers because the addresses may store another buffer handle after HAL returns the buffer. You must update the HAL to use buffer handles to identify the buffers. For example: HAL receives a buffer handle address A, which stores buffer handle A. After HAL returns buffer handle A, buffer handle address A may store buffer handle B next time the HAL receives it.
What do you think about this?
With media.stagefright.codecremote=false prop the glitch is gone and all working fine on aosp camera (but logcat message still persist). But in google camera still persist a green flickering on video record.
Edit:
So. Preview state is fine, Recording state is fine too. It seems the main problem will be stagefright/omx/encoder.
On marsmallow camera related stuff and codecs was in the same process/mediaserver/. Now on nougat camera service is out from mediaserver and it looks like in the code, all the codecs / video encoder and etc / are gone too to a separate codec process.
Click to expand...
Click to collapse
Have you contacted any of the developers working on Nougat? Maybe they could adress this issue. It's kind of the only issue on our Rom's right now.
There is already some work ongoing around this in CM14.
See current merges: http://review.cyanogenmod.org/#/c/165009/ http://review.cyanogenmod.org/#/c/165008/ http://review.cyanogenmod.org/#/c/165140/
Video recording works with this, however, the camera crashes while saving the video with a "Can't connect to camera" error and the recorded video seems broken (meaning it's very sluggish and some frames seem duplicated).
It will eventually be fixed, as all devices pre-n use HAL1, we just need to be patient.
On the bright side, other applications seem to be working, so whoever needs video, can use those.
morphvale said:
There is already some work ongoing around this in CM14.
See current merges: http://review.cyanogenmod.org/#/c/165009/ http://review.cyanogenmod.org/#/c/165008/ http://review.cyanogenmod.org/#/c/165140/
Video recording works with this, however, the camera crashes while saving the video with a "Can't connect to camera" error and the recorded video seems broken (meaning it's very sluggish and some frames seem duplicated).
It will eventually be fixed, as all devices pre-n use HAL1, we just need to be patient.
On the bright side, other applications seem to be working, so whoever needs video, can use those.
Click to expand...
Click to collapse
Yes i know this.
But just for understand the problem. Google Camera now uses Camera API version 2 (at MM used Camera API version 1), so we need to update the HAL's buffer handle to be able to pass and release buffers between separate processes.
AOSP Camera and CM's Snap uses Camera API version 1, which is fine with our HAL with media.stagefright.codecremote=false prop. It's completely working.
So if @Santhosh M put the prop in the build, CM will be complete.
kamarush said:
Yes i know this.
But just for understand the problem. Google Camera now uses Camera API version 2 (at MM used Camera API version 1), so we need to update the HAL's buffer handle to be able to pass and release buffers between separate processes.
AOSP Camera and CM's Snap uses Camera API version 1, which is fine with our HAL with media.stagefright.codecremote=false prop. It's completely working.
So if @Santhosh M put the prop in the build, CM will be complete.
Click to expand...
Click to collapse
Will do the same
With some kernel related changes/patches now we can use all the camera apps without disabling the remote codecs. Except Google Camera....
Still don't know what causing that green flashes, but this is again one step forward.
@Santhosh M @yashade2001 @ganachoco @Mr.MEX
So guys i was completely wrong
With my last changes to dev-tree/QCamera2 and kernel Aosp Camera2 worked fine without disabling mediacodecs, but was still problem with Google Camera. So my fault was i always tried with GoogleCamera 3.X which was released with N dev preview. But the last N5 officially supported GoogleCamera is 2.7.008, and with that its working completely fine (HDR+ too) :good: No green flashes no glitches, so it's working fully. No need mediaserver and other hacks!
Feel free use it on your builds guys!
Cheers
kamarush said:
@Santhosh M @yashade2001 @ganachoco @Mr.MEX
So guys i was completely wrong
With my last changes to dev-tree/QCamera2 and kernel Aosp Camera2 worked fine without disabling mediacodecs, but was still problem with Google Camera. So my fault was i always tried with GoogleCamera 3.X which was released with N dev preview. But the last N5 officially supported GoogleCamera is 2.7.008, and with that its working completely fine (HDR+ too) :good: No green flashes no glitches, so it's working fully. No need mediaserver and other hacks!
Feel free use it on your builds guys!
Cheers
Click to expand...
Click to collapse
I knew 2.7 worked since long, just that i was figuring out for latest versions
kamarush said:
@Santhosh M @yashade2001 @ganachoco @Mr.MEX
So guys i was completely wrong
With my last changes to dev-tree/QCamera2 and kernel Aosp Camera2 worked fine without disabling mediacodecs, but was still problem with Google Camera. So my fault was i always tried with GoogleCamera 3.X which was released with N dev preview. But the last N5 officially supported GoogleCamera is 2.7.008, and with that its working completely fine (HDR+ too) :good: No green flashes no glitches, so it's working fully. No need mediaserver and other hacks!
Feel free use it on your builds guys!
Cheers
Click to expand...
Click to collapse
This is weird. In Android MM with custom roms like Dirty Unicorns or even in Stock MM provided by Google the Google Camera was working fine and let me to update it on Play Store. That brings a new UI where you can just swipe left and right to switch between photo and video mode.
I just tested the Google Camera that you provided (http://www.apkmirror.com/apk/google...-2130300-30-m-preview-3-android-apk-download/) and it works fine, but the UI is the old one.
Also you get the notification in the Play Store to update it, which brings the new UI and brokes video recording, so I think something is still wrong.
Sadly I can't install MM back to check what google camera version I had since I need to attend important stuff this days with phone. I'm getting a new phone someday next week(in like 1 to 3 days) and I will be able to gladly help you guys to test stuff.
Jaizu said:
This is weird. In Android MM with custom roms like Dirty Unicorns or even in Stock MM provided by Google the Google Camera was working fine and let me to update it on Play Store. That brings a new UI where you can just swipe left and right to switch between photo and video mode.
I just tested the Google Camera that you provided (http://www.apkmirror.com/apk/google...-2130300-30-m-preview-3-android-apk-download/) and it works fine, but the UI is the old one.
Also you get the notification in the Play Store to update it, which brings the new UI and brokes video recording, so I think something is still wrong.
Sadly I can't install MM back to check what google camera version I had since I need to attend important stuff this days with phone. I'm getting a new phone someday next week(in like 1 to 3 days) and I will be able to gladly help you guys to test stuff.
Click to expand...
Click to collapse
It's because from v3 GoogleCamera uses API2. On marshmallow this was fine. Android 7.x's camera framework hardening prevents us from using it without HAL changes or framework hacks.
To sum up google camera version that I use on Nougat
- 2.7.008 hdr+ ok. Video rec ok
- 3.2.045 hdr+ ok. Video rec not ok ( this version is the last for N5 on MM with no issues in video rec)
- 4.1.006 hdr+ not ok. Video recording not ok
Hdr+ not ok meaning no processing done. No difference of output between non hdr+ and hdr+ photos
amnher said:
To sum up google camera version that I use on Nougat
- 2.7.008 hdr+ ok. Video rec ok
- 3.2.045 hdr+ ok. Video rec not ok ( this version is the last for N5 on MM with no issues in video rec)
- 4.1.006 hdr+ not ok. Video recording not ok
Hdr+ not ok meaning no processing done. No difference of output between non hdr+ and hdr+ photos
Click to expand...
Click to collapse
With my latest patches we can go up to 3.1.x.
After a lot of debug, now i'm relatively sure what causing the problem, but i needed to stop development. Because my phone is accidentally dropped into water and now it's dead
Sorry guys
@kamarush
too bad you're one hell of developer like the old days when I was still on xperia mini(Smultron) well hope someone can continue your work
kamarush said:
With my latest patches we can go up to 3.1.x.
After a lot of debug, now i'm relatively sure what causing the problem, but i needed to stop development. Because my phone is accidentally dropped into water and now it's dead
Sorry guys
Click to expand...
Click to collapse
Willing to share? Thanks in advance.
JulianXhokaxhiu said:
Willing to share? Thanks in advance.
Click to expand...
Click to collapse
Just check his github
First of all, we need to port this commit. this would have been my next step.
https://android.googlesource.com/platform/hardware/qcom/camera/+/ecc5ece9eff7c7855faf676881d0aba59c1bd1db%5E!/
Then we can check things further.
It's fixed in Dark's 7.1 CM14.1 ROM. Using 4.2 without issue. Haven't confirmed for sure if HDR+ is working properly, but from the extra delay after taking a shot I'd guess it is.
snives said:
It's fixed in Dark's 7.1 CM14.1 ROM. Using 4.2 without issue. Haven't confirmed for sure if HDR+ is working properly, but from the extra delay after taking a shot I'd guess it is.
Click to expand...
Click to collapse
No it's not. That's only a workaround (hack) for mediaserver and cameraserver.
We can deal with the real problem, as we have the complete source for camera and media/display. Just need a real developer who understand bufferqueue, native_ and buffer_handle_t functions and gralloc. To continue my work.
So, workarounds are not real fixes imo.
kamarush said:
No it's not. That's only a workaround (hack) for mediaserver and cameraserver.
We can deal with the real problem, as we have the complete source for camera and media/display. Just need a real developer who understand bufferqueue, native_ and buffer_handle_t functions and gralloc. To continue my work.
So, workarounds are not real fixes imo.
Click to expand...
Click to collapse
why do u need that?
the latest camera with the latest hal is working!
Sent from my Nexus 5 CAF using Tapatalk
santi1993 said:
why do u need that?
the latest camera with the latest hal is working!
Sent from my Nexus 5 CAF using Tapatalk
Click to expand...
Click to collapse
The point is, we have the whole source. Hal3 can be fixed without "dirty" patches on fw to stay clear the source.
These workarounds completely disables a huge size of the security measures introduced by Google in N.
These only for devices which don't have access to Camera HAL or encoder sources, or has old blobs.
Btw for temporary solution is good, but need to patch up correctly the HAL.

How to edit /etc/media_profiles.xml on Android 10 with Magisk

The fine people at OnePlus hardcoded a maximum audio bitrate of 96000Bps into /etc/media_profiles.xml and even camera apps like Cinema 4k that provide the option of setting a higher bitrate with external microphones are overridden by this standard value.
With Android 10 it seems there is no way to edit this file and have an app read a higher value such as 320kBps.
From what I understand there is a Magisk module that lets you edit build.prop, so I wonder whether there is a way to achieve this with a similar approach?
Same situation here. I need more video bitrate for recording (60fps UHD)
Copy the file to your internal storage, edit it the way you want it and then create a Magisk module to systemlessly replace the file.
Done.

Themes / Apps / Mods Modded camera with improved audio quality for Realme GT2

Since there was no fix, provided by Realme, for the quality of the audio in videos recorded with the stock camera app, and unlocking the bootloader is still not available for the RMX3311 (EU) the only way to improve the audio was to modify another camera app, without loosing stock camera features, like 60fps, stabilization, etc.
So, I've decompiled and modified the GCam port from SHAMIM (SGCAM) and changed the audio source from "Camcorder" to "Voice recognition" (see https://developer.android.com/reference/android/media/MediaRecorder.AudioSource), is not perfect but much better than stock.
I've also included the configuration xml for SGCAM 8.4 with basic settings for Realme GT2 so the quality of photos and videos be similar to the stock camera.
Working (after importing my config xml) :
- Back (main) camera: FHD videos 30/ 60fps, 4k 30fps, image quality equal to stock camera
- Improved sound quality in video recordings for front and back camera
- Front camera 60fps
Not working:
- Slow motion (works partially)
- Aux cameras (wide and macro)
- HDR+ or HDR+Enhanced if activated the colors are bad, inaccurate, too artificial. Can be improved but I personally like the results without hdr+, so I don't care to make them work.
I've created two builds because the recorded audio channels are reversed, (android 13, fw c.06), you can check using stock sound recorder, if you speak to top mic the sound plays on bottom speaker, mono for current situation (with reversed channels) and stereo for when (if) they will fix the channels order.
Install instructions:
1. Download the modified SGCAM from here:
mono: https://uploadnow.io/f/G4Ctrh7
or
stereo:
https://uploadnow.io/f/lJBRS1t
2. Download the Realme GT2 config file for SGCAM 8.4: Lcfg1.xml (attached to this post)
3. Install SGCAM, open once, allow permissions, (needed to create folders for configs)
4. Copy Lcfg1.xml to [phone internal storage]/SGCAM/XML/Lcfg1.xml
5. Import Lcfg1.xml by double tapping the blank space between shutter button and switch camera button (see the attached screenshot)
6. Leave a message if it helped you
reserved
Will test, nice work. Still angry at Realme for crippling the device like this.
This is sooooooooooo much better
In case if someone wonders, there is a xml for the GT 2 Pro, which the ultrawide camera works with, and it also works on our GT 2, but the picture quality is very low and noisy.
https://forum.xda-developers.com/t/gcam-for-realme-gt2-pro.4429173/post-87701663
It is in the attachments.
@hdavid1 For the aux cameras (wide and macro) to work you need GCAM, with package name com.ss.android.ugc.aweme But those have an issue, the photos taken with the main camera are shifted to the right (they have a black border on the left) - tested only on my GT2.
hdavid1 said:
In case if someone wonders, there is a xml for the GT 2 Pro, which the ultrawide camera works with, and it also works on our GT 2, but the picture quality is very low and noisy.
https://forum.xda-developers.com/t/gcam-for-realme-gt2-pro.4429173/post-87701663
It is in the attachments.
Click to expand...
Click to collapse
just tested that xml file and it's not working. My SGCAM build is not derived from the com.ss.android.ugc.aweme package, because of the reason posted above.
wizard8400 said:
just tested that xml file and it's not working. My SGCAM build is not derived from the com.ss.android.ugc.aweme package, because of the reason posted above.
Click to expand...
Click to collapse
hi there i have the gt but the 1 with the same audio issue i can open the bootloader so i can fix it but i dont know how can you provide me some guidence pls?
@alex61194, I didn't understand your request. Can you rephrase, please. And use punctuation, it really helps
wizard8400 said:
@alex61194, I didn't understand your request. Can you rephrase, please. And use punctuation, it really helps
Click to expand...
Click to collapse
sry, tipped too fast, i have the realme gt 5g, and have the same issue as your phone but in my case i can open the bootloader and be root, but i dont know what i have to change to fix the mic issue(i saw i have to edit mixed_paths.xlm), honestly i dont care about video but about voice recording in general
post here your mixer_paths.xml and I'll have a look, I don't think it's the same as on the gt2
Have you tried out other Audio Sources and if that changes anything or is Voice Recognition the best for this device?
@smashda Yes I've tried them all, and voice recognition is the only one with acceptable results. Sources like unprocessed is too low, voice com. has too much noise canceling, etc.
wizard8400 said:
post here your mixer_paths.xml and I'll have a look, I don't think it's the same as on the gt2
Click to expand...
Click to collapse
here you go https://mega.nz/file/8odHXDSB#IhmdD1ntn4fMyeRpMVZnNj-uiSBNUG9kOuseiC8bBjo
@alex61194
*!!! have a backup so you can restore from custom recovery, just in case.
1.make sure you are editing mixer_paths.xml from /vendor/etc
2. modify the file according to the instructions from the screenshots.
3.after saving the file verify/set the permissions to be rw-r-r (like before)
4. reboot the phone, check if the modifications are still there
5. try a recording see if something changed. Do not expect to fix or improve something. This is just a test to see if we are on the right path.
6. tell me the results.
@wizard8400 bruh we have GT 2 Indian variant RMX3312 with an unlocked bootloader. We, unfortunately don't have TWRP. Can you give some suggestions?
@Ptathavi I think is possible with magisk:
first you need to flash a patched boot image (patched by magisk) to have root
and then something like: https://forum.xda-developers.com/t/how-to-change-files-in-the-directory-system-with-magisk.4454489/
or try searching something like "edit system file with magisk"
wizard8400 said:
@Ptathavi I think is possible with magisk:
first you need to flash a patched boot image (patched by magisk) to have root
and then something like: https://forum.xda-developers.com/t/how-to-change-files-in-the-directory-system-with-magisk.4454489/
or try searching something like "edit system file with magisk"
Click to expand...
Click to collapse
Thank you bro, much appreciated. I'll try. Since I've root there's posibility
Ptathavi said:
Thank you bro, much appreciated. I'll try. Since I've root there's posibility
Click to expand...
Click to collapse
How did you root it? Did you flash the patched boot img from magisk?
Prinve said:
How did you root it? Did you flash the patched boot img from magisk?
Click to expand...
Click to collapse
Join our group for help
Mod. edit: social media link removed. alecxs
What!!! I have been searching for this for so long but i couldn't find it, searches only showed Neo 2 and Pro and as there were no posts in XDA i thought development hasn't started yet so i was learning/trying to build twrp and build device tree for it. Thanks for the link

Categories

Resources