How to Check Which Bluetooth A2DP Audio Codec Is Used on Windows
This is a follow-up to my earlier article Bluetooth Audio Quality & aptX on Windows 10, based on a comment by reader eluxe.
Windows makes it unnecessarily hard to identify the audio codec used by the Bluetooth A2DP profile, but there is a way. This post shows how to check if your connection makes use of aptX, LDAC, or some other more advanced codec, or if it falls back to SBC.
The Procedure
The process only involves two steps:
- Collecting ETL logs with Windows Performance Recorder (WPR)
- Processing the logs with Windows Performance Analyzer (WPA)
Collecting Bluetooth ETL Logs With WPR
- Open an elevated PowerShell prompt (i.e., with admin rights)
- Navigate to a temporary directory
- Download Microsoft’s custom Bluetooth tracing recording profile for WPR:
wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp
- Start the trace:
wpr.exe -start BluetoothStack.wprp!BluetoothStack -filemode
- Start playing audio via your Bluetooth device
- Stop the trace:
wpr.exe -stop BthTracing.etl
- You should now have a file called
BthTracing.etl
Source and more information: Microsoft’s busiotools GitHub repository
Processing Bluetooth ETL Logs With WPA
Double-click the trace file BthTracing.etl
to open it in Windows Performance Analyzer (WPA). You should see a window that looks similar to this:
Close all the default charts and tables in the main area by clicking the x in the upper right corner. Then double click the preview chart below System Activity in the upper left corner. The window should now look like this:
Click the loupe symbol and enter a2dpstreaming
:
After clicking Find all
you should see two events highlighted in the table:
We are only interested in the second event with the task name A2dpStreaming
. Unfortunately, the default columns do not have any meaningful information for us, and WPA makes it really quite hard to get to the interesting fields.
Right-click the column header and select Open View Editor
:
De-select the fields Id
, Process
, Cpu
, and ThreadId
. From the left column drag and drop the fields 4 through 6 (Field 4
, Field 5
, Field 6
) to the main area below the golden bar. It should look like this:
Rearranging the columns a bit for readability we finally see the information we need:
Interpreting the Result
All the fiddling around with WPA had the sole purpose of revealing the data of three fields:
A2dpStandardCodecId
(field 4)A2dpVendorId
(field 5)A2dpVendorCodecId
(field 6)
The following table shows the values from my Bluetooth connection, both in decimal (as displayed by WPA) and in hexadecimal:
Field | Value (dec) | Value (hex) |
---|---|---|
A2dpStandardCodecId | 255 | 0xFF |
A2dpVendorId | 79 | 0x004F |
A2dpVendorCodecId | 1 | 0x01 |
A complete list of Bluetooth vendor IDs can be found on the website of the Bluetooth SIG. We should not need it, though, because, luckily, an author called ValdikSS already compiled the relevant information in their excellent article Audio over Bluetooth: most detailed information about profiles, codecs, and devices. I’ll copy just the information required to interpret the data we collected.
A2DP has three types of codecs: mandatory, optional, and vendor-specific.
Mandatory A2DP Codecs
Standard codec ID | Vendor ID | Vendor codec ID | Codec name |
---|---|---|---|
0x00 | [empty] | [empty] | SBC |
Optional A2DP Codecs
Standard codec ID | Vendor ID | Vendor codec ID | Codec name |
---|---|---|---|
0x01 | [empty] | [empty] | MPEG-1,2 (aka MP3) |
0x02 | [empty] | [empty] | MPEG-2,4 (aka AAC) |
0x04 | [empty] | [empty] | ATRAC |
Vendor-Specific A2DP Codecs
Standard codec ID | Vendor ID | Vendor codec ID | Codec name |
---|---|---|---|
0xFF | 0x004F | 0x01 | aptX |
0xFF | 0x00D7 | 0x24 | aptX HD |
0xFF | 0x000A | 0x02 | aptX Low Latency |
0xFF | 0x00D7 | 0x02 | aptX Low Latency |
0xFF | 0x000A | 0x01 | FastStream |
0xFF | 0x012D | 0xAA | LDAC |
0xFF | 0x0075 | 0x0102 | Samsung HD |
0xFF | 0x0075 | 0x0103 | Samsung Scalable Codec |
0xFF | 0x053A | 0x484C | Savitech LHDC |
0xFF | 0x000A | 0x0104 | The CSR True Wireless Stereo v3 Codec ID for AAC |
0xFF | 0x000A | 0x0105 | The CSR True Wireless Stereo v3 Codec ID for MP3 |
0xFF | 0x000A | 0x0106 | The CSR True Wireless Stereo v3 Codec ID for aptX |
Conclusion
Looking once again at my values, we see in the tables above that a standard codec ID of 0xFF
indicates a vendor-specific code. We can learn from the corresponding table that the vendor ID 0x004F
and the vendor codec ID 0x01
stand for the aptX codec. This proves what I had suspected in my original article: Windows 10 supports aptX.
49 Comments
Hello,
I know why I end up here. Desperate to check the bluetooth codec in Windows 10.
I tried to follow your instructions and I’m stuck.
‘Collecting Bluetooth ETL Logs With WPR’ step 4. ‘Start the trace:’
I got this;
Access is denied.
Profile Id: BluetoothStack.Verbose.File
Error code: 0x80070005
Access is denied.
BTW I’m no computer expert. Could you help? Have a good day.
Sounds like you ran that from a PowerShell prompt without admin rights. As the article states, you need an elevated PoSh window. I just added a clarification to that step.
Mission accomplished!
I’ve check with two bluetooth speakers, one with aptX and the other without (only supports SBC).
one with aptX : 255, 79, 1
one with only SBC : 0, 0, 0
Thank you.
Hi.
Thank you for your work.
I followed the instructions, but the log does not contain A2dp events.
I don’t know why.
Here is the log: https://drive.google.com/file/d/1RtFJU2cBAtZs9jXEV8l4Al2853xU_Z2g/view?usp=sharing
Looks like I figured it out.
I had to turn Bluetooth off. Start logging. Turn Bluetooth on. Start playing music.
Then I got some of the required events, except A2dpStreaming.
But anyway I’ve got the list of supported codecs.
http://i.piccy.info/i9/bbcf56a2626e961d9c54a88a2adfc96f/1600344721/79156/1396674/39779Untitled_1.png
Hi Victor – would you mind sharing the particular Bluetooth device you’re using there? I have a pair of Bose QC35, and they support SBS and AAC. I have not been able to identify a Blutetooth transmitter, USB or PCI, that supports AAC. It would appear from the image yours does.
I’ve currently got a SimpleCom NB409 USB Bluetooth 5 transmitter, which uses a Realtek chipset, and running the test above I see I’m getting SBC (0 for A2dpStandardCodecID under A2dpStreaming), but I don’t seem to get the A2dpAvailableRemoteCodec you’re seeing. So I’m guessing this dongle doesn’t support AAC.
I had the same problem: I only got A2dpPump Events.
Then I took you advice, started the logging first (as admin), then connected my usb bluetooth dongle, then connected the Bluetooth headphones and then played music from VLC and youtube for about a minute.
Now I also get in the log A2dpStreamingStart, but still no A2dpStreaming events!
It’s frustrating.
Ok, now I made sure to play longer periods about 3 min in total. I was switching the output device. Using different players. And then made sure to disconnect the bluetooth device and disable bluetooth before finally stopping the capturing of events.
I don’t know what finally did it, but I have now four lines of “A2dpStreaming” in the logfile and was able to determine that my headset (Sony WI-1000X) and Bluetooth USB dongle (some Realtek with high gain antenna) negotiated “AptX” on Windows 10.
I would prefer LDAC, but I guess AptX is reasonable. Thanks for the writeup!
Thanks Markus, that’s what worked for me as well.
Started with bluetooth off, enabled it, started longer playback with several processes and eventually got “A2dpStreaming” event.
255/79/1 indeed indicates aptX.
Dear Helge,
Thank you for this article. I have the latest Windows 10 and a two month old motherboard with BT5.0 built. But my BT headphones sound horrible with Windows. They sound excellent wired in and very good via BT on my phone. Why does Windows sound glaringly horrible, and what can I do about it? Not clear how following the instructions in this article would help.
Appreciate the help.
Not sure which headphone you have, but it is most definitely a bluetooth Codec issue.
Windows 10 Support SBC (low quality), AptX( medium high quality) by default, plus any additional codec support comes with your bluetooth adapter.
Most androids support SBC, LDAC(high quality), some support AptX and AptX HD (The high quality version of AptX)
If you have a bluetooth headphone that supports SBC, AAC(Apple’s medium high Codec), and LDAC, it will sound terrible on Windows, because it will not be able to select a higher quality codec (AptX). But it will be fine with your android phone, or iPhone if you’re happy enough with a medium high quality.
There is no good solution to your problem. These codecs are often intellectual properties of their makers, and they charge money for having those supports. Your best bet would be buying a USB bluetooth adapter that supports the higher quality Codec your headphone supports.
Are you using the headphone’s integrated microphone? If so, that’s your problem. That is a Bluetooth limitation; when using the microphone, the high quality stereo audio device is disabled and only the “hands free” telephone quality device works. That is, if you use the mic, the headphones effectively become a hands free telephone headset.
In the Sound Control panel (the old-fashioned one, not the Settings app), you should be able to see two input devices for your headphones, one named “[Headphone model] (Stereo)” and another one “[Headphone model] Hands-Free AG audio”. Disable the second. You’ll also find a hands-free input device, disable it too. Now you should be able to use the stereo device at all times, but you can’t use the mic anymore.
You can always use the audio or USB cable connection with the headphones, which beats the purpose of wireless headphones, I know.
Hello
I just wanted to mention that would be good to point out where one can obtain Windows Performance Analyzer, because it is not that obvious.
You can either get it from Windows store:
https://www.microsoft.com/en-us/p/windows-performance-analyzer/9n0w1b2bxgnz?activetab=pivot:overviewtab
or as part of Windows Assessment and Deployment Kit (Windows ADK), installer you can download here:
https://go.microsoft.com/fwlink/p/?LinkId=526740
When you launch installer only choose to install Windows Performance Toolkit
You will get Windows Performance Analyzer and Windows Performance Recorder which you can use instead of CLI-based wpr.exe
You can import BluetoothStack.wprp into Windows Performance Recorder and also start and stop capture from it. After you save capture in WPR it can launch WPA directly.
I can also confirm what Pedro said – if you use your BT headset in headphone mode – sound is fine. If you use this “Hands-Free AG audio” device – sound is horrible.
Forgot to add that i checked my Windows setup and it is the same as yours: aptX : 255, 79, 1
Dear Helge,
thank you for this great article.
I have 0 in all 3 fields. Does that mean that my connection is using SBC? I am testing a pair od Sony WF-1000XM3 earbuds and was expecting APTX :(
Thanks,
Rob
Zero values probably mean it’s SBC.
Hey, how did you get connect the WF-1000 XM3 to windows? I am interested a lot and I would really appreciate it.
I works. aptX is used with Win10 – Dell Latitude 5591 vs Happy Plugs Air 1 Plus In-Ear Black.
The manual is very good
it doesnt show anything for me, i tried different ways, with bt first off, turned on, different audio players, browsers, nothing works
https://i.imgur.com/7D9SJah.png
This software provides this out of the box. Very helpful: https://www.bluetoothgoodies.com/tweaker/
Yes. To bad is not free. But is cheap enough.
Good to know. Because the Helge-Klein method doesn’t work for me, now I know, that the bluetoothgoodies tweaker wouldn’t work neither? Money saved 😉
My BthA2dp entries only log ‘ComponentLoad’ and ‘ComponentUnload’. Nothing in between, in particular, not a single ‘A2dp…’ sub entry.
My BT driver (BthA2dp.sys) is Microsoft’s standard one, for 20H2 = v10.0.19041.906.
Difficult to assume that it could be due to someone’s individual laptop’s Bluetooth hardware (mine=Intel 8260). Because Microsoft’s Windows driver needs to know (needs to negotiate) what the hardware can do, so then this Microsoft driver could/should log it as well, or shouldn’t it?
Oops sorry, I forgot that I once had installed a Intel driver/codecs to replace Microsoft’s shipped ones. That was a recommended measure against stuttering issues. And it had improved things a bit. But then it is no surprise, that it doesn’t log anything into what relates to Microsoft’s drivers 🙈
Hello,
Excellent tutorial.
I tried twice (had to install WPA the first time) but I only got the first event both times: “A2dpStreamingStart”.
Is there a reason why I’m not getting the second event?
The second time I waited after starting the trace to switch BT on.
I’ll try again doing something differently.
Thanks!
Did you solve in anyway? I have the same issue
Possible fix: I had same issue, even when cold booting with bluetooth off and turning on everything after starting logging.
Unpairing aka removing the headphones from windows settings did the trick for me. Not sure if I had to start logging before I re-paired (doubtful) but that’s what I did and it happened to work in my case
Good luck
Hello Helge,
Thanks very much for the awesome guide. I think myself and a few other commenters may have bluetooth adapters/drivers/headphones that work slightly differently to yours. I’m probably talking out of my back end here, feel free to call me out!.. but I when I followed your guide and couldn’t get it working, I wondered if the data we’re trying to log is more of a handshake log than a live report of the codec in use (my music was playing over bluetooth as normal, but it wasn’t logging the codec via WPR).
So I removed the headphones from windows’ bluetooth menu and followed your guide, re-pairing them after starting logging. Sure enough, there’s the codec info straight away. No idea if you want to add this as a troubleshooting step to your guide or not, but before re-pairing I’d failed with several other obvious steps like re-opening my music player, restarting headphones, cold booting the PC with bluetooth off and starting logging before anything else…
I speculate that if the data we’re looking for is only a handshake log (it seems to me it is), some setups keep this data elsewhere and never/rarely check it again, so it never shows up in WPR. Meanwhile other setups may re-negotiate codecs with every new connection or something, making codecs easier to find on some PCs.
Side note:
My field names were field 3, field 4, field 5. I assume this is due to running Win10 1809 build 17763, but on the off-chance it’s a driver variation and others report it too, I’ve confirmed it now for you.
Thanks again! (:
Thanks for the guide. Not only I confirmed AptX(R), but also finally found a use for the Analyzer. Before this guide, I saw absolutely nothing there, as I didn’t expand the left panel. So unfriendly tool:)
Hi, thanks for this handy post.
I have a few notes for you. First I had to download WPA as it wasn’t on my PC before (downloaded using the ADK from MSDN), it would be worth mentioning this somewhere. The download itself is pretty fast, the ADK installer allows to choose only the performance kit which is about 160 MB.
Second of all, I didn’t get the a2dpstreaming event at first, like many others in the comments. Disconnecting the headphones or turning the PC bluetooth off didn’t help for some reason. To me it seems like the driver was keeping the streaming session alive, in case the device connected again? Not sure if the A2DP profile or even general bluetooth protocol permits that…
However, what did the trick for me was to completely disable the internal bluetooth device in Device Manager. I suppose it’s similar to unplugging a dongle as someone else suggested here, but that’s pretty much the only way to do it with an internal bluetooth device. Then I enabled it again, turn on bluetooth, reconnected the headphones multiple times and started listening to music, only then the event appeared.
Anyway, thanks a lot, I was wondering what my PC uses, not that I am able to recognize it anyway. I wish Windows would have an easier way to hint this information…
Friend, I would like to show a little software I found on internet to show if I’m using AptX on Windows 10. I’m using AX210 wireless card wich has bluetooth 5.2, but when I was following the steps you wrote here I couldn’t pass from the search “a2dpstreaming”. I don’t know why but it didn’t find anything, even I was playing music from Spotify to my Sennheiser HD 350BT at the moment I was making the file to be analized. But I would like to ask you to test this software: https://www.bluetoothgoodies.com/tweaker/
Could you tell me, please, If this software really works? It said I’m using AptX with the headphone, but I don’t know if it is reliable.
God bless you! I’m waiting for an answer!
Man, you rock! Thanks for pointing me in this direction.
I just installed it and besides the thing with constantly restarting the machine every time one connects a new bluetooth device it works great.
Tells about the codecs possible and the codecs used. Plus some other shenanigans. So now I try before buy, but for a short cut to solving this problem without above explained hassle some reboots and the handful of dollars are most brutally worthwhile.
It seems with indepth-bluetooth info there’s always…. something :D
So thanks again.
So sorry I can not help regarding your question.
I’m leaving the info I got about Intel AX210:
MPEG-2,4 (aka AAC): 2, 0, 0
SBC: 0, 0, 0
AptX Low Latency: 255, 10, 2
AptX: 255, 79, 1
AptX Low Latency: 255, 215, 2
I’m happy with it now. God bless you all!
Hi there and thanks for the detailed process desciption!
It’s a tragedy that infos as these have to be manually plucked from the bowels of the system…
Unfortunately I seem to lack the magnifying glass icon, but I’m using the “Find in Column” command on the “Task Name” column, yielding no results so far. I’ve switched off BT, started the trace, played some music on my BT headset for 2 mins and switched off the headphones. Lastly I stopped the trace.
But there seems to be no info inside the trace file with the A2dpStreaming Name.
Thx for your help! :)
So, windows is supposed to have AAC by now, but it still shows for me its using sbc unfortunately i have no idea how to set it up propery, on my phone, my earphones are using AAC, but on windows, no…
I’m using a bluetooth adapter and tried all options in comments with no luck. Can’t find any A2dpStreaming :'(
IF you read through the comments you will see several people with the same problem had succes when they un-paired, started logging and then re-paired their device, then started to play music and logged for like a minute.
Windows 11 21H2 is talking AAC to my WH-1000XM3
Hi!
I’m on Windows 11 and I’m having a hard time figuring out how to view the relevant data in WPA. Did you figure out how to get it working? After trying some of the solutions suggested in earlier posts, I managed to get the ‘a2dpstreaming’ row to show up, but columns ‘Field 4’ to ‘Field 6’ aren’t providing the same data points as in the original post. What am I missing here?
Update: I got it working! Once I clicked on the ‘a2dpstreaming’ row, the column labels changed to match those shown in the post. My numbers were [2 0 0], which I didn’t understand at first, but going back to the tables in the post revealed that it’s just the AAC codec. Hope this helps someone!
Thanks for the guide. Just to add on for other passersby: Another way I stumbled over is looking at the bluetooth traffic in Wireshark. The Microsoft Bluetooth test platform (https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/testing-btp-software-package) makes that super simple. It contains a tool btvs.exe which captures the bluetooth traffic and makes it available to wireshark in realtime (see https://docs.microsoft.com/en-gb/windows-hardware/drivers/bluetooth/testing-btp-tools-btvs#usage-for-wireshark-on-separate-machine). That makes it easy to see the handshake, all the device capabilities as well as the actual codec stream later. Wireshark comes with matching protocol disectors so even without knowing much about bluetooth it was easy to follow as wireshark spells it out for you. Maybe a bit overkill for this but very interesting to play with.
Hallo Helge,
hab zwar eine ETL-Datei generieren können, sie lässt sich aber nicht mit einem Doppelklick öffnen?
Es erscheint der Hinweis – Wie soll die Datei geöffnet werden? Suchen Sie nach einer APP im Microsoft Store?
Gruß, Stefan
Thanks mate, I used your method for a long time. Today I found a new method you may like, it is very simple.
Install wireshark, and Microsoft BTP.
Run btvs.exe (from BTP). Wireshark will start, and capture bluetooth.
Pair the device (to generate the data to capture).
Enter this as your filter: btavdtp.signal_id
Credit to Valdik at habr for the filter, and bleak project docs for the BTP tip. I hope you find this useful.
Where do you install Wireshark? BTP don’t found it when I run btvs.exe
Thanks a lot for posting this guide, Helge. It is much appreciated!
Followed all the steps, and got an ETL file with data, but none with the task name “A2dpStreaming”, so the search came out empty. Gonna try what Victor described in an earlier post, i.e. turn off BT, start logging, start BT, start audio playback, and then stop logging and analyze, I guess.
//calm
Hi Helge,
Very nice tutorial! I am very interested in also tracing Bluetooth peripherals such as Mice and Keyboards on Windows. Do you have any experience if that also works with WPA?
I’m afraid not.
What about this method: https://www.thewindowsclub.com/how-to-check-bluetooth-codec-in-windows (using trial of Bluetooth Tweaker)?
My result:
[CODEC#1 supported by device]
CODEC Type: Unknown vendor specific CODEC
(VendorID:000000d7, CodecID:0002)
[CODEC#2 supported by device]
CODEC Type: aptX low latency
[CODEC#3 supported by device]
CODEC Type: aptX, Sampling Frequency: [16]/[32]/44.1/48kHz, Channel Mode: Stereo/[Mono]
[CODEC#4 supported by device]
CODEC Type: MPEG-2, 4 AAC, Object Type: MPEG-2 AAC LC/[MPEG-4 AAC LC]/[MPEG-4 AAC LTP]/[MPEG-4 AAC scalable], Sampling Frequency: 8/11.025/12/16/22.05/24/32/44.1/48/[64]/[88.2]/[96]kHz, Channels: 1/2/[6(5.1)]/[8(7.1)], VBR: supported, Bit rate: 320 000
[CODEC#5 supported by device]
CODEC Type: SBC, Sampling Frequency: 16/32/44.1/48kHz, Channel Mode: Mono/Dual Channel/Stereo/Joint Stereo, Block Length: 4/8/12/16, Subbands: 4/8, Allocation Method: SNR/Loudness, Min/Max Bitpool: 2/53
[CODEC selected by Windows]
CODEC Type: aptX, Sampling Frequency: 44.1kHz, Channel Mode: Stereo
Thanks for this, this is unusually difficult / undocumented even for windows.
You can get it with inbox tools, using netsh trace, I wrote up a batch file to run it here:
https://raw.githubusercontent.com/nhamer/winbthlog/main/BthA2dpCodec.cmd
The above does a clean job of extracting just the A2dpStreaming event, but the short version is something like this:
netsh tr start provider={8776ad1e-5022-4451-a566-f47e708b9075} report=disabled
netsh tr stop
netsh tr convert %TEMP%\NetTraces\NetTrace.etl
winget install BluetothStack.wprp is the 1st command
the I ran out of time and just moved my speakers around, disconnected bluetooth mouse and keyboard then refreshed bluetooth connection on laptop for slight improvement. UEs arent going to work with anything but sbc anyway.