Jump to content
IGNORED

Truncating MQA files to 16 bits and the blue light still shines


Recommended Posts

1 minute ago, Em2016 said:

Very interesting. I wonder if the same happens with an MQA file that’s supposed to pack in more information, like this 353kHz MQA album:

 

https://shop.klicktrack.com/2l/411252/


The files that I used were sourced from 352.8 Khz (not 353Khz which is not a valid sample rate, but I get your point).

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
5 minutes ago, hsmeets said:

 

Implementation by Mytek: perhaps it does not look at the actual encrypted bitstream but only at some value in the header of the FLAC container which says it is MQA....and turns on the 'blue light'.

 

Stick that header to a non-MQA FLAC file and see what happens......

 

Mytek does not know it's a flac of wav. All it sees is PCM. It's a WAV in this test for the 16 bits truncate test.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
5 minutes ago, Em2016 said:

 

Here you say it’s a 24/44 MQA file but I linked to an actual 353kHz MQA file/album. I wonder if the same happens, given this file should pack in much more info? 

 


For 24/88.2, 24/176.4, 24/352.8, .... source files, after encoding the MQA dIstribution files are always 24/44.1

For 48K multiples it's always 24/48

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
32 minutes ago, mansr said:

This is by design. The MQA identification and authentication data is embedded in bit 8 of a 24-bit PCM stream. Dropping bits 0-7 thus leaves it untouched. The authentication works by computing a Blake2s hash over the top 15 bits (the plain PCM portion) and parts of the control stream in bit 8. This hash is then verified against a cryptographic signature extracted from the control stream. The public key is stored in the decoder. If the signature matches, the blue light goes on. The low 8 bits encoding the high-frequency content are not covered by the authentication.


I wonder if MQA CD is just the 24 bits MQA encode truncated to 16 bits. That would only work for masterings in multiples of 44.1K.
Then they can license the 24/44.1 files to Tidal and as also sell as downloads, where the customer has the illusion it's something higher like 176.4K or 352.8K after MQA decoding.
 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Perl script released under GPLv2:

http://432evo.be/perl/mqastripper.pl
http://432evo.be/perl/mqastripper.txt

I also intend to add a feature where bits 0..7 are replaced by a repeating ASCII string, to see what that does with authentication.        

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Some updates. Our member "evangelist" was trying to attack my research as a being fake / gossip:

image.thumb.png.a1ef5b903a1555a19f9c555729995142.png

 

Sorry, but I still have a good old 2.2 mytek firmware which does not lie, and this firmware shows a dark grey MQA logo when non-MQA is played, and bright blue MQA logo when MQA is detected. It has no blue dot on the right.

So we updated to the latest version of Mytek's firmware, and now to my surprise the following happens:

- when playing the unstripped 24/44.1 MQA file, it shows 24/352.8 Khz and the blue MQA dot:

image.thumb.png.0019a644fe3a31ca5a437fdc9bb6e440.png

 

- when playing the stripped version with 8 LSB bits stripped, it will now claim it's still 24/352.8

image.thumb.png.0019a644fe3a31ca5a437fdc9bb6e440.png

 

The hint this is a lie, is because our 10 second loop interrupts the MQA markers for a short while, so for a fraction of a second, the DAC goes back to the actual input resolution of 16/44.1:

image.thumb.png.31cb42f0053cd9b7c53a805c19d75210.png

 

I modified my script to allow more bits to be blanked, so when stripping 9 bits, the 15 bits content in a 24 bit WAV container is still showing 16/44.1 on the Mytek. I wanted to be sure that the Mytek still detects bit blanking or padding for non-MQA, it still does work as expected for non-MQA.

So if the real MQA file, and stripped version with only 16 bits of entropy, both show decoding to 24/352.8, how does the customer know he is not being scammed?
 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
1 minute ago, mansr said:

What happens if you mess with bit 9, just above the MQA control stream?


Coding as we speak.

BTW Hans Beekhuyzen claims the following:
 

Quote

However, if the file is tampered with in any way, the decoder will notice this and will not light that indicator.


Maybe he should read this post. His information is not accurate.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Setting the 9th bit (starting counting from bit 0) via one of these 2 Perl operators, de-authenticates the file, and mytek says it's 24/44.1:
 

Method 1:

$ln=$l | 0b1000000000;
$rn=$r | 0b1000000000;

Method 2:

$ln=$l | 512;
$rn=$r | 512;

 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
34 minutes ago, mansr said:

As expected. The authentication covers only the PCM part of the stream.

 

Here's something else to try. Toggle bit 9 in one sample every few seconds.


Now it flips the 9th bit every 3 seconds.

pi@mqb:~/quack $ ./mqabit9.pl -i input.wav -o corrupt_every_3secs.wav  -l 30
Input file details: $VAR1 = {
          'bits_sample' => 24,
          'data_length' => 48090168,
          'channels' => 2,
          'wave-ex' => 0,
          'data_start' => 44,
          'length' => '181.746666666667',
          'sample_rate' => 44100,
          'bytes_sec' => 264600,
          'data_finish' => 48090212,
          'total_length' => 48090204,
          'block_align' => 6
        };
Samples: 8015028
Rate: 44100
Sample 0 corrupted
***Sample 132300 corrupted
***Sample 264600 corrupted
***Sample 396900 corrupted
***Sample 529200 corrupted
***Sample 661500 corrupted
***Sample 793800 corrupted
***Sample 926100 corrupted
***Sample 1058400 corrupted
***Sample 1190700 corrupted
***

It ignores the first corrupt sample, blue light almost immediately shines, but after 3 seconds, the light goes out and stays out. It does not recover as long as the same file is playing. I actually have to switch to another MQA file to get the blue light back.

Curious if we start to flip bits in the MQA control stream ....

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Corrupting the control bit (counting from 0, bit 8) is already detected when the first sample was corrupted, contrary to corrupting the bit just above it (counting from 0, bit 9). This confirm the initial part of the track is not played in MQA.

When I corrupt the control bit after 3 seconds (and not starting with the first sample), and repeat the process every 3 seconds, as soon as it detects a corrupt bit in the control stream, the MQA light goes out, and does not recover.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

In a Dutch Facebook group managed by a Meridian dealer, the users actually believe that they are listening to 24/192 because their NAD amp is saying so.

https://www.facebook.com/photo.php?fbid=1834948226537180&set=gm.598310543850915&type=3&theater&ifg=1

It seems on bluesound, there's also 24/192 on the display of a NAD amp, and the user believes this blindly:

image.thumb.png.9fbb7ac3d93ef7a6338406ba682164a3.png

 

Basically they are listening to something like 17/96 (core decoder) upsampled to 24/192 (renderer).

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Is MQA's compression a joke?

If we sabotage the 8 LSB bits in any way (blanking / random garbage / ascii string "MQASHILL" encoding), the spectrum changes after decoding:

mqa-bad-compression.thumb.png.9a2cdb13919d21fcb595cf73dc12da16.png

 

In all four cases, the user sees 24/352.8 on his DAC display or screen / app of MQA enabled device, but does not know what he actually gets. The spectrum of the sabotaged files extends above 20 Khz, but Mans has shown this is due to aliasing.

Maybe the biggest joke is the fact that this little spectrum extention results in 50% larger PCM files (24 bits instead of 16 bits), and 100% larger flac files. Why? The 8 LSB bits in MQA don't compress well in FLAC.

First we took a new 2L.no MQA distribution file, and copied 20 secs to a wav file using sox:
 

sox  2L-053_04_stereo-DXD.mqa.flac 2L-053_04_stereo-DXD-20secs.mqa.wav trim 0 20


We stripped 8 bits using our tool, so we now have two 24/44.1 files with a duration of 20 secs, one where the 8 LSB bits have been blanked, and another which is a 20 secs copy of the real MQA file, which can both be decoded by MQA to 24/352.8.
 

$ du -h --si 2L-053_04_stereo-DXD.mqa-16in24bit.wav 2L-053_04_stereo-DXD-20secs.mqa.wav
5.3M    2L-053_04_stereo-DXD.mqa-16in24bit.wav
5.3M    2L-053_04_stereo-DXD-20secs.mqa.wav


Now if we encode both WAV files back to flac, let's observe the already impressive compression ratio difference:

 

$ flac -f --best 2L-053_04_stereo-DXD.mqa-16in24bit.wav 2L-053_04_stereo-DXD-20secs.mqa.wav

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013  Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

2L-053_04_stereo-DXD.mqa-16in24bit.wav: WARNING: legacy WAVE file has format type 1 but bits-per-sample=24
2L-053_04_stereo-DXD.mqa-16in24bit.wav: wrote 1633178 bytes, ratio=0.309
2L-053_04_stereo-DXD-20secs.mqa.wav: WARNING: skipping unknown chunk 'fact' (use --keep-foreign-metadata to keep)                                                    2L-053_04_stereo-DXD-20secs.mqa.wav: wrote 3394644 bytes, ratio=0.641

Now look at the file sizes:

$ du -h --si 2L-053_04_stereo-DXD.mqa-16in24bit.flac 2L-053_04_stereo-DXD-20secs.mqa.flac
1.7M    2L-053_04_stereo-DXD.mqa-16in24bit.flac
3.4M    2L-053_04_stereo-DXD-20secs.mqa.flac


So this means that only the redbook part of the MQA distribution file compresses with flac like normal music. The secret bits don't compress and therefore the filesize goes x2. While this is nothing new, the fact that it results in such a small difference in spectrum, makes it a waste of diskspace.

Most likely this is how MQA CD gets away with it. If someone can get me an MQA cd, we can do some measurements.

Furthermore, compressing the unfolded versions (both 24/88.2 wav) back to flac, shows a small difference is file size:
 

$ du -h --si 2L-053_04_stereo-DXD.mqa-16in24bit-unfolded.flac unfold-official-20secs.flac
5.7M    2L-053_04_stereo-DXD.mqa-16in24bit-unfolded.flac
6.0M    unfold-official-20secs.flac

 

This suggests a 5% reduction in entropy in the MQA decoder output, when the decoder did not have the 8 LSB bits to work with. But as the flac version of the input file for the decoder is 50% smaller for the 16 bits truncated version, this means MQA is not very efficient.

Also note that flac can't compress the output of the decoder back to the MQA flac distribution file sizes. This suggest garbage is added which does not compress well (garbage because of aliasing and higher noise floor).



 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
53 minutes ago, FredericV said:

Also note that flac can't compress the output of the decoder back to the MQA flac distribution file sizes. This suggest garbage is added which does not compress well (garbage because of aliasing and higher noise floor).


The fact that the flac encode of the MQA decoder output is almost twice the size of the distribution is logical: MQA uses leaky filters which mirror the baseband into the ultrasonics. So flac has to encode the same signal twice, once at normal amplitude, and it's attenuated copy (alias), which explains the almost double file size.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
2 minutes ago, mansr said:

If the expected markers aren't there, it is simply ignored. It has to work this way. If some software (player/OS) has mangled the lowest bits for whatever reason, the DAC still must play something.

 

In Bob's official explication, truncating to 16 bits is supported. Some excuse about automotive and bluetooth which can truncate bit depth. But I can't find the page where this was posted. All I remember is the fact that it was once stated, so this was the reason for testing it.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

This was on public facebook, post shared with public. I first thought I needed new glasses, but no, it's in there:

image.thumb.png.b70e6cb02c896ae98924aaadbb9f205f.png

 

So why not get rid of all those nasty ultrasonics? Yup he wrote it: Mr MQA aka Peter Veth aka Peter Markus, who leads a closed FB group about MQA wrote that MQA works so well because it removes ultrasonics, and as a result sounds better.

He sure must now respect me. My perl script reduces the MQA flac file size to 50% and wav file size to 2/3 and further reduce the presence of ultrasonics that nobody wants ;)
 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
6 hours ago, miguelito said:

It would be quite interesting to compare an MQA CD rip with the equivalent non-MQA rip. I bet you the diff is eq.


How many MQA cd's are there ? 5...10 ?
How many MQA albums on Tidal are there? A few thousand.

While MQA could probably design a different bit allocation scheme for 16 bit distribution files, they also have stated that truncating 24 bit files to 16 bit also works, so Occam's razor dictates they have just truncated the 24 bit version for MQA CD.

It would not make much sense to do such an engineering effort for a few CD's.
 

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment
  • 2 weeks later...

Members of the closed MQA facebook group are asking if this research has been peer reviewed.

It just proves that they are not looking for the truth, but remain in their MQA bubble.

Others have already confirmed on CA that the crippled files authenticate.

Talking to MQA members from the closed group is like talking with flat earthers. They suggested that we contact MQA. They are blind and don't want the truth.

Designer of the 432 EVO music server and Linux specialist

Discoverer of the independent open source sox based mqa playback method with optional one cycle postringing.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...