yashsingh1/xdaforums huggingface dataset:
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
[MENTION=4702982]rocker00[/MENTION] not sure what log you used to check what paths it uses. I might have to do some testing in between stuff this morning. Try to record with Hi-Q (free) mic selection 'raw audio' and set the gain to like +15dB. That sounds awesome.

Now that I remember we also have Footej camera where you can change the recording volume I believe. Stuff for me to test today.

Writing this as a note to myself so I won't forget and to spread some ideas (yes, getting older and I can use midlife crisis as an excuse for nearly anything)

Test 1: Footej camera allows for a 6dB (not db like they write it) boost. Set the audio source to 'microphone audio source tuned for video recording'. Would like a 15dB increase like in Hi-Q but it is something. Also allows 4K and stabilization, didn't try it on 4K but on 1080P it works.

[MENTION=4702982]rocker00[/MENTION] something weird.. I edited the xml before in regards to the bitrate. So all my high profile (720P, 1080P and 4K) are set to 288.000 which is a really high over the top bitrate. In Footej camera it takes this bitrate (checked with media info) but now in the default MIUI camera it went back to 96Kb/s, really scratching my hair now. EDIT : something most have gone wrong, created a new xml and now ok. Manually copied to pc and edited to 196kbit/s .. which is really high and now it seems to work.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
.............
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Noise cancelling = none ... like in WYHIWYG , in plain peoples language, what you hear is what you get. It is seriously awesome. Instead of testing with the BT speaker I decided to go outside and record some birds etc, me walking etc etc ... no music this time. After I recorded (so I thought) I was walking back towards my house and my neighbor said something to a visitor she had while sitting on the terrace. So I plugged in my earplugs (Rock Zircon = just buy those) and watched my recording to find that I did not record what I intended to record. Meaning coming back and what should have ended the recording by pushing the button started the recording. I can tell you one thing, it is exactly like I heard her voice outside. The microphones are outstanding!

About the low volume : One must also not forget that the difference in dB between inside a house and being in a crowd can easily be 30dB louder. The concert were I was ... deafening and shouldn't be allowed. So recording at home at -30dB is fine. Put your headphones on and you can easily follow a conversation that was made at low volume. No noise cancellation, just the joy of good microphone amplifiers and a AD converter.

This one I don't understand 'About aac: i tried something to raise the volume but it ended with no recording sound at all but the funny thing was about the aac bitrate...please see the attachment! raising the volume is linked to aac bitrate?!! and keep in mind that am using mediaprofiles.xml (system) and media_profiles_vendor.xml from Mi Max 3 which i attached here before.'

Aac is an encoder like mp3 so it has nothing to do with volume.. I actually haven't touched that mediaprofiles.xml system.

Just give it a go with https://play.google.com/store/apps/details?id=com.footej.camera and set it to +6dB :)
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
[MENTION=1743042]lukesan[/MENTION]

1- About noise cancelling, this is just sounds great! :)

2- About low volume, this is completely right, once i moved the video to the laptop i can clearly hear everything, the same for headphone, yesterday once i heard the changes i thought raising the volume is just a cosmetic but huh!

3-i've tried to raise the volume but something goes wrong and there was no sound at all, i thought the acc bitrate is 198 (kbits) but it was (bits) since no sound (see the attachment), that's why i was confused cuz acc has nothing to do with volume since it's a encoder as you said.

4-i will try the app for sure.

Happy me :D...it's just a huge improvement.

Enjoy the new Bluetooth speaker and perform deep testing cuz i saw some complains about music stuttering, don't have one to test, also i can see some missing config regarding aptx as well as the required libs!

Since you mentioned you are on miui 10 eu version....i know that eu is fully deodexed so how's the performance overall? i've tried miui 10 once and rolled back after less than an hour....the performance was really disappointing! i hope things is better now on miui 10.
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Well no issues with BT, I suspect some aggressive power settings, but I didn't have issues so far. Lets do some further stuff via PM.
[Xiaomi Redmi Note 5 Pro Questions & Answers] azz_kikr:
I changed the bitrate from aac in vendor/etc/media_profiles_vendor.xml (near the bottom and not media_profiles.xml as in the other phones) only and my recordings have the higher bitrate using the original miui cam.

I changed it to 192 and all my videos now have 190-192kbps for the aac audio.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
Great findings guys, awesome, I thought you would give up on this :D I haven't got time ATM to try it out, I might be able later tonight and will report. Please continue using the thread so we can all cooperate :D (though my limited knowledge maybe won't help much)

And yeah, Xiaomi does this to differentiate low/mid/high end tiers of their devices. One great thing about it all is that we have the hardware capable of producing very good quality output, it's "only" a software limitation in the way.
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
To be honest and to make as little mistakes I would change the files as following.

For the pc/laptop download notepad++ which is free and doesn't mess up your files.

Airdroid (also free) on your phone to transfer the files to the pc and back.

I copied both XML files on a temp folder on my sd-card and then downloaded both xml files to the laptop/pc. As you see the dir with the 2 files on your laptop/pc make a new directory on the sd-card. Call it 'modified' or so so you have a backup of the original files in case you make a mess of it. Later you will copy the mod files to that directory.

Open the file(s) with notepad++ and do for the AAC bitrate a simple replace (ctrl + h) and replace the bitrates in 1 go .... 196000 is more than enough (check my file a couple of posts above this one). I don't care about changing 480P etc video sound quality. This will take care of the encoder quality, compare it with a 128K mp3 and a 192K mp3

The other xml file you can do a search on <device name="SND_DEVICE_IN_CAMCORDER_DMIC" acdb_id="85"/>

Change the 85 to ... mmm ... 4, 15, 50, 80 ...any of these numbers were tried and give the same result.

As you have both files saved, drag and drop them in the folder (modified) that you created.

Now replace both files in the original directories in the phone. Set the correct permissions ... 644 . or just check the other xml files in that folder and you will see what I mean.

Reboot phone, really important, and have a test.

Remember what I wrote above about the differences of dB at home, crowds etc (https://www.noisehelp.com/noise-level-chart.html) so be aware that there is no automatic gain or filters. What you hear is what you get and I rather have a low level than clipped (=distortion) audio.

Ok the needful, I am not responsible for bricked cards, nuclear, divorce etc warnings ;)
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
Wow thanks for the detailed noob friendly guide on how to save myself from reflashing the rom :D (fortunately enough I'm not that much of a noob :victory: )

But you saved me a TON of time with that batch edit in Notepad++, I would have spent whole night changing one line by one :D

I've backup up my files couple of days ago when I did those tests.

I had a bit of an issue here since the files in vendor/etc were reset to default values on reboot so I had to some TWRP fixing. So correct me if I'm wrong, but shouldn't that edit in "audio_platform_info.xml" be system wide? I mean, the GCam, stock MIUI port and built-in Snapdragon camera that I tested sound pretty much the same as before, except that they are recording in 192K, but the AGC is still making the sound awful.

Though the FV-5 is still doing a great job and sound is pleasing, but still that's because it has that AGC switch.

All 3 of my .xml files have been successfully edited, I've checked 3 times now, rebooted twice, still no change in recording apps, save for the FV-5 but that's on it's own.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Warrimonk:
Awesome work guys. Any chance we can get some kind of flashable zip fix. Will this fix work system-wide?

I went to a concert last night and I noticed today that the recording quality was TRASH in both the stock MIUI camera and snapchat.
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Really strange since after every edit and copy of the file to your phone you have to reboot it to go into effect (well I do so). After reading your txt I just rebooted and tried again with the default MIUI cam. Media info showed 196kbit/s and the sound is still like it should be, so no AGC.

On which rom are you?

Btw I found something some people might not like and that is that recording video in other apps like whatsapp etc are also alot less loud than before. I and rocker00 are checking values in different files but it is no easy task.

For me it is an absolute no go today to test since my tinnitus is very bad and I don't want to make it worse So a lesson from me, your papa, ALWAYS protect your ears in loud environments. If you want to go to concerts, fine, go to a pharmacy first and spend 10 to 20 euro on party plugs. These dampen sound by 20 to 30dB while not changing the sound. Believe me it will still be loud enough and you will still enjoy. If you don't 1 day it is to late and you are stuck with a beep in your head day and night for the rest of your life. Loads of people have committed suicide because of this. If you have a beep after a concert, accident etc and it is not gone after 2 to 3 days then please go to a hospital that treats divers that had an accident. They will put you in a diving chamber and pump 100% oxygen in your body. This might work. I did it and would do it again.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
[MENTION=5070317]Cirra92[/MENTION] This file as i mentioned contains the calibration of ACDB, not sure if AOSP ROMs are using the stock ACDB or their own ACDB, since i never used any AOSP ROM so actually i have no idea, please attach the whole ACDB folder from your ROM so i can check.....vendor/etc/acdbdata

[MENTION=1962866]Warrimonk[/MENTION] if you don't mind about the low volume (not that much by the way) i will try to make magisk module.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Kusie:
Hi all,

this seems to be the right thread to post my problem to. I´m using the Note 5 with MIUI Stock Rom 9.5.19.0, rooted and camera2APi enabled. I was hoping to get a phone with good camcorder quality, especially audio. My last phones sucked at recording audio- for example - live concerts. The Nexus 5 was so bad you though it was recorded under water.... so yesterday I was at a concert and recorded some 1080p clips with MIUI stock camera app. I´m aware that at a live concert the sound is tricky but i was saddened to find the audio of my clips partially distorted/overdriven, especially on bass drum kicks. Checked the video files with MediaCodec and found 96 Kbit/Sec and Sampling rate 48 KHz.

I read this thread but didn´t understand all... somebody said the stock camera app has AGC enabled? Where can I check that? Because ACG should have taken care of the overdriven sound and lower the input, right?

K.
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
[MENTION=4232065]Kusie[/MENTION] well yes AGC can be a good thing. Problem is if you set attack and release to fast in combination with to much microphone gain and a high pass filter then you mess up the sound.

About the Nexus 5 I know. I had some phonecalls with a Google manager about it... She did not hear the issue.. Kid you not. In the end I got a refund.

I would say read the complete thread and wait a bit if you don't feel you are comfy changing the files. Rocker00 is working on a magisk module.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
I'm using AOSiP rom, which is based on Google's AOSP source, not on LineageOS's source. I meant that copying the files did not work somehow, editing them directly from the device in root folder did work, but I've managed to make the edit stick, but still it doesn't affect the apps.

Yeah I know that tinnitus can be hard to live with, I've been reading about it, though luckily I did not have encounters in music festivals where the music is that loud.

I don't mind about the low volume, and I like the output of FV-5 however it would be much more convenient to have that fix applied system-wide. I will upload a short clip from FV-5 so you can confirm whether it makes the same output in your device. Here are my files from acdbdata. Thanks :)
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Cirra92 I'm a bit lost. Did you edit the XML files? Not sure if we did change something in those adcb files.

To be honest I gave up with custom roms based on 'standard' stuff for the moment. Running the EU Xiaomi ROM with Nova launcher and then it feels like a standard no nonsense rom. OK some stuff needs to be switched off but then it all works like it should.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
The acdb files are for [MENTION=4702982]rocker00[/MENTION] he wanted to have a look at them in case there are any differences in AOSP.

Anyway, I did edit .xml files successfully, but the only change that seems to make an effect is higher bitrate, the AGC is not affected although the audio_platform_info.xml file is changed.

As I said only FV-5 is for now recording without AGC on my side due to having an option to switch it off, any other app is not affected with the .xml edits except that the bitrate is higher.

Here is a short recording with FV-5, does that sound similar to your recording now with the fix applied?

https://drive.google.com/open?id=1358pnHpROFTf_3ccddfpOgMw2BXdghvp

Take note that i have a subwoofer installed in the car, so the bass is on the heavier side :D
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Ouch reading on a phone is still less handy than on a laptop screen.

Ok, that sounds about right! More than enough bass :) and yes that is the sound that we are getting with other cams now.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
[MENTION=5070317]Cirra92[/MENTION] As i expected buddy, it's completely different,since ACDB is a long story i'll pm you about everything, unfortunately it won't work for you!

BTW, awesome BOOM BOOM...my god i love this :D, and yeah as luksan said it's the same quality we've got now.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
I forgot to answer you regarding MIUI vs. AOSP. Well I love stock android for starters and having a clean and lightweight OS is pretty much a must for me. Modding and tweaking it is fairly straight-forward and many of the mods are targeting AOSP and have issues with OEMs frameworks. Slap a GCam and MIUI cam port (since HDR+ is still not working on Global variant) and I don't need anything else. Though this audio output is the only issue right now.

Alright, so that's the output that I need to achieve, good to know. More than enough bass I know, but I like it like that, I enjoy every time I drive :)

---------- Post added at 09:52 PM ---------- Previous post was at 09:47 PM ----------

When if you think it won't work, don't bother then, you'll just waste time, and if you will, better get in contact with Lineage/Resurrection Remix devs (vasishath and Shahan_mik3) and let them know about the issue and the fix, if they implement it, chances are other devs will follow! Thank you for looking into this, I'll continue using FV-5 for the time being, I don't mind having additional app for it.

Yeah, It's real joy driving with this subwoofer, with it every song has a good bass :D
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
With that rom can you select 1080P on FV5 and record fine? I tried on MIUI and it immediately zooms in like crazy on the left top corner the moment you push the record button, except for those 2 resolution which I mentioned in the beginning.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
I am recording with 1080p just fine, even the stabilization is working, I haven't got issues with it as far as I remeber. With stabilization enabled (the shaking hand icon) the video is supposed to be a bit zoomed in, as it's electronic stabilization, but there might be some incompatibility with MIUI. I have camera2api enabled in build.prop to get the GCam working, maybe it has something to do with that.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
Haha I'm jealous now since I'm not on MIUI, but oh well, we'll make it work on AOSP one day :D

Great job guys, I am pleased to see you've pulled it off, community is getting stronger :D
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Maybe we should have this post moved to XIAOMI REDMI NOTE 5 PRO THEMES, APPS, AND MODS ?
[Xiaomi Redmi Note 5 Pro Questions & Answers] Warrimonk:
I just tested it out today at a concert and the difference is astounding ! Thank you so much.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
Glad to hear that, Thank you for reporting back.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Kusie:
Does this Magisk fix work system wide in all camera apps like GCam or only in stock camcorder app?
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
System-wide, any modification on the system files is affecting all apps, don't worry already tested GCam.

BTW, i think we made a small mistake which affects the channels when you move the device from left to right or vice versa, please download the fixed versions from here:

https://drive.google.com/open?id=1PN8jyjXwH_B8CHBX9wXFrSRpGSFRUn06
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Just did a test and the fixed version starts to mess with the noise reduction. The sound of the fan that is blowing here begins to make an underwater sound as with some other sounds in the background. With only DEC1 and 2 changed it sounds natural.

And yes people I guess either Xiaomi or me messed up left and right. I hold my phone to record with the micro-usb connector on the right hand side. Left and right microphone recording is turned around that way it seems.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Kusie:
Thank you! I´m not too familiar with Magisk Modules, can I install new version over old one or do I have to uninstall module first, reboot, install new, reboot?
[Xiaomi Redmi Note 5 Pro Questions & Answers] lukesan:
Kusie read what I just posted about the new version. Well you can easily try yourself. Uncheck the box, reboot and then install the other module and reboot again.
[Xiaomi Redmi Note 5 Pro Questions & Answers] junglist:
Glad to see that people are acknowledging this issue, is there any hope of disabling that AGC and fixing the other settings on LOS or other roms?
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
Since i am on stock so i don't know.....

I can't promise but i will try to do my best!

i need the following:

* log...this is this most important part (once you start the recording)

* from vendor/etc/ those files: mixer_paths.xml and audio_platfrom_info.xml

[MENTION=5070317]Cirra92[/MENTION] same thing mate, lets see.....
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
Alright, there are all requested files in the zip, I hope that log is not too long, I have cleared it and switched quickly to MIUI camera and started recording, I've seen a lot of lines regarding camera and ACDB so that should be it.

Take note that I've recorded using ported MIUI camera app as I've thought it's the best for this test, If you need log from another app just let me know :)
[Xiaomi Redmi Note 5 Pro Questions & Answers] Cirra92:
Yeaaaaa, there is a breakthrough :D

With the first workaround, fluence set to none and camcorder_dmic changed the recording is quite similar to that of Cinema FV-5 with AGC disabled, the only difference is that the top mic is not being used in recording, when I cover it nothing changed, which I should guess is mono recording as when the bottom one is covered the sound is muffled and you can barely hear it while the bass still goes strong. And the volume is a bit higher now in MIUI app than Cinema FV-5 (which is good though) and bass is good on both. This is a huge improvement over the stock settings :D
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
Really happy to hear that :)

About the issues you described, now i am sure that you're 1000000000% convinced regarding what i said about ACDB, please tell you ROM developer to use stock ACDB with audio hw and i can guarantee that you won't face any issues of those!

Since you almost got it working lets try some crazy stuff ;) ....i will pm you after a while.
[Xiaomi Redmi Note 5 Pro Questions & Answers] Kusie:
OK guys so I need some help any clarification.

First the facts: I´m on MIUI Global Stable 9.5.19.0 (fw less Version dirty flashed over official 9.5.17.0 OEMIFA) with unlocked bootloader, TWRP and MAGISK 16 rooted Redmit Note 5 Global version. I also have Kirk´s Kernel 1.7 installed and use Root Explorer to view and alter files. I mostly use MIUI stock camera app to record images and videos, but I also have Open Camera and 2 different GCam ports on my phone. When doing a 1080p video clip on a live rock concert last time I noticed that sound was distorted and not good.

I installed the normal.zip Magisk Module from this tread and tried to record another clip on a loud rock concert on Monday. Total desaster! Massively overdriven sound, totally distorted audio (if interrested I could make the clip accessible for download).

The fix doesn´t seem to work for me. So I decided to re-read the whole thread and check some of the files with root explorer.

In this thread you mostly talk about altering the file /vendor/etc/media_profiles_vendor.xml

Strangely enough, I can´t alter this file manually. The partition/directory /vendor is mounted READ ONLY by Android and I can´t change it to r/w with root explorer!

It seems on MIUI 9.5.19.0 the relevant files are located in /system/etc and are called media_profiles.xml and mixer_paths.xml.

Therefore, it might be HIGHLY relevant for this fix to be working to alter the files at the correct place, depending on the ROM and ROm version you´re using!

So for me It would be more helpful to know the exact parameters you altered in those files and what effect they have so I could try to alter them manually in root explorer and /system/etc

One question about switching off fluence - does this also switch off noice reduction on phone calls? Because that would be a pitty.

Thanks for all the efforts!

K.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
[MENTION=4232065]Kusie[/MENTION] From what i read it looks like it is a problem from your end, for example you said you can't mount vendor partition which is not happening here, i am on MIUI 9.5.19.0 with ARP 4 and i can easily mount system and vendor partitions!

Since the all the files in the module involved with vendor partition maybe that's why it's not working for you

Also many users got it working even on AOSP one user got it with some extra modification!

And this is not only about media_profiles_vendor.xml ....this is less important than the other files.

I suggest you to remove magisk then reinstall and if you're able to mount vendor partition then you're good to go.

Regards.
[Xiaomi Redmi Note 5 Pro Questions & Answers] rocker00:
I have created the module from the scratch and everything is perfect now, please go here : https://xdaforums.com/redmi-note-5-...io-quality-t3828711/post77319545#post77319545

to the OP, you can edit the title now :)