Total Commander is one of those few magical tools that can boost your productivity as an IT pro significantly. It not only replaces File Explorer; it does so in a way that makes you wonder how you suffered Explorer for such a long time. It has keyboard shortcuts for everything and is super-configurable, fast and efficient. On top of that, it can probably replace half a dozen tools in addition to File Explorer. This article explains how to get started with Total Commander. A future post will add some more advanced tips.

Why Total Commander?

There are many reasons why you might want to take a look at a tool like Total Commander, but the most important reason for me is that File Explorer sucks big time, at least for IT pros. Please read my earlier article on the subject for details.

In addition to File Explorer being a horrible tool the following speak for Total Commander:

Efficiency: get more done in less time

Ergonomics: keyboard trumps mouse every single time

Total Commander’s Origins

Total Commander’s two-window concept originates, of course, from Norton Commander. Also, basic keyboard shortcuts like F5 for copying have been kept. If you can use Norton Commander or any of its modern clones (e.g. Midnight Commander on Linux), you can also use Total Commander – to a degree.

Total Commander goes back to at least 1993 – and the current version (released 2019) still supports Windows 95, which is kind of scary. I bought my personal license way back in 2001 – and it is still valid for the latest version today. This is probably the best investment I ever made.

Getting Started

When you start Total Commander for the first time, it will ask you for the type of icon library you want it to use. Choose option two:

Now you are looking at the application’s main window. Ignore it – for now! Head straight to the options in the Configuration menu and make the following changes to the default configuration.

Configuration – Display

In the Display section, enable TC to show hidden and system files (you are an IT pro, right?). Also, make sure to disable TC putting square brackets around directory names:

Configuration – Icons

In the Icons section, enable TC to show overlay icons which are used by many synchronization tools to indicate a file’s status:

Configuration – Tabstops

In the Tabstops section, configure file extensions to be displayed directly after the filename. The default looks just too weird.

Configuration – Folder Tabs

In the Folder Tabs section, tell Total Commander to open new tabs directly next to the current tab. I find the user experience of this variant almost always superior to new tabs appearing at the far right end of the list of tabs.

Configuration – Language

In the Language section, optionally switch from English to your language of choice.

Configuration – Operation

In the Operation section, change the mouse selection mode (which defines how you can select items with the mouse) to the Windows standard.

Configuration – Edit/View

In the Edit/View section, configure your editor(s) of choice. Total Commander comes with a built-in viewer, but you almost certainly want to replace it with something else. As you can see in the screenshot, I am using Notepad++ as “viewer” (accessible via F3) and Visual Studio Code as “editor” (accessible via F4). That allows me to bring up any (!) file in any of the two editors by pressing a single function key.

Configuration – Quick Search

In the Quick Search section, let Total Commander know that you want to be able to select files or directories by typing the first few characters of their names.

Configuration – Zip Packer

In the Zip Packer section, configure the ZIP packer to use maximum compression (why would you not?).

Configuration – Misc.

In the Misc. section, we are going to spend a bit of time. It allows us to redefine (or configure new) hotkeys. Total Commander comes with a very extensive set of default keyboard shortcuts already, but nevertheless, I find some alterations and extensions necessary.

Start by defining F2 as the keyboard shortcut for renaming files (or directories):

Give the escape key something to do (unselect):

If you are like me, you want CTRL+F4 to close the current tab:

Finally, the best part: teach Total Commander to switch to the first tab when you press CTRL+1 (just like in your browser). Repeat this for CTRL+2, and so on:

]]>https://helgeklein.com/blog/2019/05/total-commander-getting-started/feed/1Migrating WordPress from Multisite to Single With MU-Migrationhttps://helgeklein.com/blog/2019/04/migrating-wordpress-from-multisite-to-single-with-mu-migration/
https://helgeklein.com/blog/2019/04/migrating-wordpress-from-multisite-to-single-with-mu-migration/#respondMon, 15 Apr 2019 16:25:10 +0000https://helgeklein.com/?p=11887The post Migrating WordPress from Multisite to Single With MU-Migration appeared first on Helge Klein.
]]>

In addition to various commercial plugins, there is one free tool that helps with WordPress migrations to or from multisite installations. MU-Migration is a WP-CLI plugin that worked flawlessly when I wanted to convert helgeklein.com from a multisite into a single site installation. Here are the steps I took.

Migration Overview

When migrating a site with MU-Migration, you perform the following basic steps:

Create a ZIP archive of your existing site (in a multisite installation, you can include only one or all sites)

Set up a new WordPress site

Restore the ZIP archive in the new WordPress site

That is (mostly) it. The remainder of this article covers the steps in more detail and lists additional manual steps I had to perform.

Migration in More Detail

The tool’s GitHub page gives a decent overview of what MU-Migration can do. Start by reading it.

As I wanted to perform an “in-place” migration from multisite to a single site, I simply created a new directory public_html_new on the same level as the existing public_html directory. Then I downloaded and extracted WordPress on my client machine, adding the missing pieces to the directory structure that I listed above.

As a next step, I renamed wp-config-sample.php to wp-config.php, transferred some custom settings from the existing wp-config.php over and updated the database connection information with the values I had just configured on the MySQL commandline.

After that, I uploaded the directory structure from my client machine to public_html_new. Then came the most critical part: replacing the old website directory with the new:

mv public_html public_html_old
mv public_html_new public_html

As the last step, I ran WordPress’ installation script from https://helgeklein.com/wp-admin/install.php.

Restoring the Archive

To restore the site archive in your source site, run:

wp mu-migration import all ../helgeklein.zip

With that, your migrated site should be up and running, though some manual steps might still be required.

Manual Steps

In my case, a number of manual steps were still required. I am listing them here briefly for completeness’ sake:

Enable plugins

Add entries to .htaccess required by W3 Total Cache

Add API keys to plugins: UpdraftPlus, Duo Two-Factor Authentication

Reconfigure plugins: UpdraftPlus

Other Things MU-Migration Can Do

MU-Migration could be useful in many more scenarios than what I described above. For example, did you ever consider setting up a WordPress staging site?

Hetzner offers many types of dedicated servers at very attractive prices and – astonishingly – good support. This article lists some issues we encountered while installing Windows Server 2019 on the EX62 and AX100 servers and how we worked around them. Reading the earlier article is highly recommended.

Server Hardware

Most of Hetzner’s servers are custom builds based on regular PC mainboards. You can get “real” servers, too (they have several Dell offerings), but at a much higher price. I can relate from many years of personal experience that Hetzner’s “non-server” machines are very reliable.

EX62 – Intel

The EX62 is a powerful Intel machine, available for €82/month (traffic included). Specs:

AX100 – AMD

The AX100 is a powerful AMD machine, available for €130/month (traffic included). Specs:

AMD Ryzen Threadripper 2950X, 16 cores

Cinebench R15 single core: 180

Cinebench R15 multi core: 3187

128 GB RAM

SSDs (priced extra):

1 x SSD NVMe 1.92 TB datacenter edition: €58

Mainboards

In order to look for drivers or compatibility information, you need to know a server’s mainboard. Unfortunately, Hetzner does not publish the mainboard types they use for their custom builds. To make planning easier for others here are the boards we saw in our machines:

EX62: Gigabyte B360HD3PLM-CF (U3E1)

AX100: MSI X399 HZ (SP3r2)

Installing Windows Server 2019

Booting from the Setup ISO

In order to be able to install your own OS, you need to ask Hetzner Support to connect a remote KVM console called LARA. I have described the process in detail in my earlier article.

You have two options to boot from the Windows setup ISO image:

Copy the ISO file from another Hetzner machine to a Hetzner backup space or storage box and mount it from the LARA console

Ask Hetzner support to copy your ISO to a bootable USB thumb drive and attach said drive to your server

Let me make this quick: the second variant works much better. Mounting ISOs from the LARA console results in extremely slow setup procedures that may run into timeouts after several hours.

Installing Missing Drivers

EX62

Windows Server 2019 does not come with drivers for the mainboard’s NIC, an Intel I-219. Install the Windows 10 drivers from Gigabyte for both the NIC and the Intel chipset.

AX100

Once that is done, there remain three unknown devices in Device Manager. For each of those, opt to install a driver manually and point the OS wizard to the extracted chipset driver you downloaded in the previous step.

The Intel I211 NIC requires more work. The Gigabyte driver cannot be installed because it is blocked on server versions of Windows. Nevertheless, download and extract it. Then proceed as follows:

]]>https://helgeklein.com/blog/2019/04/windows-server-2019-hetzner-ex62-ax100-dedicated-servers/feed/0Searching for Keyword Strings in WordPress Postshttps://helgeklein.com/blog/2019/03/searching-keyword-strings-wordpress-posts/
https://helgeklein.com/blog/2019/03/searching-keyword-strings-wordpress-posts/#respondTue, 26 Mar 2019 19:47:41 +0000https://helgeklein.com/?p=11819Surprisingly, there does not seem to be a plugin or some other “easy” way of searching your WordPress posts for certain keywords, shortcodes or HTML tags. However, if you have ever been through a theme migration, you know that standardizing on HTML tags and shortcodes makes the process a lot less painful. If you know […]

]]>Surprisingly, there does not seem to be a plugin or some other “easy” way of searching your WordPress posts for certain keywords, shortcodes or HTML tags. However, if you have ever been through a theme migration, you know that standardizing on HTML tags and shortcodes makes the process a lot less painful. If you know what you are looking for, this solution to search your posts’ content might be just what you need.

Why Not Use a Plugin or Something?

The plugins I found seem to be focused on searching and replacing. That was not what I was looking for. I simply wanted to a way to identify posts where certain strings were used in the content.

Sadly, the same is true for WP-CLI, an otherwise fantastic utility. It does not have a “search only” mode, either.

What You Need

I do not have phpMyAdmin on our server, mostly for security reasons. But I do have SSH access. That leaves me with command line tools’ whenever I need to do things that go beyond WordPress’ UI.

This article assumes that you can SSH to your server and run MySQL commands.

Connecting to the Database

Connect to your MySQL instance:

mysql -u root -p

You will be asked for root’s database password. Once you entered it successfully you can run SQL queries, e.g. to list databases:

show databases;

The result should look similar to the following:

Next, select your WordPress database (make sure to use the right database name from the list above):

use wordpress;

The following commands will affect the selected database wordpress.

Searching the WordPress Database

Now we can search the posts for keywords. I was preparing for a migration and wanted to list posts that contained certain shortcodes, e.g. “[quote]”. The following command lists all post containing that string:

SELECT ID, POST_TITLE FROM wp_posts WHERE post_content LIKE '%

%' AND post_status = 'publish';

Note that the search term is enclosed in percent signs (SQL’s wildcard character). Also, note the check for the published status. Without the latter, you will get post revisions, too.

That is already very nice, but it would be a lot more useful if it included each post’s URL for easy access. Unfortunately the wp_posts table only stores the slug, not the full URL. However, we can easily work around that by concatenating the URL’s base path with each post’s slug like this:

]]>https://helgeklein.com/blog/2019/03/searching-keyword-strings-wordpress-posts/feed/0Renaming Multiple Files With Regular Expressions in Total Commanderhttps://helgeklein.com/blog/2019/03/renaming-multiple-files-with-regular-expressions-in-total-commander/
https://helgeklein.com/blog/2019/03/renaming-multiple-files-with-regular-expressions-in-total-commander/#respondWed, 06 Mar 2019 12:42:22 +0000https://helgeklein.com/?p=11775I prepend every document I save to disk with the year, month, and day. While I do that manually for individual files, sometimes I encounter larger numbers of files with an “incorrect” naming scheme. Here is how to quickly rename many files with the help of the versatile Total Commander. Renaming Files With Regular Expressions […]

]]>I prepend every document I save to disk with the year, month, and day. While I do that manually for individual files, sometimes I encounter larger numbers of files with an “incorrect” naming scheme. Here is how to quickly rename many files with the help of the versatile Total Commander.

Renaming Files With Regular Expressions

Sometimes you have sets of files with all the right components already in their names but in the wrong places. In one case, the year and month were at the end of the name, instead of the start. Additionally, I wanted to replace underscores with spaces (we are in the 21st century, after all).

Fixing that is surprisingly simple with Total Commander’s multi-rename tool. I defined a regex with two groups (sections in parentheses) to capture the year and month, respectively. The contents of the capture groups is placed in the variables $1 and $2 which I then used to build the new names.

Let me explain in more detail. This is the format of the existing files:

Search for the following regular expression, matching the source file names and capturing the month and year:

Bank_statement_(\d{2})_(\d{4})\.pdf

Replace with new filenames, making use of the regex capture group variables:

$2-$1 Bank statement.pdf

Using Total Commander Multi-Rename Tool

In Total Commander, select the files you want to rename, then press CTRL+M to bring up the multi-rename tool. Fill out the search and replace fields. As you can see below, Total Commander provides a preview of the changes. Once you are satisfied with the preview click “Start!” to perform the renaming.

Side note: if you are on a high-resolution screen, you will notice that the line with the “RegEx” checkbox in the screenshot is only partly visible. That seems to be a rare DPI scaling bug in Total Commander. It most definitely is an exception: Total Commander is fully high-DPI aware.

This post describes a real-world configuration of the free VPN server SoftEther. It shows how to set up a VPN for macOS and Windows clients on a Hyper-V Windows guest VM.

Our Setup and Requirements

Our situation was as follows:

Multiple Hyper-V hosts with VMs on an internal network.

One VM is the VPN gateway. It is configured with two NICs. One is connected to the internal network, the other to the internet.

The VPN should provide remote access via SSTP for Windows and L2TP for macOS clients.

It should be possible to connect to the VPN with the clients that come with each operating system. Installing additional client software should not be necessary.

The VPN should be bridged to the local network so that VPN clients get IP addresses from the internal network’s DHCP server.

Authentication should be performed against a RADIUS server (we use Duo Authentication Proxy).

HTTPS Certificate

SSTP is based on HTTPS. The good thing about that is that most firewalls and hotel networks should let it through. The bad thing is that we need to deal with certificates. I used a TLS certificate from our internal Active Directory root CA.

Caveat: Unreachable CRL

We are using an internal certificate authority that is not accessible from the internet. As a consequence, the CA’s certificate revocation list (CRL) is not accessible from the internet either.

The Windows SSTP client refuses to connect when it cannot contact the CRL specified in a server certificate. There are two ways around that:

Set the following registry values on your VPN clients: HKLM\SYSTEM\CurrentControlSet\Services\SstpSvc\Parameters\NoCertRevocationCheck=1 [REG_DWORD]

On the CA, configure a certificate template to not include revocation information in issued certificates.

Requesting the Certificate

Run the following openssl commands on any Windows or Linux machine that has OpenSSL installed. OpenSSL is part of any Splunk installation, for example (even on Windows).

Create a private key:

openssl genrsa -des3 -out c:\temp\vpn\vpn.key 4096

Create a certificate request with the private key:

openssl req -new -key c:\temp\vpn\vpn.key -out c:\temp\vpn\vpn.csr

Submit the CSR to your CA

Important: if you want to incorporate multiple server namens in the certificate, specify them in the additional attributes field as follows: san:dns=server1.domain.com&dns=server2.domain.com.com

You get a P7B file, but SoftEther expects a CER. To convert, double-click the P7B file to open it in the certificates MMC. Locate your certificate, right-click and select All Tasks – Export. Choose the format “Base-64 encoded X.509 (CER)”.

Go back to the main page of SoftEther VPN Server Manager and make sure the virtual hub is online

Blocking Internet Access

In a split tunnel configuration you want your VPN clients to connect directly to the internet, not via the VPN. Split tunneling is a client configuration (see below), but you may want to enforce it by blocking all internet connections originating from VPN clients:

Ports

Note: when you connect to SoftEther Server Manager next make sure so specify 443 (the only remaining one) instead of 5555

Firewall

In your firewall, create rules to enable the following ports:

SSTP: TCP 443

L2TP over IPSec: UDP 500 and 4500

In the Windows firewall disable or delete the following rules added by SoftEther:

SoftEther VPN Server

SoftEther VPN Server Manager

SoftEther VPN Command-Line Admin Tool

Miscellaneous

Disable DDNS registration of your VPN. In unnecessarily “calls home”.

Stop the SoftEther VPN Server service and edit the configuration file “vpn_server.config”

In the DDnsClient section, set Disabled to true

In the ServerConfiguration section, set DisableNatTraversal to true

Start the SoftEther VPN Server service

Client Settings

Split Tunneling

Split tunneling refers to a configuration where only those packets are sent from a client to the VPN, that are destined for the VPN’s subnet. Everything else (including internet connections) go through the client’s regular default gateway.

Many web meeting services have a recording functionality. Most recordings are provided as MP4 files with the video encoded in H.264 because that offers the most universal compatibility. However, it also needs a lot of disk space. H.264 has a successor, H.265, which only requires half the space for the same visual quality. This post shows how to use StaxRip, a free tool, to re-encode H.264 video into H.265 quickly by making use of GPU hardware encoding.

Preparation

Download and extract StaxRip. I used the current stable version 1.7 x64

Start StaxRip

When opening the first video file, StaxRip may ask you to install AviSynth. Do so by clicking Install AviSynth+.

Configuring the Conversion Settings

Click x264 and choose one of the following depending on your GPU vendor: NVIDIA H.265, Intel H.265 or AMD H.265

Click MKV and select MP4 (mp4box) instead

Click the Opus entry next to the first audio stream field and select copy/mux

Click the Opus entry next to the first audio stream field and select no audio

The result should look like this:

Performing the Conversion

Right-click Source > Open > File Batch and select the files you want to convert

Click Next to start the conversion

The output files are placed in the same directory as the input files with the extension _new

Conversion Performance

The Nvidia GTX 1060 GPU in my desktop PC encoded H.265 at the impressive rate of approximately 420 frames per second (full HD, 1920×1080).

The Intel HD Graphics 620 (Core i7-7500U) in my laptop only reached about 113 frames per second for the same content. Still impressive, but a lot less fast.

An interesting difference between the two GPUs: while the Nvidia encode used the GPU’s dedicated video encoding engine, the Intel encode used the GPU’s generic 3D engine.

Another noteworthy difference: the file generated by the Intel encode was 38% smaller than the file generated by the Nvidia encode.

Space Savings

The original videos of a four-day training recorded with Skype had a size of 7.6 GB. Converted to H.265 the size was reduced to 2.4 GB, which amounts to 68% savings!

GPU Performance Monitoring

If you are interested in monitoring your GPU’s performance and find out how its various engines are used, take a look at our uberAgent product. During the Nvidia encoding, for example, the GPU’s video encoding engine was nearly at 100% load and its generic compute engine at approximately 20%:

]]>https://helgeklein.com/blog/2019/02/hardware-encode-video-in-h-265-with-free-tools-to-save-disk-space/feed/0Free and Powerful Equalizer for Windows 10https://helgeklein.com/blog/2019/01/free-equalizer-for-windows-10/
https://helgeklein.com/blog/2019/01/free-equalizer-for-windows-10/#commentsTue, 29 Jan 2019 07:23:17 +0000https://helgeklein.com/?p=11624Windows 10 does not come with an equalizer. That can be annoying when you have headphones that are too heavy on the bass, like the Sony WH-1000XM3. Enter the free Equalizer APO with Peace, its UI. What You Get Peter’s Equalizer API Configuration Extension (Peace) is pretty easy to use while offering powerful features: Slider […]

An architecture overview of current browsers on Windows: Chrome, Firefox and Internet Explorer.

In case you are wondering: I did not include Edge because it is currently being transitioned to the Chromium rendering engine, which might change a few things. I did include Internet Explorer because it is still the default browser in many enterprises.

Looking for a way to monitor web app performance? Take a look at uberAgent, our user experience & application performance monitoring product.

Chrome Architecture

Chrome was the first browser with a multi-process architecture. Put simply, it encapsulates all logical functions in separate processes. More specifically:

One main (browser) process

One GPU process

Each tab: dedicated process

Each extension: dedicated process

Chrome is the only browser with a useful task manager. It can be opened with the keyboard shortcut SHIFT+ESC. As you can see below, Task Manager lists all active Chrome processes with their designated functions. For each process, it shows CPU, network and memory resource usage. It also indicates whether frames are hosted in their page’s process or in dedicated processes (more on that below). Finally, Task Manager shows the Windows OS process ID, which makes it possible to correlate data with other system information tools.

Frames and Site Isolation

Frames share a process with their page if the frame and the page are from the same site (based on the URL).

Starting with Chrome 67, frames from different sites are put into different processes. This is called site isolation and aims to mitigate certain types of attacks. Chrome’s Process Internals page (chrome://process-internals/) lists the current status of each frame.

IE Architecture

IE’s multi-process architecture was introduced with IE8. It makes use of two types of processes:

One main (frame) process

Zero or multiple tab processes

Note the zero above. Depending on configuration, IE may be limited to just one process – in which case a bug in any component or add-on crashes all opened tabs. Keep in mind that IE add-ons are binary Win32 DLLs that are loaded into the tab process(es). A crash in an add-on also crashes the tab process(es) that host it. This is not the case with modern browsers (i.e., all other browsers), where extensions are basically web apps, built with JavaScript and HTML.

IE Tab Process Count

By default, the number of tab processes is auto-managed depending on the amount of RAM. This can be overridden by setting the TabProcGrowth registry value. It can either be a number (REG_DWORD) or a string (REG_SZ) – which is rather unusual.

A Microsoft blog post explains the TabProcGrowth value. It boils down to this:

Value

Type

Description

0

REG_DWORD

single process for frame+tabs no matter what

1

REG_DWORD

single process for frame+tabs per bitness (important for 32-bit add-ons on 64-bit machines)

>1

REG_DWORD

sets the maximum number of tab processes

small

REG_SZ

max. 5 tabs per session

medium

REG_SZ

max. 9 tabs per session

large

REG_SZ

max. 16 tabs per session

Some notes and caveats:

On remote desktop session hosts (RDSH) the default TabProcGrowth value is the number 1 (REG_DWORD)

If TabProcGrowth is set to 0, 32-bit add-ons may not work on 64-bit Windows (Microsoft KB)

Firefox Architecture

Historically, Firefox has been a single-process browser. As it turned out, running the browser UI plus the HTML rendering and JavaScript for all tabs in a single process is a bad idea. It easily freezes the UI, and it might not be optimal from a security point of view, either.

Mozilla started project Electrolysis as a gradual move to a multi-process architecture. This took 9 versions, from Firefox 48 to 56. The current architecture looks like this:

Summary

Browsers are evolving quickly – except for IE, of course. Microsoft is focusing on Edge. To be very clear: IE will not get any new features. It’s security updates only for the former world’s most popular browser who once had a market share of approximately 95% (in 2003).

It seems there is no way around the multi-process type of architecture. Benefits include increased stability and security. On the downside, we have an increased overhead.

]]>https://helgeklein.com/blog/2019/01/modern-multi-process-browser-architecture/feed/0Bluetooth Audio Quality & aptX on Windows 10https://helgeklein.com/blog/2019/01/bluetooth-audio-quality-aptx-windows-10/
https://helgeklein.com/blog/2019/01/bluetooth-audio-quality-aptx-windows-10/#commentsTue, 15 Jan 2019 19:43:20 +0000https://helgeklein.com/?p=11609Bluetooth is a flexible standard. It defines various profiles that operate on top of the Bluetooth networking protocol stack and implement specific services, such as hands-free communications. Bluetooth devices each support a small subset of profiles, typically only one or two, according to their designated function. Bluetooth headphones and speakers implement the advanced audio distribution […]

]]>Bluetooth is a flexible standard. It defines various profiles that operate on top of the Bluetooth networking protocol stack and implement specific services, such as hands-free communications. Bluetooth devices each support a small subset of profiles, typically only one or two, according to their designated function.

Bluetooth headphones and speakers implement the advanced audio distribution profile (A2DP). The A2DP profile transports encoded audio streams from one device to another. To guarantee compatibility between devices, any device implementing the A2DP profile needs to offer a common codec, SBC. However, A2DP supports additional codecs that may increase audio quality or reduce latency compared to SBC. One of those optional codecs is aptX. In this article, I am looking at aptX benefits and I am describing how to get aptX on Windows 10.

What is aptX?

aptX is an alternative codec for the Bluetooth A2DP protocol. It comes in multiple flavors:

aptX

aptX LL (low latency)

aptX HD

Is aptX better than SBC?

Qualcomm, who acquired the aptX company CSR in 2015, claims that aptX offers “superior audio”. Figuring out whether that is actually true is harder than expected. Let’s break this quality question down into two different aspects: fidelity and latency.

Audio Fidelity

As this overview shows, the technical specifications of the base aptX code are similar to that of SBC. Specifically, the maximum bitrate of 352 kb/s is not much higher than SBC’s 320-345 kb/s (SBC depending on implementation).

The bitrate by itself does not tell us anything about a codec’s fidelity, however. Different codecs can be very different in encoding efficiency, as are H.264 and its successor H.265 for video (the latter only needs about half as many bits for the same visual quality). Fidelity can only be determined by double-blind listening tests. Unfortunately, nobody seems to have performed such listening tests in a scientific, reproducible manner (at least I could not find any information). Please let me know by commenting below if you know of any publications.

Another aspect influencing fidelity is that implementations do not always use a codec’s maximum bitrate. SBC, for example, comes with three quality modes, low (201 kb/s), middle (229 kb/s) and high (328 kb/s). Devices may select lower-quality modes to favor a stable connection over sound quality (example: these Sony headphones).

Audio Latency

When watching a video, you do not want the audio to lag behind. In other words: the audio latency should ideally be small enough to not be noticeable. Unfortunately, that is often not the case.

Bluetooth audio introduces significant latency, the exact amount of which depends on the codec as well as its implementations in the sending and receiving devices. Most Bluetooth headphone reviews do not include latency measurements, with the notable exception of rtings.com. They even have a list with latencies for all the headphones they ever tested. Plain aptX seems to be slightly better than SBC, but only aptX LL seems to be good enough to not be noticeable.

While, however, the number of devices supporting base aptX is steadily growing, support for aptX LL is still extremely rare (see rtings.com or bluetoothcheck.com).

Audio Quality Summary

There do not seem to be any objective comparisons between the aptX variants and SBC. From my experience it should be safe to say the following:

SBC offers pretty good fidelity at maximum bitrate.

aptX might be slightly better than SBC at maximum bitrate.

Both SBC and aptX introduce significant latency in the range of 150-200 ms.

aptX LL drastically reduces latency but is only supported by a handful of devices.

aptX on Windows 10

OS Support

If Microsoft wanted to hide this piece of information, they could not be doing a better job. A single page on microsoft.com mentions aptX. Apparently, Windows 10 has supported the aptX codec since the first release (1507). According to this Reddit thread, Windows 10 aptX support does not require any drivers in addition to what is part of the OS. I am mentioning that because numerous forum posts state you need to install special drivers. That does not seem to be true.

For a list of supported Bluetooth versions and profiles see this page.

External USB Adapter

The Avantree Audicast is a flexible Bluetooth transmitter that can be connected to a PC (via USB) or a TV (via optical input or headphone jack). The Audicast has several neat features:

Support for aptX LL (low latency) in addition to regular aptX and, of course, SBC

LEDs indicate which codec is being used

Two receiving headphones can be connected

Small and light

No additional power source except for USB required

All cables are included

Please note that when connected to a PC, the Audicast does not work as a generic Bluetooth adapter (in which case the OS drivers would be used). Instead, it registers as a USB audio device. No drivers are required.

Which Codec and Bitrate are Being Used?

Amazingly, Windows does not provide any tool or API for monitoring the codec used by A2DP. Whether it is SBC, aptX or something different – users are left completely in the dark. To help change that and encourage Microsoft to provide more visibility, please vote for please let users see what Bluetooth A2DP codec is used.

For the sake of completeness I sent several hours capturing and analysing ETW logs as indicated at the following source, but none of the generated logs seemed to indicate the A2DP codec being used.