Deco + Convert(解密+转换音乐)
Download Music from QQ music
Download the raw music usually in .mflac
or something else type.
Unlock the music
For .mflac
type
We will use um
command
- where you can check Unlock Music git repo here um/web: Unlock Music - Web Edition - web - Unlock Music Git Service
Install the CLI through command
go install unlock-music.dev/cli/cmd/um@master
From um/cli: Unlock Music Project - CLI Edition - cli - Unlock Music Git Service
When you run go install <module>@<version>
for a Go module, it installs the binary to your $GOPATH/bin
directory. If GOPATH
is not explicitly set, by default, this path is $(go env GOPATH)/bin
.
For the command you provided:
go install unlock-music.dev/cli/cmd/um@master
It will install a binary named um
to your $GOPATH/bin
directory.
To find and run this binary on macOS:
-
Locate the binary:
If you have set a custom GOPATH:
echo $GOPATH/bin/um
If you're using the default GOPATH:
echo $(go env GOPATH)/bin/um
This will output the path to the
um
binary. -
Run the binary directly using the path:
For example, if the output from the previous step was
/Users/yourusername/go/bin/um
, you can run:/Users/yourusername/go/bin/um
-
Add
$GOPATH/bin
to your PATH for convenience:To easily run
um
(and other Go binaries you install) without specifying the full path, you can add$GOPATH/bin
to your PATH.For the default shell (
zsh
on newer versions of macOS):echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc source ~/.zshrc
After doing this, you should be able to simply run:
um
... from anywhere in the terminal.
SO, use um -i /dir
for unlocking!
For .mggh
or some files that cannot deco by CLI
You will use online key to deco.
Website: 音乐解锁 - Unlock Music
Using this way to find the key:
Mac 客户端使用 mmkv 数据库储存密钥。
该密钥文件通常存储在下述路径:
~/Library/Containers/com.tencent.QQMusicMac/Data/Library/Application Support/QQMusicMac/mmkv/MMKVStreamEncryptId
导入密钥
-
选中并复制上述的
MMKVStreamEncryptId
文件路径 -
点击上方的「文件选择区域」,打开「文件选择框」
-
按下「shift + command + G」组合键打开「路径输入框」
-
粘贴之前复制的
MMKVStreamEncryptId
文件路径 -
按下「回车键」确认。
Convert File to Apple Music can Accept
Now we will use ffmpeg
To .m4a
lossless type
If you want to convert a .flac
file to a lossless format that Apple Music (or the Apple ecosystem) can play, you'd typically convert it to Apple's ALAC (Apple Lossless Audio Codec) format, which uses the .m4a
file extension.
You can use ffmpeg
to do this conversion. Here's how you can achieve it:
ffmpeg -i input.flac -c:a alac output.m4a
Replace input.flac
with the path to your source FLAC file and output.m4a
with the desired name for the output ALAC file.
After the conversion, you should be able to play output.m4a
in Apple Music, iTunes, or any other Apple software/hardware that supports ALAC.
Note: Before you start the conversion, make sure you have ffmpeg
installed on your system. If not, you can install it using a package manager like Homebrew:
brew install ffmpeg
Convert Many files at same time
If you have multiple .flac
files in the same directory and you want to convert them all to the ALAC format using ffmpeg
, you can use a simple loop.
Here's how you can achieve this:
- Using a Bash shell (which is available on macOS and most Linux distributions):
for i in *.flac; do
ffmpeg -i "$i" -c:a alac "${i%.flac}.m4a"
done
- If you are using Windows Command Prompt:
First, change the file extension to .m4a
:
for %i in (*.flac) do ffmpeg -i "%i" -c:a alac "%~ni.m4a"
- If you are using Windows PowerShell:
Get-ChildItem -Filter *.flac | ForEach-Object { ffmpeg -i $_.FullName -c:a alac ($_.BaseName + ".m4a") }
For all these commands:
- Each
.flac
file in the current directory will be converted to ALAC format with a.m4a
extension. - The original
.flac
files will not be modified or deleted. If you wish to remove them after confirming the.m4a
files were created successfully, you can do so manually or with a suitable command. - Ensure you have backup copies of your
.flac
files before making any modifications or deletions.