Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Bluetooth, transcoding and audio quality (Read 1354 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Bluetooth, transcoding and audio quality

Hello everyone, this is my first post and I would like, first of all, to thank all the information I have been gathering about audio codecs in general in this forum.

I have a good collection of archived CDs in FLAC format that I often listen to through an Android cell phone with microSD card, both via USB cable to external DAC or via bluetooth. Over the last few years, in order to load the microSD with my entire collection, I have used MP3, OGG, Opus, Musepack and more recently LossyWAV (thanks Nick), as the capacity of the cards has increased. Right now I have a 2TB microSD (Sandisk just released it), and I can finally load all my music in FLAC.

For wired listening it's clear that lossless is the best option, but is it also the best option for bluetooth listening? We immediately think that if we start from FLAC we avoid transcoding, but I am not sure that this is the best, let me expose the two scenarios:

1. FLAC format, the audio is transformed to PCM, encoded by SBC, sent, and in the speaker or bluetooth headset is transformed back to PCM. As SBC works at about 328kbps, we leave it to a codec with a basic psychoacoustic model and with hardly any development to decide what information to preserve.

2.  Musepack Q9 format (or Opus 320kbps, or MP3 320, or a good codec around 328kbps bandwidth). OK, it's converted to PCM and transcoded to SBC, but what is this PCM composed of? Above 320kbps of well-chosen information, isn't it filled with redundant or non-significant information (zeros) when transformed to PCM? And isn't that redundant or non-significant information easily discarded by the SBC codec?

In short, don't the two scenarios boil down to listening to a good codec at 320kbps vs. SBC at ~320kbps?
Surely this theory is wrong. In that case, if transcoding were to affect the lossy codec, is there some reason intrinsic to the Musepack, Opus or MP3 format why one would be less affected versus the others?

I must say I have not done extensive ABX testing but both options are satisfactory to me and I can't say for sure whether or not there is a difference. There is also a Bluetooth A2DP SBC/aptX online encoder from Valdikss to compare the effect of these two codecs, but I don't draw any conclusions either (I don't know if it is allowed to post the link).
Maybe my ears don't have much hearing ability anymore. But I would like to know the technical opinion of who can shed some light on what happens to the audio when sent over bluetooth. aptX has a higher bandwidth and reputation of being a better codec than SBC, it would be a third scenario to evaluate.

Greetings to everyone!

Re: Bluetooth, transcoding and audio quality

Reply #1
You seem to have gone into it pretty thoroughly, but you might still find this interesting: https://www.audiophile-heaven.com/2023/03/bluetooth-sound-quality-guide-what-are-the-codecs-and-how-do-they-work.html

I think what you're talking about is possible adverse interactions when re-encoding from the storage format to the Bluetooth transport format.  Using a lossless storage format will always be the gold standard, because the decoded PCM is exactly what went in, therefore the storage format is transparent and can have no interaction with the Bluetooth transport.

Trying to analyse the interactions between lossy formats is a can of worms, best guided by what is, to your ears, good enough.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Bluetooth, transcoding and audio quality

Reply #2
we leave it to a codec with a basic psychoacoustic model and with hardly any development to decide what information to preserve.
To the best of my knowledge, SBC is a low complexity side band codec. No psychoacoustic model in sight. It has been released around 2000 so had to be very frugal on system resources.

IMHO a lossy format results in generation loss. Using a lossy source and a lossy Bluetooth codec is a cumulation of generation loss.
If it is audible in practice, is a different story.
TheWellTemperedComputer.com

Re: Bluetooth, transcoding and audio quality

Reply #3
When listening, there won't be any significant difference, or possibly no difference at all between the two. SBC isn't the best Bluetooth codec out there, but at 330 kbps the result is more than satisfactory. It shouldn't be too difficult to find some artifacts on particularly complex musical passages, but the overall quality is good.

Therefore, having files already encoded with a high quality lossy encoder or in FLAC won't lead to anything noteworthy. If you have enough space on the SD card to put everything in FLAC, and if you don't need to store anything else, then keep the FLAC encoding on the SD card. It will make a good backup, which can always be useful. Enjoy your 2TB SD card!

If you have the option to choose LDAC or LHDC protocol in the future, it will also seem more relevant to go with a lossless library on your phone (even if I doubt any difference other than placebo can be perceived between lossless sources and HQ lossy ones).

As usual: if you have more than enough free space go with lossless; otherwise transparent lossy is perfectly fine with Bluetooth. A second generation loss have little if any audible difference.
Wavpack Hybrid: one encoder for all scenarios
WavPack -c4.5hx6 (44100Hz & 48000Hz) ≈ 390 kbps + correction file
WavPack -c4hx6 (96000Hz) ≈ 768 kbps + correction file
WavPack -h (SACD & DSD) ≈ 2400 kbps at 2.8224 MHz

Re: Bluetooth, transcoding and audio quality

Reply #4
Thank you for your answers.
 
Using a lossless storage format will always be the gold standard, because the decoded PCM is exactly what went in, therefore the storage format is transparent and can have no interaction with the Bluetooth transport.
But that PCM signal contains 1411kbps of information, and bluetooth transmission via SBC only allows to send (usually) 328kbps, so a good part of the information is lost, and the part that is lost is decided by the basic SBC codec.

we leave it to a codec with a basic psychoacoustic model and with hardly any development to decide what information to preserve.
To the best of my knowledge, SBC is a low complexity side band codec. No psychoacoustic model in sight. It has been released around 2000 so had to be very frugal on system resources.

IMHO a lossy format results in generation loss. Using a lossy source and a lossy Bluetooth codec is a cumulation of generation loss.
If it is audible in practice, is a different story.
Although I am not an expert by any means, I refer to a basic psychoacoustic model because sub-band coding (SBC) breaks a signal into a number of different frequency bands and eliminates those that are masked by others (auditory masking). Ok, maybe you can't even call it a psychoacoustic model.
But the key is what exactly is added when, starting from a lossy codec, the signal is transformed to PCM, and what is removed when SBC (or aptX) re-encodes it. And how does that loss of relevant information (if any) compare to the loss that occurs when encoding an uncompressed file through SBC.
For example we know that Opus 192kbps is transparent, if SBC processing preserved that information, it would still be transparent at the end of the audio chain ... 192kbps is the minimum bandwidth that is transmitted via SBC. Ideally, that information would fit in the minimum bandwidth of the SBC transmission (which is just 192kbps), but I fear that such frequency band elimination processing would mean eliminating relevant information as well.

Any other input or tests related to the differences between these two scenarios would be welcome.

Re: Bluetooth, transcoding and audio quality

Reply #5
When listening, there won't be any significant difference, or possibly no difference at all between the two. SBC isn't the best Bluetooth codec out there, but at 330 kbps the result is more than satisfactory. It shouldn't be too difficult to find some artifacts on particularly complex musical passages, but the overall quality is good.

Therefore, having files already encoded with a high quality lossy encoder or in FLAC won't lead to anything noteworthy. If you have enough space on the SD card to put everything in FLAC, and if you don't need to store anything else, then keep the FLAC encoding on the SD card. It will make a good backup, which can always be useful. Enjoy your 2TB SD card!

If you have the option to choose LDAC or LHDC protocol in the future, it will also seem more relevant to go with a lossless library on your phone (even if I doubt any difference other than placebo can be perceived between lossless sources and HQ lossy ones).

As usual: if you have more than enough free space go with lossless; otherwise transparent lossy is perfectly fine with Bluetooth. A second generation loss have little if any audible difference.

Yes, that's my experience, differences are minimal if any. I will do some tests and try to draw conclusions, but I will indeed keep the files in FLAC because I also connect the mobile by cable to my HiFi equipment and I understand that it is the winning horse.
Since microSD cards seem to be dying out in high-end phones, I plan to make a copy in Musepack Q9 so that, in the future, I can carry music on the phone's internal memory.

Re: Bluetooth, transcoding and audio quality

Reply #6
But that PCM signal contains 1411kbps of information, and bluetooth transmission via SBC only allows to send (usually) 328kbps, so a good part of the information is lost, and the part that is lost is decided by the basic SBC codec.
I fail to understand the relevance of that point.  The lossless 1411kbps is as clean a signal as you can ever get, so does not contribute to any loss in the subsequent Bluetooth codec.
It's your privilege to disagree, but that doesn't make you right and me wrong.

Re: Bluetooth, transcoding and audio quality

Reply #7
But that PCM signal contains 1411kbps of information, and bluetooth transmission via SBC only allows to send (usually) 328kbps, so a good part of the information is lost, and the part that is lost is decided by the basic SBC codec.
I fail to understand the relevance of that point.  The lossless 1411kbps is as clean a signal as you can ever get, so does not contribute to any loss in the subsequent Bluetooth codec.
Sorry, it was a translation problem, I'm the one who didn't understand what you meant by “no interaction”.

Re: Bluetooth, transcoding and audio quality

Reply #8
That webpage recommended on the second post, i think, fails to delve into the most important aspect of the issue at hand. The various bluetooth codecs offered are all codecs. Which means, they all have their own compression algoritms for taking the data from the original source files and recompressing (re-encoding) them, god knows in what quality and to what extent, and then delivering it to the device with the DAC and Amplifier to then decode and play. That is like additional noise.

In my opinion, the best potential codec for bluetooth audio would be the codec that "would not" require a reencode just to be delivered to the target, which means, if possible, just send the actual audio file that is stored in the source device, without any modification, turn it into pcm in the target device and send it to the dac or amp to play. AAC is probably the only one which can manage to do that as of now.

All those codecs mentioned on that website are proprietary codecs and none of us keep our music collection in those codecs. (AAC is the exception). So when i throw a vorbis file, a flac file, an mp3 file or an opus file to those codecs, regardless of its actual quality, whatever these codecs do to my precious bits is uncertain. Maybe their compression algoritm takes the FLAC and turns it into absolute garbage, how can we even confirm that the quality is constant? Has anybody even abx'ed those codecs, without the bluetooth aspect of it.

So apple has aac which probably resolves that but what about "non-apple" users. Opus, if it manages to slip into bluetooth territory, could allow us to actually send unmodified opus files without the need of any reencode to any other codec, directly to the target device for playback. Nowo that could be the "lossless bluetooth" standard that we hope for (not actual lossless but you understood what i mean there). I think most of us would buy an opus codec suporting playback device solely for that reason.

PS: I do not use AAC on my android smartphone (aac supported) and bluetooth earbuds (also aac supported) because of the fact that when i compare SBC to AAC, AAC always fails to deliver the transients in my music files. Cymbals sound like garbage when i use aac. I don't know the reason. Maybe because i do not keep my music as aac (maybe all bluetooth listeners should). Maybe my android phone's aac encoder sucks. Or maybe thea aac decoder on my bluetooth buds is not good. There are too many variables.


Re: Bluetooth, transcoding and audio quality

Reply #10
You would think if you're playing AAC files, and both your device and headset supports the AAC codec, it would just pass through the data, but that's not the case.  At least not with Android.  Seems the experience will vary with different phones.

https://www.soundguys.com/the-ultimate-guide-to-bluetooth-headphones-aac-20296/

I wouldn't expect anything less than an apple supported codec. I remember back when their ipods were in everybody's pocket. They did not include a software compressor or limiter to that device and any music you play with it was clipping like crazy. Especially if you play with the EQ settings. It was the worst DAP in the market. Thank goodness then came "rockbox" and solved the issue for them, "free of charge". For my music, I wouldn't rely on anything with apple's name on it.

Re: Bluetooth, transcoding and audio quality

Reply #11
Interesting things have been said in this thread. It seems incredible, but we are almost in 2025, high definition audio has been well established for years, there are plenty of bluetooth devices, and we still don't have CD quality in bluetooth transmission ...

After all I have read in this forum, it seems that starting from FLAC and avoiding transcoding is after all the best option. And if you start from a lossy file, Wavpack over 400kbps or maybe Musepack Q9-10 are the options to consider ( https://hydrogenaud.io/index.php/topic,24592.0.html ), although as noted there are many variables (starting bitrates/bluetooth codecs, hardware implementations ... ) and it is very difficult to determine.

Too bad about the inconsistency of AAC on Android, on devices that support it I avoid it too, I tend to notice bloated bass and a loss of definition. I read about Opus integration from Android 13 on Pixel devices, hopefully it will be extended to other brands and devices.

Cheers.


 

Re: Bluetooth, transcoding and audio quality

Reply #12
You would think if you're playing AAC files, and both your device and headset supports the AAC codec, it would just pass through the data, but that's not the case.  At least not with Android.  Seems the experience will vary with different phones.

https://www.soundguys.com/the-ultimate-guide-to-bluetooth-headphones-aac-20296/

I wouldn't expect anything less than an apple supported codec. I remember back when their ipods were in everybody's pocket. They did not include a software compressor or limiter to that device and any music you play with it was clipping like crazy. Especially if you play with the EQ settings. It was the worst DAP in the market. Thank goodness then came "rockbox" and solved the issue for them, "free of charge". For my music, I wouldn't rely on anything with apple's name on it.

Yes, a few years ago I had a couple of 240GB (modded) iPods  with RockBox. Good times.