How to fix “error loading ac3 audio”
BSPlayer on android. Not bad! It has all the features I want, like floating window mode, and the in-app subtitle downloads work really well compared to any other player I have tried.
So I was getting a message like “error loading ac3 audio” when trying to play certain files. This is due to licensing issues with the AC3 codec, I think whoever owns the license started hassling people, so some media players are no longer including support in binary form.
If you are bored already, you could switch video app to MX Player. The binary custom codec can be found quite easily for MX Player, there is an XDA-developers thread devoted to keeping up to date versions for various mobile CPUs. So good luck you boring luser! See ya, good bye, ciao, auf wiedersehen, adíos, you can go off to google search now and will not be missed!
However, BSPlayer is not so well looked after, and you have to go compile the binary codecs yourself. It’s not so easy, as there are a number of different tools involved, and the guys at BSPlayer seem to use linux environment, and I have no linux box currently.
How to Fix this Problem
BSPlayer supply an all-in-one zip file containing the source code and tools required to compile it at (http://www.bsplayer.com/android/source.html). However it takes an awful long time to compile on my 2009 laptop, and then it kept failing the build for me after about 20 minutes :-(((( This makes Ros sad and annoyed!
Build libffmpeg7_v19.so libffmpeg7_v20.so Yourself
First, download and unzip the all-in-one zip from (http://www.bsplayer.com/android/source.html). Have a read of the instructions while you are there as well, then come back here before doing anything else.
So long story short, currently the scripts are not configured correctly to find the bundled version of the “yasm.exe” program. Yasm is required to compile all the lovely fast assembly language portions of the code. My quick and dirty solution was to download the latest version of “yasm.exe” from (http://yasm.tortall.net/Download.html) for my system, and put it in the system path. N.B. You do NOT want the VS, Cygwin, or DOS versions. You want either Win32 or Win64.
I am running 64-bit windows so I got that version of the .exe file. If you are running 32-bit windows, get the 32-bit version. *If you do not know what version you are running, fear not, and read the section in italics below.* Once downloaded (it’s just one file), I renamed it to “yasm.exe”. I then moved this to “C:\Windows”, to quickly put it in the system path. You may have to click “continue” or “allow” to put it into the folder. (If you have no local admin access, look into adding the current folder with “yasm.exe” temporarily into the path environment variable. I am not going to explain how to do that here, google is your friend, or ask a question in the comments below.)
Try building by running the correct build script for your target android device now, e.g. the “build_armv7_neon.bat” for most phones I have had recently. It should complete and leave “libffmpeg7_v19.so” in the newly created “lib” folder in the all-in-one tool collection folder (“ffmpeg-build-windows\lib”).
Install a Pre-compiled Binaries
Someone has uploaded pre-compiled binaries for a few CPU types. Thank you mystery person!
libffmpeg7_v19.so – (https://anonfile.com/C4K2Mcbcb5/libffmpeg7-v19.zip)
libffmpeg7_v20.so – (https://anonfile.com/92K2M4bdbf/libffmpeg7-v20.zip)
Let me know if the link is dead, and I will update it.
Copy the “libffmpeg7_v19.so /libffmpeg7_v20.so” file over to your SDCARD or internal storage of your android device. Fire up BSPlayer, go into the settings, and set the custom codec to point to the new libffmpeg7_v19.so/libffmpeg7_v20.so file. You may need to reboot your device to restart BSPlayer fully.
Any issues, leave a comment and I will get back to you.
*Am I Running 32-bit or 64-bit Windows Operating System?
If you are unsure if you are running 64 or 32 bit windows, do the following to find out:
-Right-click on “My Computer” / “Computer” / “This PC” or whatever they are calling it these days.
-Then click on “Properties” at the bottom of the context menu.
-The “System” window will open.
-Read the “system type” from here somewhere in the middle. It will say either “32-bit Operating System” or “64-bit Operating System”. Try and remember for future reference.