[HOW-TO] Enable AC3 decoding in CyanogenMod - Galaxy S 4 General

This is meant for CyanogenMod 12.1 to 13.0! If you can't decode AC3 in CyanogenMod 12.0 and below, do request and I'll update the post with a fix.
Background information:
Many movies and audio utilise the AC3 codec by Dolby. More info on it here.
To be able to decode and play these movies, your device needs an AC3 decoder implemented.
In CyanogenMod 12.0 and below, the AC3 decoder was implemented just fine.
In CyanogenMod 12.1 onwards however, the decoder was removed due to licensing issues. This broke the ability to play a wide variety of movies.
How-to:
To re-enable the AC3 decoder in CyanogenMod 12.1 onwards, follow as shown:
1. Open /system/etc/media_codecs_ffmpeg.xml in a text editor (CM's File Manager works fine)
2. Search for the following block of lines:
Code:
<!-- Can't use this without a Dolby(TM) license for DD(TM) and DDP(TM)
<MediaCodec name="OMX.ffmpeg.ac3.decoder" type="audio/ac3" >
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
-->
3. Remove the <!-- and --> lines around the <MediaCodec /> tag. The end result is as follows:
Code:
<MediaCodec name="OMX.ffmpeg.ac3.decoder" type="audio/ac3" >
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
4. Reboot, and enjoy AC3 decoding on CyanogenMod 12.1 onwards!
Results:
Before this patch, my Galaxy S4 only achieved a score of 838 on Antutu Video Tester, an app that tests the compatibility of all sorts of media decoder on your device.
See pre_patch.png
After this patch, my Galaxy S4 achieved a perfect score of 1039! This means that pretty much all known media codecs are supported by the device!
See post_patch.png

Tnx

Related

[Completed] [Q] No sound output on 3,5 mm from 5.1 surround movie

I loaded some 5.1 AAC codec 5.1 surround movies on my tablet, but i can only hear the music action in the movie and not the sound. I have a Pipo m7 pro even when i'm selecting a Stereo AAC channel i have the same problem.
Videocodec is H.264 / AVC / MPEG-47 AVC / MPEG-4 part 10
I alredy downloaded the ARMv7 Neon codec for MX player but that didnt help. I dissabled HDMI on the tablet with no result, tried changing HW decoding to software, etc...
Anny1 that can help me with that?
Thanks
You may wish to post in Android Q&A, Help & Troubleshooting
Sounds like your tablet does not support or is missing correct Audio Decoder.
EDIT - As my teammate @philos64 suggested, you may wish to explore VLC for Android Beta

[Q] mxplayer unable to play HEVC 4K or HD with HW Decode on S805 SOC

I own Samsung Note 4 with Snapdragon 805 Soc that supports HEVC or H.265 video with hardware decode upto 4K resolution I. Each 3840X2160
but if we are trying to play a HEVC HD video with HW mode it can only play Audio not video. With SW mode it can play HEVC HD video but when playing HEVC 4K video it's not able to play on HW mode but when playing on SW mode the video is playing with extreme lag.
Kindly fix it as Snapdragon 805 SOC is capable to play HEVC upto 4K without any issues.
Kindly Assist.
Regards,
Gaurav Khungar
Email : [email protected]
findgauravus said:
I own Samsung Note 4 with Snapdragon 805 Soc that supports HEVC or H.265 video with hardware decode upto 4K resolution I. Each 3840X2160
but if we are trying to play a HEVC HD video with HW mode it can only play Audio not video. With SW mode it can play HEVC HD video but when playing HEVC 4K video it's not able to play on HW mode but when playing on SW mode the video is playing with extreme lag.
Kindly fix it as Snapdragon 805 SOC is capable to play HEVC upto 4K without any issues.
Kindly Assist.
Regards,
Gaurav Khungar
Email : [email protected]
Click to expand...
Click to collapse
If it's supported natively it can be played with stock player.
Have you tried in stock player?
If it can be played by Stock Player, it suppose to be played in HW decoder of mx player.
If stock player can play, kindly collect the log after playing in HW decoder & attach here.
Regarding SW decoder, Your CPU is powerful enough to play HEVC HD video. But, it will obviously lag since it needs enormous CPU power to decode HEVC 4K videos.
HEVC HD and 4K on S805 SOC HW Decode Not Working on Note 4
Hello ktsamy,
No the stock player present in Note 4 LTE model is not able to play either HEVC / H.265 files natively in stock player only audio that can be played from those videos. Only HEVC HD contents AUDIO can be played in stock player (no video) and HEVC HD content can only be played on SW mode in MXPlayer almost 95% lag free and HEVC 4K is playing in SW mode only but it lags every Milli second.
Gionee S 5.5 is able to play HEVC HD on HW mode is mxplayer but Snapdragon 805 SOC is not, its such a shame. But I don;t think its a CPU fault as per my understanding. It is related to Samsung Media SDK they used and it looks MX player can also be altered with the MX team so that they can leverage the real potential of Qualcomm Snapdragon 805 SOC 2.7 Ghz Quad Core .
You can see below lines :
"4K playback with H.264 (AVC) and H.265 (HEVC) formats
4K capture with H.264 (AVC) format
Hollywood Quality Video™ technology (in HW) for post-processing DASH supported"
Check the above mentioned lines:
on Snapdragon Website as I cannot post link here as I am new member
Also check brief pdf file saying native HEVC support by S805 SOC Also attached here:
Please check and advise
ktsamy said:
If it's supported natively it can be played with stock player.
Have you tried in stock player?
If it can be played by Stock Player, it suppose to be played in HW decoder of mx player.
If stock player can play, kindly collect the log after playing in HW decoder & attach here.
Regarding SW decoder, Your CPU is powerful enough to play HEVC HD video. But, it will obviously lag since it needs enormous CPU power to decode HEVC 4K videos.
Click to expand...
Click to collapse
findgauravus said:
Hello ktsamy,
No the stock player present in Note 4 LTE model is not able to play wither HEVC / H.265 files natively in stock player only audio that can be played from those videos. Only HEVC HD contents can be played in stock player and HEVC HD content can only be played on SW mode in MXPlayer and HEVC 4K is playing in SW mode only but it lags every milli second.
Gionee S 5.5 is able to play HEVC HD on HW mode is mxplayer but Snapdragon 805 SOC is not, its such a shame. But I don;t think its a CPU fault as per my understanding. It is related to Samsung Media SDK they used and it looks MX player can also be altered with the MX team so that they can leverage the real potential of Qualcomm Snapdragon 805 SOC 2.7 Ghz Quad Core .
You can see below lines :
"4K playback with H.264 (AVC) and H.265 (HEVC) formats
4K capture with H.264 (AVC) format
Hollywood Quality Video™ technology (in HW) for post-processing DASH supported"
Check the below link for above mentioned lines:
on Snapdragon Website as I cannot post link here as I am new member
Also check brief pdf file saying native HEVC support by S805 SOC Also attached here:
Please check and advise
Click to expand...
Click to collapse
Can you upload media_codec.xml & media_profiles.xml which can be found in /system/etc/
If you can't upload upload it anywhere like dropbox or google drive. You can post the links by masking ( like h**p://www.google. com/ )
HEVC HD and 4K on S805 SOC HW Decode Not Working on Note 4
Hello ktsamy,
you have asked me to provide media_codec.xml & media_profiles.xml which can be found in system-->etc. Can you please confirm if you asking about these files from System orPC or my Note 4. If Note 4 can you please provide complete path ?
Thanks.
ktsamy said:
Can you upload media_codec.xml & media_profiles.xml which can be found in /system/etc/
If you can't upload upload it anywhere like dropbox or google drive. You can post the links by masking
Click to expand...
Click to collapse
findgauravus said:
Hello ktsamy,
you have asked me to provide media_codec.xml & media_profiles.xml which can be found in system-->etc. Can you please confirm if you asking about these files from System orPC or my Note 4. If Note 4 can you please provide complete path ?
Thanks.
Click to expand...
Click to collapse
From your mobile. You need a root explorer. Best way is Es File Explorer. Install es file explorer, open it, tap on sdcard. Now click on device then system then etc and you will have it. You can even pull from pc using adb command with sdk installed.
findgauravus said:
Hello ktsamy,
you have asked me to provide media_codec.xml & media_profiles.xml which can be found in system-->etc. Can you please confirm if you asking about these files from System orPC or my Note 4. If Note 4 can you please provide complete path ?
Thanks.
Click to expand...
Click to collapse
From Note4
Use third party file explorers like ES file explorer
It doesn't requires root access.
In ES, From navigation panel select Device
Browse /system/etc/
Copy the files media_codecs.xml & media_profiles.xml
HEVC and S805 SOC and Note 4 HW mode
Hello ktsamy and All respected members ,
I have attached required files with changed extensions to txt.
Please check and advise
ktsamy said:
From Note4
Use third party file explorers like ES file explorer
It doesn't requires root access.
In ES, From navigation panel select Device
Browse /system/etc/
Copy the files media_codecs.xml & media_profiles.xml
Click to expand...
Click to collapse
findgauravus said:
Hello ktsamy and All respected members ,
I have attached required files with changed extensions to txt.
Please check and advise
Click to expand...
Click to collapse
If you look at the media_codecs.xml, all HEVC related entries are marked as comments ( Will starts with <!-- and ends with --> )
so, Samsung has disabled HEVC decoders (May be a licensing issue).
That's why MX Player (even Stock Player) can't decode natively. So, You have to use S/W decoder in order to play HEVC and Playback may not be smooth at higher resolutions since it needs extreme power to decode.
HEVC and S805 SOC and Note 4 HW mode
Hello Ktsamy and All Respected Members,
Can you please suggest is there any way we can enable teh HEVC entries to provide hardware decode of HEVC files HD and 4K both without rooting of the device and without warranty void.
I have also escalated the issue to Samsung India Support Team. They have asked me to send everything via email and with details.and bill copy of Note 4.
If its a feature of CPU it should be enabled by Samsung in Note 4.
Please also confirm if S805 SOC is capable of decoding HEVC 4K with HW mode ?
I also own Ginonee Elife s 5.5. mobile and it can play HD HEVC file with HW mode in mxplayer but not in HW+ mode and also it is not abale to play HEVC 4K video file.
Please revert.
ktsamy said:
If you look at the media_codecs.xml, all HEVC related entries are marked as comments ( Will starts with <!-- and ends with --> )
so, Samsung has disabled HEVC decoders (May be a licensing issue).
That's why MX Player (even Stock Player) can't decode natively. So, You have to use S/W decoder in order to play HEVC and Playback may not be smooth at higher resolutions since it needs extreme power to decode.
Click to expand...
Click to collapse
findgauravus said:
Hello Ktsamy and All Respected Members,
Can you please suggest is there any way we can enable teh HEVC entries to provide hardware decode of HEVC files HD and 4K both without rooting of the device and without warranty void.
I have also escalated the issue to Samsung India Support Team. They have asked me to send everything via email and with details.and bill copy of Note 4.
If its a feature of CPU it should be enabled by Samsung in Note 4.
Please also confirm if S805 SOC is capable of decoding HEVC 4K with HW mode ?
I also own Ginonee Elife s 5.5. mobile and it can play HD HEVC file with HW mode in mxplayer but not in HW+ mode and also it is not abale to play HEVC 4K video file.
Please revert.
Click to expand...
Click to collapse
There is no way to enable it until or unless Samsung includes the decoders.
According to the Specification Snapdragon 805 SoC supports HEVC 4K decoding.
But, I think even if chipset has the support, Samsung must obtain license to include the decoders.
That could be the possible reason.
Regarding the Gionee s5.5 HW+ issue,
can you play the video in HW+ when it fails, it will automatically switch over to S/W.
Now close the video & Goto Help >> Bug Report.
Save the logs in your device & upload here.
It may be helpful to diagnose the issue.
NOTE 4 HEVC and Snapdragon 805 SOC Native Support Issue
Hello Ktsamy and All Respected Members,
Kindly confirm is there any way we can enable or include the HEVC decoder with root in Note 4
Also for gionee S 5.5 I am attaching bug report for the HEVC Video I can play on HW mode and SW mode but not on HW+ mode on mxplayer
ktsamy said:
There is no way to enable it until or unless Samsung includes the decoders.
According to the Specification Snapdragon 805 SoC supports HEVC 4K decoding.
But, I think even if chipset has the support, Samsung must obtain license to include the decoders.
That could be the possible reason.
Regarding the Gionee s5.5 HW+ issue,
can you play the video in HW+ when it fails, it will automatically switch over to S/W.
Now close the video & Goto Help >> Bug Report.
Save the logs in your device & upload here.
It may be helpful to diagnose the issue.
Click to expand...
Click to collapse
findgauravus said:
Hello Ktsamy and All Respected Members,
Kindly confirm is there any way we can enable or include the HEVC decoder with root in Note 4
Also for gionee S 5.5 I am attaching bug report for the HEVC Video I can play on HW mode and SW mode but not on HW+ mode on mxplayer
Click to expand...
Click to collapse
The logs are not complete & doesn't contain playback information.
Kindly play again & then collect the logs
HEVC Note 4 S805 SOC HW Native Decode Issue
Hello ktsamy and All respected members,
Please find the atached logs for gionee issue.
Also confirm me if we root Note 4 then can we include hevc HARDWARE decoders that and HW decode HEVC up to 4k
ktsamy said:
The logs are not complete & doesn't contain playback information.
Kindly play again & then collect the logs
Click to expand...
Click to collapse
I am too interested in having bac internal AC-3 and HEVC support from samsung.If it is licensing issues,Samsung could charge for optional support.
(Media Center is not included in Windows anymore!)
findgauravus said:
Hello ktsamy and All respected members,
Please find the atached logs for gionee issue.
Also confirm me if we root Note 4 then can we include hevc HARDWARE decoders that and HW decode HEVC up to 4k
Click to expand...
Click to collapse
Still the logs are incomplete.
How did you collect the logs?
mx player plays hevc files
Anyone wants to plays hevc video file on mx player . First rename the video files (there will be two video files the other one will be like '0') with an .mkv or .avi format whichever the file belongs to in your file manager then the mx player will be able to play hevc videos.
aveshghori said:
Anyone wants to plays hevc video file on mx player . First rename the video files (there will be two video files the other one will be like '0') with an .mkv or .avi format whichever the file belongs to in your file manager then the mx player will be able to play hevc videos.
Click to expand...
Click to collapse
The proper fix is: Settings > List > File extensions > add HEVC here
He said the hevc on mx does not work very properly
Envoyé de mon GT-I9505 en utilisant Tapatalk
no chance it will run on sd801

[Bug Report][Resolved] Stream has no audio until s/w decoder is forced (1.7.34)

Hi Devs,
I have custom codecs installed in my MX player and I have no issues playing local files with aac audio. But when I play a hls stream with aac audio, the sound is disabled by default. In order to enable the sound I should manually open sound menu and tick the checkbox of "use software decoder" and select the audio steam. As this doesn't happen for local files I believe it should be a bug. Let me know if you need any more info.
Regards
Edit : I checked again and noticed my local file audio codec is AC-3 and network steam codec is AAC. So they are not having the same audio codec. May be the problem is AAC audio codec. My device is nexus 10 running stock android lollipop.
I'm having this same problem (with version 1.7.33, could not make 1.7.34 work) both with local (SD) and network (NAS) versions of the same files. All audio will work however if I turn the S/W audio decoder switch on. See my thread about the problem here: http://forum.xda-developers.com/apps/mx-player/aac-h-decoder-version-1-7-33-t2955189 .
My problem with AAC (streamed from a NAS) has been solved with published version 1.7.34 without the need of any special setting, thanks to devs for fixing it!
The problem has been resolved for me as well Thanks devs.

how is MXPlayer able to play non-native codecs?

Greetings,
I'm working on an android port of Android 5.1.1 on a device that does not have native codec support for MPEG2 (no video/mpeg2 in /etc/system/media_codecs.xml), yet I find when I install MX Player on this platform it can playback MPEG2 files. Note I have not downloaded/installed any codec packs. Is there some native software decode built into MX Player? The processor architecture is an ARM Coretex-A8.
My goal is to understand how to playback MPEG2 in an application of my own, so I'm trying to understand how MX Player does it.
Thanks for any info,
Tim

Google Assistant - Talk back fix for Miui roms

I just thought i would share this, as it's been bugging me on Miui that the Google Assistant didn't always speak results like what is the weather forecast.
https://support.google.com/websearch/forum/AAAAgtjJeM4MwaLxKImwEc/?hl=en
change the value of mm.enable.qcom_parser in build.prop to 245389 (3183219 as mentioned in the article is for another device that supports different codecs) fixes the issue as mentioned in the google bug report for the Xiaomi a1.
I've attached a magisk module that is a modified Camera2 api enabler script. It enables Camera 2 api, adjusts noise cancelation to fluencepro, adds EIS entry for Google camera and turns off noise cancellation for voice recordings
Edit: modified Magisk package to the value @Stoffl_ calculated, 245389, for the mido. Thanks
Thanks, will try this as the TalkBack issue has bugged me for a while.
A better explaination of what is happening - based on that information we can probably work out the right number for the Redmi Note 4x to disable the ogg hardware codec until its updated - The above number may be correct, but we probably just need to get the original number, and just change the bit for Ogg to off for the moment.
http://en.miui.com/forum.php?mod=viewthread&tid=1465017&page=2#pid21050310
21#
01:04, Jan-10-2018 | From PC |
This post was edited by Theliel at 18:09, Jan-09-2018
Is not exactly in that way.
In first instance, the issue is only present in qualcom SoC (not Mediatek) Nougat, Oreo work fine.
In second place, qcom_parser number is a mask, representing all supported codecs directly in hardware (not software). Each SoC support different codecs.
For Mi4c:
Codecs: DivX DivXHD AVI AC3 ASF AAC QCP DTS 3G2 MP2TS
mm.enable.qcom_parser=3379827
3379827 = 1100111001001001110011
Each bit represent a codec, if you set a bit to 1, you enable hw support to that codec. A more simpe example, imagine only 3 codecs and in the exact order: mp3 ogg acc
111 enable all codecs = 7
001 enable only aac = 1
101 enable mp3 and aac, disable ogg = 5
You can't use the same value to each device, because each device support a different array of codecs. The real issue is only with qcom hw lib/codec ogg (container, real codec is opus), that is the audio returned by google. Devices without hw support of ogg or with ogg disabled, work fine in most Nougat.
In my investigations, ogg is placed in 15th position in most of all qcom devices.
So, for default Mi4c:
3379827 = 1100111001001001110011 | Work fine, hw is not used anyway, not supported
Default Mi6 Nougat:
1048575 = 11111111111111111111 | Dont Work
1032191 = 11111011111111111111 | Work perfecly
If you force all devices to 3183219 (for example), yes, you are disabling ogg bit, but you are disabling a lot of other codecs too, is not recommended, not a solution.
The real solution is a newer driver/codec to solve hw codec. Temporal fix is ONLY flip ogg bit to disable hw support and use only software, without touching the others bits. Each device, have a different hw arraw codec, so you shouldn't use the same value to all, is a big mistake
Click to expand...
Click to collapse
So..if I understand this correctly...
My Redmi Note 4X Global on Global stable Rom 9.0.5.0 build.prop has currently the following values
Code:
#codecs:(PARSER_)AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE
mm.enable.qcom_parser=261773
261773 decimal = 111111111010001101 in binary
According to the post above and the comments in my build prop bit 15 should be Ogg support.
111111111010001101 means Ogg is enabled
So the correct value to disable Ogg HW support would be 111111111010000101 = 261765
Correct ?
Hmmm .... this is very interesting - but also probably error prone. With SlimROM v1.17, I have this "mm.enable.qcom_parser=1048575" (i.e., 1111 1111 1111 1111 1111). It seems that everything is turned on! But it is not clear what one will be disabling if any alteration is made.
Turns out the bits should be read from right to left, whoops.
http://en.miui.com/forum.php?mod=redirect&goto=findpost&ptid=1465017&pid=21367895
And the starting zero bits aren't counted, which would explain why number of codecs and bits didn't match up in my example.
I'm now using 229005 and so far google assistant talkback is working.
*edit*
I had the dumb and counted wrong
111011111010001101 = 245389 is working, weather and time talkback functional!!
Only OGG hardware encoding should be disabled, everything else is should be on default rom setting.

Categories

Resources