VR video quality fix on Nougat, Oreo (and now on MIUI) - Xiaomi Redmi Note 5 / 5 Plus Themes, Apps, and Mod

So I had a lot of problems with the VR videos on MIUI all the time, here is the original thread in my old Redmi Note 3 Pro.
But now I found a solution on the MIUI systems finally!
This only need if you have a cardboard or other headset and want to play VR videos (side by side, side on side) with a VR video player app, like Var's VR Player, AAA VR Cinema player, VRTV VR Video player and others.
On CM, AOSP (Nougat, Oreo) rom's: only switch the media.msm8956hw=1 value to 0 in the build prop.
On MIUI 9.5 roms delete the following lines in the build prop:
#property to enable narrow search range for video encoding
vidc.enc.disable_bframes=1
vidc.enc.disable_pframes=1
vidc.disable.split.mode=1
vidc.dec.downscalar_width=1920
vidc.dec.downscalar_height=1088
#the window_width and window_height should be same to the screen size
vidc.dec.ratio_scale=1
vidc.dec.window_width=2160
vidc.dec.window_height=1080
Don't tested which line cause the problem or its' affecting something other app, but the video now sharp and clear

it means it require root

irfan.shikarpuri said:
it means it require root
Click to expand...
Click to collapse
Yes. I hope if the rom switch to Miui10 and oreo this problem will fixed on the stock system.

Related

ZUK supports 4KHDR @ 60fps?

Why is it that despite of having same configuration as OnePlus3, ZUK can't play 4KHDR @60fps as smooth as OP3? Though it can, after some tweaks, but not as efficiently & smooth as OP3(unrooted). I used same Version of MXPlayer and same file for comparison.
I tried all custom kernels available (Heliox,Jaguar,Darkmoon) and Latest versions of major ROMs(RR,AEX,ViperOS). And still didn't match the playback quality of OP3.
Please tell me if there are more kernels or ROMs yet to be tried, which can bring substantial step-up in performance, or which will just Play 4KHDR @ 60fps.
Overall, the User Experience is super-smooth but
this small thing is eating my brain :crying:
d3vyarth said:
Why is it that despite of having same configuration as OnePlus3, ZUK can't play 4KHDR @60fps as smooth as OP3? Though it can, after some tweaks, but not as efficiently & smooth as OP3(unrooted). I used same Version of MXPlayer and same file for comparison.
I tried all custom kernels available (Heliox,Jaguar,Darkmoon) and Latest versions of major ROMs(RR,AEX,ViperOS). And still didn't match the playback quality of OP3.
Please tell me if there are more kernels or ROMs yet to be tried, which can bring substantial step-up in performance, or which will just Play 4KHDR @ 60fps.
Overall, the User Experience is super-smooth but
this small thing is eating my brain :crying:
Click to expand...
Click to collapse
First of all, You are comparing "THE BEST" SD820 phone with probably the 3rd or 4th best SD820 phone (antutu wise). Secondly, even on the OP3, why would you choose to play 60fps 4K videos that too HDR ones?! That's ridiculous for anyone. I'm hoping the logical explanation to why you're doing this is to kinda benchmark the phone. But even then a lot of SD653 and SD810 phones can breeze through this benchmark easily. It's even more ridiculous that you've tried almost all roms and kernel combos just for a luxury video playback.
Anyways coming to the point, I tried the Sony 4K 60fps HDR Swordsmith video on my Z2+ (AEX4.6 Official with HelioX 3.18.80) via MX with HW (not plus) decocer and the video was running smooth AF. Infact, compared to playback my friend's OP3 running OxyOS 5.0, my Z2+ had zero hiccups throughout the video while the OP3 had 2 or 3 towards the middle. The interesting thing is that I achieved these results while running CPU underclocked to 1996 & 1401. But technically speaking that shouldn't be a problem in the video playback coz HW decoder runs exclusively on the GPU. Concluding my point, don't watch ridiculously high quality videos on phone and don't change roms and kernels to achieve desired playback, just adjust and optimize them.
Incrovantilist said:
First of all, You are comparing "THE BEST" SD820 phone with probably the 3rd or 4th best SD820 phone (antutu wise). Secondly, even on the OP3, why would you choose to play 60fps 4K videos that too HDR ones?! That's ridiculous for anyone. I'm hoping the logical explanation to why you're doing this is to kinda benchmark the phone. But even then a lot of SD653 and SD810 phones can breeze through this benchmark easily. It's even more ridiculous that you've tried almost all roms and kernel combos just for a luxury video playback.
Anyways coming to the point, I tried the Sony 4K 60fps HDR Swordsmith video on my Z2+ (AEX4.6 Official with HelioX 3.18.80) via MX with HW (not plus) decocer and the video was running smooth AF. Infact, compared to playback my friend's OP3 running OxyOS 5.0, my Z2+ had zero hiccups throughout the video while the OP3 had 2 or 3 towards the middle. The interesting thing is that I achieved these results while running CPU underclocked to 1996 & 1401. But technically speaking that shouldn't be a problem in the video playback coz HW decoder runs exclusively on the GPU. Concluding my point, don't watch ridiculously high quality videos on phone and don't change roms and kernels to achieve desired playback, just adjust and optimize them.
Click to expand...
Click to collapse
My point on playing the best video quality I have, bcz ZUK can, why not. I tried LG Cymatic Jazz HDR to test the playback(details attached).
Back when I had ZUI, it could not play the video at 60 fps. But when I flashed first RR, I was surprised by the result. In MX Player Pro with HW+, it could play super smooth with absolute 0 lag.
Then came updates and further more I flashed many ROMs but never got that playback. Changing kernels didn't help. And now I've same ROM and kernel as you do, because you know.
The fact that you can play 4KHDR @ 60fps, may be bcz ur video isn't having 10 bit color depth. Please attach your video details, I wanna see. If our videos are of same quality, then I may be having some other issue.
Its strange however, you're playing 4KHDR on HW.
Also, do you have Substratum theme or Xposed modules installed? Just curious if these affect performance in any way.
d3vyarth said:
The fact that you can play 4KHDR @ 60fps, may be bcz ur video isn't having 10 bit color depth. Please attach your video details, I wanna see. If our videos are of same quality, then I may be having some other issue.
Its strange however, you're playing 4KHDR on HW.
Also, do you have Substratum theme or Xposed modules installed? Just curious if these affect performance in any way.
Click to expand...
Click to collapse
No Substratum No Xposed. And the video I tried has same video specs as yours (attached).
Incrovantilist said:
No Substratum No Xposed. And the video I tried has same video specs as yours (attached).
Click to expand...
Click to collapse
Is it possible that Xposed and Substratum are somewhere causing pain to the system?
Also, I once changed some screen values through Kernel auditor and tried to undo that. I don't know if they're default now, I'm attaching SS just tell me if they're same. I'll try uninstalling Substratum and Xposed and keep system as Lite as possible and then check.
Thanks for your attention and help
d3vyarth said:
Is it possible that Xposed and Substratum are somewhere causing pain to the system?
Also, I once changed some screen values through Kernel auditor and tried to undo that. I don't know if they're default now, I'm attaching SS just tell me if they're same. I'll try uninstalling Substratum and Xposed and keep system as Lite as possible and then check.
Thanks for your attention and help
Click to expand...
Click to collapse
Substratum can have some slowing effect on GPU due to its theme engine but that'll be possibly unnoticeable in a SD820. Xposed should be harmless (afaik with my previous phones) unless you are running GPU affecting modules. I don't use substratum because I was perfectly happy with CM theme engine and now that it's gone, I'm not so keen for a replacement. Xposed went meaningless after Lollipop & the birth of Magisk (for me atleast). And lastly about Screen values in KA, they don't have any effect on GPU unless ofcourse you're running grayscale which might actually save you some power (but might be unstable). If you want to reset the values, just uncheck apply on boot under screen settings and reboot. FYI, I ran almost all KCAL profiles I found online and "Perfection" (that's the name of the KCAL profile) for OP2 is giving the best visuals in my perspective. Try it if you want. Happy to have helped you ?✌?
Imo the zuk z2 is not as good at playback than I expected. Even 1080p60 video drop frames constantly at 2x playback speed
Also the phone dont have a hdr screen so why even try to play hdr content anyway
pipyakas said:
Imo the zuk z2 is not as good at playback than I expected. Even 1080p60 video drop frames constantly at 2x playback speed
Also the phone dont have a hdr screen so why even try to play hdr content anyway
Click to expand...
Click to collapse
Playing a 60fps video at 2x speed would mean 120fps, that's out of our screen limit. For that purpose display needs 120Hz refresh rate as in New Razer phone, or some frames will get skipped(frame drops) as you noticed.
And the reason why I wanna play that, I search of playing that thing smoothly, I've learned many things. It simply gives me satisfaction.
Incrovantilist said:
Substratum can have some slowing effect on GPU due to its theme engine but that'll be possibly unnoticeable in a SD820. Xposed should be harmless (afaik with my previous phones) unless you are running GPU affecting modules. I don't use substratum because I was perfectly happy with CM theme engine and now that it's gone, I'm not so keen for a replacement. Xposed went meaningless after Lollipop & the birth of Magisk (for me atleast). And lastly about Screen values in KA, they don't have any effect on GPU unless ofcourse you're running grayscale which might actually save you some power (but might be unstable). If you want to reset the values, just uncheck apply on boot under screen settings and reboot. FYI, I ran almost all KCAL profiles I found online and "Perfection" (that's the name of the KCAL profile) for OP2 is giving the best visuals in my perspective. Try it if you want. Happy to have helped you ?✌?
Click to expand...
Click to collapse
I removed Substratum and Xposed, even Shox audio mod, but result was same.
Though Performance as CPU Governor gives 100% results, but you said you've Under-Clocked ur CPU to 1996MHz, that did surprise me.
Which CPU & GPU governor do you use? Also which I/O Scheduler? I'm curious.
d3vyarth said:
I removed Substratum and Xposed, even Shox audio mod, but result was same.
Though Performance as CPU Governor gives 100% results, but you said you've Under-Clocked ur CPU to 1996MHz, that did surprise me.
Which CPU & GPU governor do you use? Also which I/O Scheduler? I'm curious.
Click to expand...
Click to collapse
Fiops scheduler.
CPU Governor is Interactive. (default on HelioX)
GPU Governor is Msm-adreno-tz. (default on HelioX)
Incrovantilist said:
Fiops scheduler.
CPU Governor is Interactive. (default on HelioX)
GPU Governor is Msm-adreno-tz. (default on HelioX)
Click to expand...
Click to collapse
I use same settings
I think I need to do more research on this.
Updating to Oreo smoothed everything out :fingers-crossed:

MiUI Camera modified media profiles hevc / h265

Hi all,
I've been editing the media_profiles.xml for my mi note 3 and thought I'd share it since I've changed it to use hevc / h265. Attached is my file to be copied into /system/etc/. This is easiest to do with root or you can copy it using TWRP without root I would think. Make sure to set permissions after copy to 644, otherwise you might get a bootloop. Also backup your own file first! I'm using MIUI 9.6 by xiaomi.eu, but this file seems to be fairly universal across roms. This modification works with the MIUI camera app, other apps like GCam and Opencamera seem to use their own profiles so this makes no change for them.
Steps again...
Be rooted or use TWRP if not
Backup own media_profiles.xml
Copy file in attachment to system/etc and unzip
Set permissions on media_profiles.xml to 644 to avoid problems
Reboot and enjoy / test in MIUI camera app
Improvements:
Use HEVC / h265 instead of h264 and changed bitrates. Default rates on mine were 42mbit for 4k and 19mbit at 1080p using h264. I've changed these to 28mbit for 4k and 13mbit for 1080p. This should give roughly the same quality but lower file sizes. 720p and lower resolutions are left unchanged since I never use them. I've also changed the audio bitrate to 192kbit (update: also there is a file with 256kbit audio if desired, everything else is the same in that file) with a higher minimum sample rate and also set image quality to 100 for all cameras and doubled the image decoding memory cap from 20 to 40.
Bro pls before after your photo your Ss Pls my phone mi note 3
Mi Note 3 cihazımdan Tapatalk kullanılarak gönderildi
yakupTR said:
Bro pls before after your photo your Ss Pls my phone mi note 3
Mi Note 3 cihazımdan Tapatalk kullanılarak gönderildi
Click to expand...
Click to collapse
I've added a screenshot, is that what is needed?
Your says picture quality %100 before after taken photo[emoji3][emoji41]
Mi Note 3 cihazımdan Tapatalk kullanılarak gönderildi
Great!
Great, smaller file size + better audio, even if there are still watery sound in the surroundings but the main audio is much better.
leledumbo said:
Great, smaller file size + better audio, even if there are still watery sound in the surroundings but the main audio is much better.
Click to expand...
Click to collapse
There is this to improve audio a bit further (I used the root method mentioned), seems to work on mine. Makes the audio louder and clearer.
http://en.miui.com/thread-628652-1-1.html
Thanks for the Mod, been used this well on Nougat 7.1.
I:good:
Any update for Oreo 8.1 custom Rom.
Thanks.
taiheng said:
Thanks for the Mod, been used this well on Nougat 7.1.
I:good:
Any update for Oreo 8.1 custom Rom.
Thanks.
Click to expand...
Click to collapse
If you're using vendor from lineage 15.1, I think this fix should work. If it isn't you can try the GCam mod I posted here https://forum.xda-developers.com/showpost.php?p=77901429&postcount=92
It enables hevc, set memcap to 40, and "HIGH" audio bitrate to 192k
salzzz said:
If you're using vendor from lineage 15.1, I think this fix should work. If it isn't you can try the GCam mod I posted here https://forum.xda-developers.com/showpost.php?p=77901429&postcount=92
It enables hevc, set memcap to 40, and "HIGH" audio bitrate to 192k
Click to expand...
Click to collapse
Thanks for the mod unfortunately I still no luck to record HEVC & 60fps video.
What I'm did:
1. Delete all previous camera mod & reboot
2. Flash jason.all.in.one_minimal_BSG_hevc_Black-v2.2.h.zip in Magisk
3. In recovery wipe cache and cache art
4. install BSG Cam 5.3.015 60fps
5. shot the video with 60fps
I've tried several time but the video properties still shown 30fps & H.264 coding (not hevc).
I'm using Treble Resurrection Remix ROM with based LOS15.1 vendor & TwistLoop kernel.
Any step I've miss out?
taiheng said:
Thanks for the mod unfortunately I still no luck to record HEVC & 60fps video.
What I'm did:
1. Delete all previous camera mod & reboot
2. Flash jason.all.in.one_minimal_BSG_hevc_Black-v2.2.h.zip in Magisk
3. In recovery wipe cache and cache art
4. install BSG Cam 5.3.015 60fps
5. shot the video with 60fps
I've tried several time but the video properties still shown 30fps & H.264 coding (not hevc).
I'm using Treble Resurrection Remix ROM with based LOS15.1 vendor & TwistLoop kernel.
Any step I've miss out?
Click to expand...
Click to collapse
Oops, my bad. I thought the videos are 60fps. I've checked and it's really 30 fps + AVC (h264), sorry
salzzz said:
Oops, my bad. I thought the videos are 60fps. I've checked and it's really 30 fps + AVC (h264), sorry
Click to expand...
Click to collapse
IC, BTW Will you update this mod to 60fps & Hevc encoding?
taiheng said:
Thanks for the mod unfortunately I still no luck to record HEVC & 60fps video.
What I'm did:
1. Delete all previous camera mod & reboot
2. Flash jason.all.in.one_minimal_BSG_hevc_Black-v2.2.h.zip in Magisk
3. In recovery wipe cache and cache art
4. install BSG Cam 5.3.015 60fps
5. shot the video with 60fps
I've tried several time but the video properties still shown 30fps & H.264 coding (not hevc).
I'm using Treble Resurrection Remix ROM with based LOS15.1 vendor & TwistLoop kernel.
Any step I've miss out?
Click to expand...
Click to collapse
5.2, 5.3 google hdr+ camera does not support hevc.
This way is suitable for Xiaomi Mi6. Maybe you can try.
For LOS15. Instructions for using 60FPS:
Install All in One Minimal. After restarting the phone, first open the snapdragon camera ( or MIUI camera ) and switch to the video , exit the app. ( this needs to be done with every restart of the phone ). Then you can use 60fps to record video.
fu24 said:
5.2, 5.3 google hdr+ camera does not support hevc.
This way is suitable for Xiaomi Mi6. Maybe you can try.
For LOS15. Instructions for using 60FPS:
Install Mi6 All in One Minimal. After restarting the phone, first open the snapdragon camera ( or MIUI camera ) and switch to the video , exit the app. ( this needs to be done with every restart of the phone ). Then you can use 60fps to record video.
Click to expand...
Click to collapse
So, in other words, we need GCam <=5.1 to use hevc?
salzzz said:
So, in other words, we need GCam <=5.1 to use hevc?
Click to expand...
Click to collapse
Yes.
Gcam 6.1 also supports hevc.
fu24 said:
5.2, 5.3 google hdr+ camera does not support hevc.
This way is suitable for Xiaomi Mi6. Maybe you can try.
For LOS15. Instructions for using 60FPS:
Install Mi6 All in One Minimal. After restarting the phone, first open the snapdragon camera ( or MIUI camera ) and switch to the video , exit the app. ( this needs to be done with every restart of the phone ). Then you can use 60fps to record video.
Click to expand...
Click to collapse
Tried with Mi6 All in one Minimal (Mi6.all.in.one_minimal-v2.3.a.zip & Mi6.all.in.one_minimal_hevc-v2.3.b.zip). Both modules result of the Gcam not working or front camera black off.
Shot with snapdragon 3.0.r2 (Open, close & open again), prompt error say "HFR is not supported for selected resolution". I've set the resolution to 1080p or 720p & FPS to HFR60.
Any advise
taiheng said:
Tried with Mi6 All in one Minimal (Mi6.all.in.one_minimal-v2.3.a.zip & Mi6.all.in.one_minimal_hevc-v2.3.b.zip). Both modules result of the Gcam not working or front camera black off.
Shot with snapdragon 3.0.r2 (Open, close & open again), prompt error say "HFR is not supported for selected resolution". I've set the resolution to 1080p or 720p & FPS to HFR60.
Any advise
Click to expand...
Click to collapse
Sorry, I didn't say in detail.
My answer is for this. https://forum.xda-developers.com/showpost.php?p=77901429&postcount=92
You should not install the mi6 module directly.
Try this now. I modified it, it might be for you.
fu24 said:
Sorry, I didn't say in detail.
My answer is for this. https://forum.xda-developers.com/showpost.php?p=77901429&postcount=92
You should not install the mi6 module directly.
Try this now. I modified it, it might be for you.
Click to expand...
Click to collapse
In oder to eliminate possible error, I format the phone & reinstall LOS 15.1 & try again.
Because of persist.camera.dxo will crash/black-off all the camera apps in LOS 15.1, I've disable it.
With this new mod:
-Gcam is working in photo & video shooting. But the video taken by Gcam is H264 but not hevc.
-I can't get HEVC video & 60fps by using the Snapdragon camera 3.0.r2, error "HFR is not supported for selected resolution" (720 & 1080p)
-Miui Camera crash when switch to video mode. HDR not working in photo mode.
-Stock camera unable shot video, photo ok.
Above is my finding, the hevc & 60fps video still no luck in Mi Note 3.
Let me know if have any new update mod to try, thanks
taiheng said:
With this new mod:
-Gcam is working in photo & video shooting. But the video taken by Gcam is H264 but not hevc.
-I can't get HEVC video & 60fps by using the Snapdragon camera 3.0.r2, error "HFR is not supported for selected resolution" (720 & 1080p)
-Miui Camera crash when switch to video mode. HDR not working in photo mode.
-Stock camera unable shot video, photo ok.
Above is my finding, the hevc & 60fps video still no luck in Mi Note 3.
Let me know if have any new update mod to try, thanks
Click to expand...
Click to collapse
Try again.
Snapdragon camera 3.0.r2 selection 60HSR
Miui camera changed to 4k. Because this module is suitable for BSG's GCam, so miui cameras cannot use 1080p and 720P.
Gcam 5.2 and 5.3 do not support hevc.
Miui Camera HDR not working in photo mode. I do not know why.
To use the GCam to record 60fps, you must follow the instructions below.
First open the snapdragon camera ( or MIUI camera ) and switch to the video , exit the app. ( this needs to be done with every restart of the phone ). Then you can use GCam to record 60fps video.
fu24 said:
Try again.
Snapdragon camera 3.0.r2 selection 60HSR
Miui camera changed to 4k. Because this module is suitable for BSG's GCam, so miui cameras cannot use 1080p and 720P.
Gcam 5.2 and 5.3 do not support hevc.
Miui Camera HDR not working in photo mode. I do not know why.
To use the GCam to record 60fps, you must follow the instructions below.
First open the snapdragon camera ( or MIUI camera ) and switch to the video , exit the app. ( this needs to be done with every restart of the phone ). Then you can use GCam to record 60fps video.
Click to expand...
Click to collapse
Ok, I've tried again. Miui camera, snapdragon camera & stock camera all can't take the video.
Miui camera:
when switch to video mode, it will crash the camera app.
Snapdragon camera:
without set any fps, when press record button, it prompt error "Could not start media recorder, can't start video recording"
Stock Camera: same error as snapdragon camera.
Can't record video except Gcam, but Gram unable to test Hevc & 60fps.
Once I delete all in one jason camera mod, all camera app can record video again.

Audio recording lacking bass

Hi, I am running ressurection remix 8.1 on my whyred ai, cant seem to work out how to get any bass on my video recordings, on my mido I had to flash some changes to audio mixer files etc. Not sure if anyone else is having this problem but the audio reoding sounds really tinny.
anyone else notice this?
just realised the inbuilt audio recorder is ok, only video apps like google camera and opencamera seem to have the issue?
junglist said:
just realised the inbuilt audio recorder is ok, only video apps like google camera and opencamera seem to have the issue?
Click to expand...
Click to collapse
Same here I also noticed it. Seems they have a high pass filter at around 150Hz or something.
lukesan said:
Same here I also noticed it. Seems they have a high pass filter at around 150Hz or something.
Click to expand...
Click to collapse
yes, thats what I thought too, how the hell do we disable it? anyone?
junglist said:
yes, thats what I thought too, how the hell do we disable it? anyone?
Click to expand...
Click to collapse
Ok found a way to get really good audio quality. I've searched across boards and tried a lot of stuff. The volume level might be low(er) but I need to alter another XML file. Good enough for concerts and out in the open I would say.
First you need to change the max bitrate since they set that to 96KHz which is way to low. The file to edit is /vendor/etc/media_profiles_vendor.xml
Almost all the way down that file you see the AAC settings.
You will see
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8000" maxBitRate="288000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="6" />
As you see I set it to 288000.
Next is the biggest issue. Seems the MIUI camera standard uses AGC and that high pass filter that up to date I haven't found. Open camera works but the other microphone you can select they go via the noise cancelling stuff which kills the audio and you get an underwater sound.
I have a official licensed cinema FV-5 from the playstore. Now there is an issue for the moment. I cannot record in 1080P (the image zooms in like crazy it seems, I contacted the developer for that). On 4K recording it works perfectly. Also remember in the menu to tab the little shaky hand to switch on the stabilizer as that works miracles.
Now go to the settings - audio - audio source is set to 'built-in mic(video camera)' ------ audio channels - stereo (2) ----- bitrate - 256000 ----- sampling rate - 48000 and very important 'disable audio automatic gain control - is switched on' meaning disabled.
Give it a go.
@junglist @lukesan Hi,
I downloaded Mi Max 3 ROM which is the same SOC and I found some interesting stuff about that!
mediaprofiles.xml in vendor is the same on both devices (at least on 9.5.19.0 which am using right now) but the one in system is different, on Mi Max 3 they changed the aac bitRate in so many lines from 156000 to 192000 which is looks interesting!
Also there’s a trick here, mediaprofiles.xml which is in system is the same media_profiles_vendor.xml which is vendor, same on our device, that means both files must be overriding not only mediaprofiles.xml in system!
here’s a flashable zip from Mi Max 3 ROM for any one wants to give a try, also check out this video which compares between our device and Mi Max 3 regarding this part:
https://www.youtube.com/watch?v=5LKThf9KWjs (09:42)
I still need to perform more testing before I can confirm if this really works or not!
rocker00 said:
@junglist @lukesan Hi,
I downloaded Mi Max 3 ROM which is the same SOC and I found some interesting stuff about that!
mediaprofiles.xml in vendor is the same on both devices (at least on 9.5.19.0 which am using right now) but the one in system is different, on Mi Max 3 they changed the aac bitRate in so many lines from 156000 to 192000 which is looks interesting!
Also there’s a trick here, mediaprofiles.xml which is in system is the same media_profiles_vendor.xml which is vendor, same on our device, that means both files must be overriding not only mediaprofiles.xml in system!
here’s a flashable zip from Mi Max 3 ROM for any one wants to give a try, also check out this video which compares between our device and Mi Max 3 regarding this part:
https://www.youtube.com/watch?v=5LKThf9KWjs (09:42)
I still need to perform more testing before I can confirm if this really works or not!
Click to expand...
Click to collapse
Ok, very cool find! Observations which I made over the last couple of days
We have 2 'issues' on the redmi note 5 (Whyred) so 1) the bitrate and 2) the highpass
1) is as you say media_profiles_vendor.xml we can easily alter that one. Check out the downloadable MI MIX 2 audio quality ... module for Magisk. Download extract and copy that xml file and set the same permissions 644 I believe. Make a backup of the original first. They set the bitrate really high on that one 256kbit/s I believe which is a bit overkill, but compared to 20mbit/s for the video it is nothing and I rather have overkill than 96kbit/s underwater sound.
So that one is easily fixable.
2) The high pass filter seems to be linked to the AGC. I really like the AGC since it keeps the volume constant and should be the standard for the 'normal' people who do not care about extreme hifi things. I would leave it on if I could only switch off the high pass filter. Shoot a video and it will be perfect for 99.999% of the people. Levels will almost be perfect. People easily understandable etc etc etc.
I would like to switch off the AGC (and the filter) for real audio recordings, meaning classical music etc etc .. this involves always having to check if your level is not to low or if the peaks are not to high causing clipping which means distortion.
For issue 2 the only app that I found that can do this is cinema-fv5. I made an error in my previous text to set it to 8MP since then the stabilization doesn't seem to work properly so I now set that to 2592x1296 which seems pretty 16/9 like to me. If you switch off the AGC in this app then you get AGC off and high pass off. Very low level audio but perfect quality. I guess perfect for a concert. (this weekend there is a local festival here so I can really test (and enjoy))
If you want good audio but mono then you need open camera for now. If you set the microphone to 'mono' you will also hear that the sound is good, setting it to stereo gets the noise cancellation working and it sounds like crap.
I'll try those Mi Max 3 things if I find a bit of time. Lets share knowledge and experience and we'll get it working like it should. This is the only small downside of the redmi note 5 that I have found so far. (and that is coming from an S7)
---------- Post added at 10:54 AM ---------- Previous post was at 10:00 AM ----------
@rocker00 Just flashed it. Does set the bitrate to 288kbit/s which is really high but, like said above compared to video that is peanuts. Better a lot more than what it was. But it does not switch off the AGC or high pass. Since you have the rom can you check and attach another file? The file is in the same path (vendor/ etc) our file on the redmi note 5 is called mixer_paths_skus.xml . I guess it might be a bit different on MI MAX but I guess some more audio is being controlled there.
@lukesan First please override media_profiles_vendor.xml manually because it looks like the script is not mounting vendor!
Regarding the file, media_profiles_V1_0.xml, mixer_paths_i2s.xml, mixer_paths_mtp.xml, mixer_paths_skus.xml, mixer_paths_skush.xml, mixer_paths_wcd9326.xml, mixer_paths_wcd9335.xml and mixer_paths_wcd9340.xml
are the same md5! but mixer_paths.xml (which i downloaded the whole rom just to get it in order to try to enable dual speaker) is completely different!
Also i have 2 doubts:
1- in build.prop which is in vendor they changed ro.vendor.audio.sdk.fluencetype to fluence which is none in our device(related to noise cancelling)
2-ACDB (Audio Calibration Database) which is completely different in Mi Max 3 cuz it has dual speaker and two speakers at the bottom, and ACDB is controlled by audio.primary.sdm660.so which is different for sure in both, i hope it's not related to that because it will be really a hard job!
here's the mixer_paths.xml am still looking into it maybe i can find something!
rocker00 said:
@lukesan First please override media_profiles_vendor.xml manually because it looks like the script is not mounting vendor!
Regarding the file, media_profiles_V1_0.xml, mixer_paths_i2s.xml, mixer_paths_mtp.xml, mixer_paths_skus.xml, mixer_paths_skush.xml, mixer_paths_wcd9326.xml, mixer_paths_wcd9335.xml and mixer_paths_wcd9340.xml
are the same md5! but mixer_paths.xml (which i downloaded the whole rom just to get it in order to try to enable dual speaker) is completely different!
Also i have 2 doubts:
1- in build.prop which is in vendor they changed ro.vendor.audio.sdk.fluencetype to fluence which is none in our device(related to noise cancelling)
2-ACDB (Audio Calibration Database) which is completely different in Mi Max 3 cuz it has dual speaker and two speakers at the bottom, and ACDB is controlled by audio.primary.sdm660.so which is different for sure in both, i hope it's not related to that because it will be really a hard job!
here's the mixer_paths.xml am still looking into it maybe i can find something!
Click to expand...
Click to collapse
Probably it is taking the media_profiles_vendor.xml which I already edited manually. Well to check that our device is capable you could check with Cinema-FV5 lite which is free up to 1280x720 resolution. Disable the AGC and you get a nice clear sound full audio spectrum. I'm on a 8.7.5 rom and when I start to record my image is taken from the upper left corner all zoomed in. Not sure which rom you are on, but could you give that a try?
If it's that *.so file we need to address someone with the right knowledge. I've never decompiled stuff like that.
lukesan said:
Probably it is taking the media_profiles_vendor.xml which I already edited manually. Well to check that our device is capable you could check with Cinema-FV5 lite which is free up to 1280x720 resolution. Disable the AGC and you get a nice clear sound full audio spectrum. I'm on a 8.7.5 rom and when I start to record my image is taken from the upper left corner all zoomed in. Not sure which rom you are on, but could you give that a try?
If it's that *.so file we need to address someone with the right knowledge. I've never decompiled stuff like that.
Click to expand...
Click to collapse
I'll try the app ASAP and i'll keep trying...never give up
BTW, that lib is most likely C++ signed binary so you can't do anything about it!
rocker00 said:
I'll try the app ASAP and i'll keep trying...never give up
BTW, that lib is most likely C++ signed binary so you can't do anything about it!
Click to expand...
Click to collapse
Just came back from the festival that I told about. The default MIUI video cam.. wow made a complete mess. The AGC went completely crazy and no bass. Using cinema-FV5 ... wow listening to it right now with my earplugs..... it's like I'm still there. Ok the bass sounds (only) a bit distorted, but I was standing at the front and the smart people there handed out headphones that dampened sound to the kids. I myself suffer from tinnitus so I have -20dB earplugs ... even then it was crazy loud.
So cinema-FV5 is definitely a must with music. Not sure if I can upload something on Youtube without violating copyrights. But surely this phone is capable of recording high quality audio for sure.
Same happened to me. After recording the stage with artists and loud music. It looked OK, stabilised video at 1080p, but sound lacks bass with stock camera app.
I would like to try better camera apps like gcam, just there are ~50 hours for me to wait till I can unlock my bootloader and flash a decent ROM.
Then we could record at 60fps 1080p and [email protected] with normal audio.
kellerman40 said:
Same happened to me. After recording the stage with artists and loud music. It looked OK, stabilised video at 1080p, but sound lacks bass with stock camera app.
I would like to try better camera apps like gcam, just there are ~50 hours for me to wait till I can unlock my bootloader and flash a decent ROM.
Then we could record at 60fps 1080p and [email protected] with normal audio.
Click to expand...
Click to collapse
Forget gcam or other roms for now since they use the same audio path. There is another trick I read about but it involves a lot of work and I would hardly call it a working thing unless you spend a lot of time. Check this thread. I know for the MI MIX but same procedure applies for now. https://forum.xda-developers.com/mi-mix-2/how-to/mi-mix-2-video-sound-recording-quality-t3776450
Leave the 60fps and 4K behind if it is in a dark environment. You might end up with dropped frames etc which is really annoying.
lukesan said:
Forget gcam or other roms for now since they use the same audio path. There is another trick I read about but it involves a lot of work and I would hardly call it a working thing unless you spend a lot of time. Check this thread. I know for the MI MIX but same procedure applies for now. https://forum.xda-developers.com/mi-mix-2/how-to/mi-mix-2-video-sound-recording-quality-t3776450
Leave the 60fps and 4K behind if it is in a dark environment. You might end up with dropped frames etc which is really annoying.
Click to expand...
Click to collapse
Have you tried it? I've tried your trick with the bitrate increase in media_profiles.xml, though I've set it to 192000 and used the FV-5 disable the AGC and it's much better quality! Although the bass is a bit too much pronounced and the meds and highs are a bit sacrificed, it's still much better than stock. But with the custom settings for audio in FV-5 it makes that "underwater" sound, no matter which combination I used, but I did everything according to your post, only if I leave the default values it works. (I now suspect it was maybe because of the stereo recording option)
I am interested to make some changes using the thread you linked, I'm just afraid not to make a mess of volumes in earpiece or introduce echo during a call or something like that, that's why I'm hesitating.
The AGC makes a total mess of recording, it lowers the quality and introduces background noise.
For the 60fps I'm not sure that works as none of the camera app that I've tried are able to record it (I'm on AOSP based rom) because it depends on the camera blobs, and I'm not sure Xiaomi updated the sources, but they did introduce it in MIUI 10 builds.
Cirra92 said:
Have you tried it? I've tried your trick with the bitrate increase in media_profiles.xml, though I've set it to 192000 and used the FV-5 disable the AGC and it's much better quality! Although the bass is a bit too much pronounced and the meds and highs are a bit sacrificed, it's still much better than stock. But with the custom settings for audio in FV-5 it makes that "underwater" sound, no matter which combination I used, but I did everything according to your post, only if I leave the default values it works. (I now suspect it was maybe because of the stereo recording option)
I am interested to make some changes using the thread you linked, I'm just afraid not to make a mess of volumes in earpiece or introduce echo during a call or something like that, that's why I'm hesitating.
The AGC makes a total mess of recording, it lowers the quality and introduces background noise.
For the 60fps I'm not sure that works as none of the camera app that I've tried are able to record it (I'm on AOSP based rom) because it depends on the camera blobs, and I'm not sure Xiaomi updated the sources, but they did introduce it in MIUI 10 builds.
Click to expand...
Click to collapse
Strange that you got the underwater sound. Can you check with this one? https://mediaarea.net/en/MediaInfo Just drag and drop the file on it. It will show the audio properties.
Just to confirm again my settings in FV-5 I changed the resolution to 2592x1296 (turn on handshake thing on where you can actually see where you are recording, weird setting I know). In the 'Audio' settings check the attached screenshot.
lukesan said:
Strange that you got the underwater sound. Can you check with this one? https://mediaarea.net/en/MediaInfo Just drag and drop the file on it. It will show the audio properties.
Just to confirm again my settings in FV-5 I changed the resolution to 2592x1296 (turn on handshake thing on where you can actually see where you are recording, weird setting I know). In the 'Audio' settings check the attached screenshot.
Click to expand...
Click to collapse
Oh yes I did that, but you didn't check the "Custom audio settings" box so the app uses default system settings rather than the ones you selected. Try it out if you didn't already.
And I've checked with MediaInfo, the video was recorded in 96K (because the app didn't use custom settings), but anyway it should be using maximum possible values the device has set in media_profiles_vendor.xml, which is in my case 192K. I've seen now that media_profiles_V1_0.xml is basically the same file and there is 96K set as maximum, maybe both files need to be changed?
Cirra92 said:
Oh yes I did that, but you didn't check the "Custom audio settings" box so the app uses default system settings rather than the ones you selected. Try it out if you didn't already.
And I've checked with MediaInfo, the video was recorded in 96K (because the app didn't use custom settings), but anyway it should be using maximum possible values the device has set in media_profiles_vendor.xml, which is in my case 192K. I've seen now that media_profiles_V1_0.xml is basically the same file and there is 96K set as maximum, maybe both files need to be changed?
Click to expand...
Click to collapse
That's normal since it seems you can't overwrite those settings in our current roms it seems. I bought that FV5 but I emailed support and never gotten answer back, to bad. It always takes the settings from that file on the phone it seems. And yes if you see 96Kb/s than it is normal that you hear these metallic sounds. Can you maybe attach the media_profiles_vendor.xml you have in the /system/vendor/etc dir?
lukesan said:
That's normal since it seems you can't overwrite those settings in our current roms it seems. I bought that FV5 but I emailed support and never gotten answer back, to bad. It always takes the settings from that file on the phone it seems. And yes if you see 96Kb/s than it is normal that you hear these metallic sounds. Can you maybe attach the media_profiles_vendor.xml you have in the /system/vendor/etc dir?
Click to expand...
Click to collapse
Well recording in 96K instead of 48K which was the case with MIUI 9.5 in GSMArena test is already an improvement, however I'm sure this device is capable of even more. So for now, seems that just disabling AGC made a very good difference, it might just get better if we raise the bitrate even more. I've seen in the thread you linked that they actually modified media_profiles_V1_0.xml in case of LineageOS to raise the bitrate, I will now try that one as well.
Here is my file you requested.
lukesan said:
That's normal since it seems you can't overwrite those settings in our current roms it seems. I bought that FV5 but I emailed support and never gotten answer back, to bad. It always takes the settings from that file on the phone it seems. And yes if you see 96Kb/s than it is normal that you hear these metallic sounds. Can you maybe attach the media_profiles_vendor.xml you have in the /system/vendor/etc dir?
Click to expand...
Click to collapse
I confirm that changing the media_profiles_v1_0.xml does increase the bitrate! I have set it to 192K, however since the maximum value that was set for each resolution (I've tested 1080p) is 156K the app used that one based on previous setting. Now every app should use the 156K if we don't alter the bitrate for each resolution separately (that's my guess at least).
lukesan said:
Just came back from the festival that I told about. The default MIUI video cam.. wow made a complete mess. The AGC went completely crazy and no bass. Using cinema-FV5 ... wow listening to it right now with my earplugs..... it's like I'm still there. Ok the bass sounds (only) a bit distorted, but I was standing at the front and the smart people there handed out headphones that dampened sound to the kids. I myself suffer from tinnitus so I have -20dB earplugs ... even then it was crazy loud.
So cinema-FV5 is definitely a must with music. Not sure if I can upload something on Youtube without violating copyrights. But surely this phone is capable of recording high quality audio for sure.
Click to expand...
Click to collapse
I tried this app with the steps you mentioned and yeah, sound is better for sure but it's much better if we can get the same result on stock cam.
let's take it step by step, first is the bit rate, even after using Mi Max 3 files the bit rate remains the same! i checked my old Sony Xperia z2 mediaprofiles.xml and i found the aac bitRate is also 192000, see the video sample result in the 1st pic from sony and second one from note 5 pro!
Now clearly there's something controlling the cam audio beside mediaprofiles.xml since the modifications wasn't enough!
I'll record a log while recording and let's see if i can find any info about that!
@Cirra92 60 FPS is working on 9.5, i thought like you about blobs but surprisingly no! now i'm on 9.5.19.0 and i just got the camera apk from MIUI 10 and i have 60 FPS!
Also i found another thing which is interesting but it's still not working even on Mi Max 3.....looks like 120 FPS HFR is on the way!
Check this video out: https://www.youtube.com/watch?v=0rjZx_5JD1s (13.06)
I managed to get this setting even if it's still grey!
etc\device_features/whyred.xml just added those lines:
<!--whether support camera video high frame-->
<bool name="support_camera_video_high_frame">true</bool>
let's try to make the cam perfect as much as possible!

camera with stereo recording

Hello,
I'm using my mi mix 2 with havoc os 2.9 (android 9), that allows to record AUDIO in stereo, from apps like "hi-q mp3 recorder" if you select "raw source".
As long as I know that this way, this software is using both microphones (one up, and one down) and the recordings are awesome, I want to use a camera that ALSO is able to record audio in stereo.
- Is there a Gcam mod that does that ?
- ... Or any other camera app ?
- ... Or any way to change, e.g., the file /vendor/etc/media_profiles_v1_0.xml to record in stereo ? (already tried to set channels to 2 but it didn't worked)
... And the serious and hard way: I'm a .net + Lua developer, and I'd never made custom roms, so no idea to develop an app in android or even an entire custom rom. I'm assuming that it would be very hard for me to change, debug and made a gcam mod that allows what I want, because, in other words, I don't know where to start ... I prefer a more easy solution.
- Do ALL Android phones follow the same rule to get / set audio configurations ? Is there an 'official documentation' about it ?
Ok, I'm stop asking now (at last! xd) ... Best,
Obsy

Question [HELP] Youtube video distortion

Hello, Im currently using Xiaomi 13 Pro with Global version and running MIUI14. I am having a problem while watching in youtube about distortion or large pixels randomly appear in the video. Anyone experiencing it and possible solution? it is kinda annoying and its just in youtube, other streaming have no problems like primevideo, netflix and disney+. you may check my attached screenshot for reference
Have you tried to turn off MEMC and other boost image quality features that Xiaomi enabled by default?
zSyntex said:
Have you tried to turn off MEMC and other boost image quality features that Xiaomi enabled by default?
Click to expand...
Click to collapse
Hi, can you guide me what to turn off?
diaven said:
Hi, can you guide me what to turn off?
Click to expand...
Click to collapse
Just disable them from Display Settings
zSyntex said:
Just disable them from Display Settings
Click to expand...
Click to collapse
I did played the settings under display, but none of it fix the pixelation on my video. any other work around?
diaven said:
I did played the settings under display, but none of it fix the pixelation on my video. any other work around?
Click to expand...
Click to collapse
Me too have the same issue. Haven't find any solution yet
Can you share the link YouTube you have it? So I can compare with a different device.
Hello, I have a xiaomi poco f3 and experienced something similar but worse (youtube videos showing weird pixels and colors or noise like display at parts of the video, like a broken tv signal). I tried moving from miui 14 to a custom pixel OS but it did not solve the issue. Another thing I experienced is that 240p and below it was working flawlessly, anything above and I'd get the glitches. Likewise, other platforms like twitch.tv worked perfectly. Trying revanced youtube, root version or not, did not work for me. I pinpointed the problem to the vp9 codec, which is used by youtube videos when setting resolution above 240p. The following things worked for me:
a) Whats your refresh rate? Try setting it at 120hz at all times (other options like setting it automatically or per app won't do, for my pixelOS, it was "force peak refresh rate" in Display settings). This solution worked for me globally, including the youtube app, but increases battery consumption.
b) Browser only solution, that works without forcing max refresh rate at all times (and thus saving battery): use the enhanced-h264ify extension, available for android only for kiwi browser, afaik. There, in the addon options, block vp8, vp9 and av1 (iirc they all came pre checked)

Categories

Resources