Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQA format is always used when no higher resolution is available #161

Open
tehkillerbee opened this issue Mar 8, 2024 · 4 comments
Open

Comments

@tehkillerbee
Copy link
Owner

tehkillerbee commented Mar 8, 2024

When in HI_RES_LOSSLESS mode, MQA format will be selected for playback for albums that supports this.

This may not be preferred by some users so we should allow fallback to LOSSLESS FLAC.

@fmarzocca
Copy link

Dumb question: why? Isn't HI_RES MQA better than LOSSLESS FLAC?

@tehkillerbee
Copy link
Owner Author

tehkillerbee commented Mar 26, 2024

The reason for this issue is since we can specify HI_RES_LOSSLESS and end up playing HI_RES (non lossless) instead. MQA encoding is lossy so it should not be used as a fallback, in my opinion, if the user has requested _LOSSLESS playback quality.

Regarding lossless/lossy, I refer to wikipedia for some more details.

MQA encoding is lossy; it hierarchically compresses the relatively little energy in the higher frequency bands into data streams that are embedded in the lower frequency bands using proprietary dithering techniques, allowing for an apparent reduction in sample rate and hence file size.

Depending on the implementation, as few as 13 bits may be reserved for PCM audio, with the lower-order bits rendered as noise by equipment without an MQA decoder.

MQA-encoded audio can be contained with file formats such as FLAC, ALAC or CD-DA; hence, it can be played back on systems either with or without an MQA decoder. In the latter case, the resulting audio contains high-frequency noise occupying the three least-significant bits, thus limiting playback on non-MQA devices effectively to 13 bits. Despite this, MQA claims that the quality is higher than a conventional 16-bit recording, because of the novel sampling and convolution processes.

Especially the part about non-MQA playback being limited to 13 bits is not something I would like, if the alternative is a 100% lossless 16-bit FLAC.

But my idea is to leave this as a setting that can be set in the mopidy configuration, in case the user prefers MQA.

@fmarzocca
Copy link

fmarzocca commented Mar 26, 2024

I see. But you are comparing Lossless FLAC to MQA.
I ask myself: is LOSSLESS FLAC anyway better than HI_RES MQA?

@tehkillerbee
Copy link
Owner Author

This is a really complicated question to answer and my understanding of MQA encoding is also limited.

Anyways, the short answer is if your DAC supports MQA, the 24 bit / 96 kHz MQA is technically better. However, if you do not, the MQA file will effectively play back as a 13 bit 44.1 kHz file.

The next question is the source media used to create this MQA file which would also be a limiting factor in the quality that you can actually achieve with using MQA.

This reddit thread gives a bit more detail on this topic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants