Convert your QQ Music VIP downloads to standard FLAC files so you can play them in any music player.
Pre-fetch decryption keys for an entire folder of songs to enable offline decryption later.
Copy cached decryption keys to another computer that does not have QQ Music installed.
Requires a VIP subscription to QQ Music and a Windows machine with QQ Music running for initial authentication.
qmdec is a command-line tool for Windows that converts the encrypted music files downloaded by QQ Music (a Chinese music streaming service) into standard audio files you can play in any music player. When QQ Music's VIP subscribers download songs, the files are saved in proprietary encrypted formats (.mflac and .mgg) that only play inside the QQ Music app itself. This tool decrypts those files and converts them to standard FLAC or OGG audio, and it also fetches and writes the song's title, artist, album, and cover art into the output file automatically. The tool works in three steps. First, you run an authentication command while QQ Music is open and logged in. The tool reads the session credential directly from QQ Music's running process memory using a standard Windows system call, so there is nothing to copy or paste manually. Second, that credential is used to contact QQ Music's API to retrieve the decryption key for each song file. Those keys are saved locally. Third, the files are decrypted using the same RC4-based cipher that QQ Music uses internally. Once the decryption keys are cached locally, you can decrypt files without an internet connection and without QQ Music running. The cached keys do not expire, so they can also be copied to another computer that does not have QQ Music installed. A separate cache-keys command lets you pre-fetch keys for an entire folder at once. Installation is either a standalone Windows executable (no Python required) or a pip package for Python 3.10 and above. The README is bilingual, with the full documentation available in both English and Chinese. A VIP subscription to QQ Music is required to use the tool, because the encrypted files themselves are only available to paying subscribers and the decryption key API checks for VIP status.
← sophomoresty on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.