This is a simple tool for the sound quality improving of wireless headphones with the sbc codec on a mac.
- About
- Demo
- Features
- Getting Started
- Built With
- Contributing
- Code of Conduct
- Versioning
- Authors
- Licensing
The sbc-bitpool-expander is a mac automator program, which executes a shell command to change the SBC encoding bitpool values. This changes could up the bitrate value till 357 kbit/s for SBC audio.
The SBC codec has many different parameters:
- Channels count and type: Joint Stereo, Stereo, Dual Channel, Mono;
- Frequency bands count: 4 or 8;
- Package blocks count: 4, 8, 12, 16;
- Quantization bit allocation algorithm: volume, SNR;
- bit pools max-min value: in usually it's from 2 to 53.
These parametters uses the bitpool value and affects the final audio quality.
For instance, Dual Channel mode encodes channels separately, using the entire bitpool for each channel. The forcing device to use Dual Channel instead of Joint Stereo, allos get an almost double bitrate with the same maximum bitpool value: 617 kbps.
These fixed values, Bitpool and Bitrate, originate from a table with high-quality audio recommended values. But it's just a recommendations.
The Bluetooth stack of macOS have artificial limitations on the maximum value of the bitpool parameter:
- Min A2DP bit pool value is among 2;
- Max A2DP bit pool value is among 40;
- Fact A2DP bit pool value is dinamicaly and changes from max to min values. This limitations directly affects the maximum bitrate.
Almost all headphones also limit the maximum bitpool value to 53. But such a bitrate will never be negotiated under normal conditions, on ordinary Bluetooth stacks on macOS.
The sbc-bitpool-expander is a mac automator program, which executes a shell command to change the SBC encoding bitpool values. This changes could up the bitrate value till 357 kbit/s for SBC audio. At launch, this tool setups the bit pool min value to 53. This setupping prevents the bit pool from being changing to the standard minimum values of 2 and affects the final bitrate and sound quality.
This animation demonstrates how is the simple to use this tool.
This pictures demonstrates how the increasing bit rate from 261 kb/s (BEFORE) to 357 kb/s (AFTER) by the bitpool increases after launching this tool.
After launching this tool, the following lines will appear in the bluetoothaudiod macOS settings:
{
...
"Apple Bitpool Max" = 64;
"Apple Bitpool Min" = 53;
"Apple Initial Bitpool" = 53;
"Apple Initial Bitpool Min" = 53;
"Negotiated Bitpool" = 53;
"Negotiated Bitpool Max" = 64;
"Negotiated Bitpool Min" = 53;
...
}
- Increase the sbc bluetooth audio bit rate with in several click.
- For more information on an upcoming development, please read the todo list.
- For more information on a releases, a features and a changes, please read the changelog notes.
These instructions allow to get a copy of this project and run it on a local machine.
Before using it, make sure that follows software are installed on the local machine:
- macOS - the operating system under which the process is executing;
If any of the listed programs is not installed, then it can be installed by instruction as described below.
-
- Install macOS by this instruction.
In order to install it is enough to download executable file sbc bitpool expander.app
for the required release from this page:
https://github.com/ololx/sbc-bitpool-expander/releases/
If you want to install the source files it is quite simple to clone or donload this repository.
For the cloning this repository to a local machine, just use the follows link:
https://github.com/ololx/sbc-bitpool-expander
For use it is required to:
-
Go to the directory where you download this tool (optionally):
- via Finder;
- via Terminal prompt;
cd /{path to parent dir with this repository}/
-
Launch the tool in macOS (optionally):
- via double-click on
sbc bitpool expander.app
; - via Terminal prompt;
open sbc\ bitpool\ expander.app
- via double-click on
-
Set the required bitpool size values. In general, these will be the following settings:
- Current/Initial bitpool value is 53;
- Min bitpool value is 53;
- Max bitpool value is 64;
-
Enter the administrator credentials if necessary
-
Reconnect a headphones to a local machine via
Bluetooth
NOTE: It's universal settings and it works for the most devices. Below you can find settings for better sound quality on your device. If you want to watch your current settings:
sudo defaults read bluetoothaudiod
or if you want reset it to default:
sudo defaults delete bluetoothaudiod
You may experement with "Apple Bitpool Min" setting. For example, the best sound on my device "Harman Kardon Go + Play" is on value 111:
sudo defaults write bluetoothaudiod "Apple Bitpool Min" -int 111
sudo defaults write bluetoothaudiod "Apple Bitpool Max" -int 111
And I got stable bit rate at 705 kb/s.
- Xcode - the IDE for the
AppleScriptObjC
automatisation development.
If you want to contribute this project - you are welcome and have fun. Please visit the contributing section for details on this code of conduct, and the process for submitting pull requests.
In order to ensure that all is welcoming, please review and abide by the code of conduct.
For the versioning is used Semantic Versioning. For the versions available, see the changelog or the tags on this repository.
- Alexander A. Kropotin - initial work - ololx.
- Roman - contributing - dE1l.
This project is licensed under the MIT license - see the lisence document for details.