Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A fast, lightweight cross-os toolkit for detecting, analyzing, organizing, and exporting MQA-encoded FLAC files.

Notifications You must be signed in to change notification settings

Angel2mp3/MQA-Toolkit

Repository files navigation

🎶 MQA-Toolkit 🛠️

A comprehensive toolkit for identifying, analyzing, organizing, and exporting MQA (Master Quality Authenticated) encoded FLAC files.

What is MQA?

MQA (Master Quality Authenticated) is an audio format developed by Meridian Audio that was marketed as a way to deliver “studio-quality” sound in a smaller file size. MQA streams are typically packaged inside FLAC files, but they rely on special metadata and a proprietary encoding process that is fundamentally lossy. The creators of MQA promoted it as superior to true lossless FLAC and convinced some streaming services such as Tidal to adopt it. However, the format achieved its smaller size by discarding parts of the audio, claiming that their proprietary decoders could “restore” that missing information during playback. The reality is that once audio data is removed, it cannot be perfectly reconstructed, meaning MQA is not truly lossless — and in many cases, its output measures and sounds worse than a standard 320 kbps MP3.

Features

Core Functionality

  • Deep audio analysis - Detects embedded MQA without metadata tags
  • Identify MQA and MQA Studio encoded FLAC files
  • Display original sample rate information (44.1kHz to 384kHz)
  • Fast and efficient scanning (only scans first 3 seconds per file)
  • Scan individual folders or recursively scan all subfolders

Export & Organization

  • Export TXT - Easily readable text file with full scan results
  • Export CSV - Spreadsheet-compatible format for data analysis
  • Export JSON - Complete metadata export with technical details
  • Copy to Clipboard - Quick copy for pasting into documents
  • Extract MQA Files - Copy MQA files to new location preserving folder structure

Interface

  • Modern dark mode interface
  • Cross-platform - Works on Windows, macOS, and Linux
  • Real-time progress tracking
  • Threaded operations for responsive UI

Quick Start

Windows

  1. Install: Double-click INSTALL.bat
  2. Run: Double-click RUN.bat

macOS/Linux

  1. Install: Run chmod +x *.sh && ./install.sh
  2. Run: Run ./run.sh

Or manually: pip install -r requirements.txt && python3 mqa_finder.py

Using the Application

1. Scan for MQA Files

  1. Click "Select Folder" to choose a directory containing FLAC files
  2. Check "Scan subfolders recursively" to include all subdirectories
  3. Click "Scan for MQA Files" to start scanning
  4. View results with file details, MQA type, and sample rates

2. Export Results

After scanning, use the export buttons:

  • Export TXT - Easily readable text file
  • Export CSV - Spreadsheet format (Excel, Google Sheets)
  • Export JSON - Complete technical data
  • Copy - Copy results to clipboard

3. Extract MQA Files

The "Extract Files" button copies all found MQA files to a new location while preserving the folder structure:

Example:

Source: Music/Playlists/Cool Songs/track1.flac (MQA)
        Music/Playlists/Cool Songs/track2.flac (not MQA)
        Music/Playlists/Jazz/track3.flac (MQA)

Destination: MQA_Collection/Cool Songs/track1.flac
             MQA_Collection/Jazz/track3.flac

This makes it easy to organize your MQA files while keeping them organized by playlist/folder!

How MQA Detection Works

The application uses deep audio analysis to identify MQA files by:

Primary Detection (Audio Sample Analysis)

  • Decodes FLAC files to raw PCM audio samples
  • XORs left and right stereo channels
  • Searches for the 36-bit MQA sync word (0xbe0498c88) embedded in the audio
  • Checks multiple bit positions (16-23) to catch different encoder implementations
  • Extracts original sample rate from embedded metadata (supports 44.1kHz to 384kHz)
  • Detects MQA Studio certification via provenance bits

Fallback Detection (Metadata Tags)

  • If audio analysis doesn't find the sync word, checks metadata tags: ENCODER, MQAENCODER, ORIGINALSAMPLERATE
  • Useful for files with proper tagging

This dual-layer approach ensures both embedded MQA (without tags) and tagged MQA files are detected.

Project Structure

MQA-Toolkit/
├── mqa_finder.py              # Main application
├── requirements.txt            # Python dependencies
├── README.md                   # This file
├── .gitignore                  # Git ignore rules
│
├── Quick Launchers (Root):
├── INSTALL.bat                 # Windows quick installer
├── RUN.bat                     # Windows quick launcher
├── install.sh                  # macOS/Linux installer
├── run.sh                      # macOS/Linux launcher
│
└── scripts/                    # Platform-specific scripts
    ├── windows/
    │   ├── install_dependencies.bat
    │   └── run.bat
    └── unix/
        ├── install_dependencies.sh
        └── run.sh

References

License

This project is open source and available for personal and educational use.

About

A fast, lightweight cross-os toolkit for detecting, analyzing, organizing, and exporting MQA-encoded FLAC files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published