Francealexpado/hoyoverse-music-unpacker
Extract music from Hoyoverse's games. Support Genshin Impact, Honkai Star Rail and Honkai Impact
Featured achievements
The project's latest awards
#1 Repository of the month
#1 Repository of the month
#1 Repository of the month
Hoyoverse Audio Unpacker
Thanks to MeguminSama's project which has been a huge source of inspiration for this.
- The project
- How to extract musics
- Requirements and installation
- How to use it
- About update packages
- Contributing
- Feedbacks
- External executables
1. The project
This project was made to extract music file from Genshin Impact, but later updated to support other Hoyoverse's title.
2. How to extract musics
| Game | File Extraction | Update Package Support |
|---|---|---|
| Genshin Impact | ✅ Supported | Support Removed |
| Honkai Star Rail | ✅ Supported | Support Removed |
| Honkai Impact | ✅ Supported | Support Removed |
| Zenless Zone Zero | ✅ Supported | Not Supported |
More about update package support here
Requirements and installation
- Download and install Java 17 or newer from the official website.
- Download the extractor from the release page.
- Extract the zip file downloaded anywhere on your computer. The directory does not matter.
How to use it
You'll need to use the terminal to use the extractor. If you're not familiar on how to open the terminal in the directory you are in:
- Open the directory where the
hoyoverse-music-unpacker.jarfile and thewrappersdirectory are. - Hold the
Shiftkey and right-click on an empty space in the directory. - Select the
Open PowerShell window here(label might vary slightly depending on your Windows version)
-a, --all Search for all valid audio files (not just music)
-f, --filter=<customFileFilter>
Input a custom file filter as regex
-g, --game=<gameFolder> Installation folder of the game
-h, --help Show this help message and exit.
-o, --output=<outputFolder>
Output folder for the extracted files
-t, --threads=<threadCount>
Number of parallel thread that can be used.
-V, --version Print version information and exit.
Note: --all and --filter cannot be used at the same time. When both are supplied, --filter will be ignored, giving
priority to --all. Default file filters are provided on best effort basis, but some games might have some music files in unknown
files or mix SFX and Musics in a single source file.
Important: Please note that --game option must be the path leading to the game, not the launcher. Here is
a table to better explain what I mean (using my own install path, but you'll get the idea):
| Game | Wrong Path (launcher) | Right path (game) |
|---|---|---|
| Genshin Impact | D:\Games\Genshin Impact | D:\Games\Genshin Impact\Genshin Impact game |
| Honkai Star Rail | D:\Games\Star Rail | D:\Games\Star Rail\Games |
| Honkai Impact | D:\Games\Honkai Impact 3rd glb | D:\Games\Honkai Impact 3rd glb\Games |
You might have a different folder name with the new launcher, but the rule is you have to select the folder containing the game executable.
Extracting all musics
java -jar hoyoverse-music-unpacker.jar --game="D:\Games\Genshin Impact"
You have to replace the path of --game by your own. " around the game path are important !
Once finished, all musics will be present in the extracted folder.
You can also change the output directory by using the --output option. Example:
java -jar hoyoverse-music-unpacker.jar --game="D:\Games\Genshin Impact" --output="D:\Documents\Musics"
This will extract all music in D:\Documents\Musics.
3. About update packages
[!IMPORTANT] Since HMU version 1.5, support for update package has been dropped.
Hoyoverse changed drastically their way of handling pre-download which made this program incompatible, and I don't have the time nor the motivation to search for a solution. You are welcome to try and open a pull request though.
4. Contributing
I'm open for contribution, but if your contribution is a new feature instead of a bugfix, it may be wise to open a discussion here before to avoid any potential waste of time.
5. Feedback
For feature requests and question, please open a discussion here, for bug report please open an issue.
6. External executables
- QuickBMS: Used to unpack PCK files to WEM files
- VGMStream: Used to convert WEM files to WAV files
- hdiffpatch: Used to patch PCK files with the
hdifffiles in the update package
Similar Projects
Discover other similar projects and AI models.
API wrapper for HoYoLAB/Miyoushe API built on asyncio and pydantic.
Easiest, full free, and no BS Hoyolab daily check-in using GitHub Actions. Supports Zenless Zone Zero, Honkai: Star Rail, Genshin Impact, Honkai Impact 3rd, and Tears of Themis.
Fan-made shaders for Unity URP attempting to replicate the shading of Honkai: Star Rail.
Shader for Unity (Built-in Rendering Pipeline) attempting to replicate the shading of miHoYo developed games. This is for datamined assets, not custom-made ones nor the MMD variants.
A feature-rich, easy to use, beautifully designed Discord bot made for Hoyoverse gamers
Scanner for exporting light cone, relic, and character data from Honkai: Star Rail to JSON format.