Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

219 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WpfMusicPlayer Icon

WpfMusicPlayer

zread Telegram FFmpeg Build System GitHub top language GitHub commit activity GitHub License GitHub Issues GitHub Pull Requests GitHub Actions Workflow Status State-of-the-art Shitcode

A simple music player, focused on audio pipeline and lyric experience.

Notice

  • This project has entered maintenance mode.
  • All planned TODO items and future feature development will be carried out in a new project.
  • No further functional updates will be made to this repository, but bug fixes will continue to be accepted.
  • New project will remove all windows dependencies, and become cross-platform deployable.

Technical stack

  • Frontend: WPF / C#
  • Backend: Standard C++, C++/CLI wrapper isolated inside MusicPlayerNative/Managed
  • Native Libraries: FFmpeg, FAudio, OpenSSL, RapidJSON, cpp-base64, kissfft, uchardet, libiconv, NCNN, doctest(for native unittest)
  • Framework: .NET 10.0 (Long Term Support)
  • Minimum Supported Windows Version: Windows 10 2004 (build 10.0.19041.0)
  • Target Windows Version: Windows Latest (build 10.0.26100.0)

Screenshot

JPN lyric, CHS translation and Romaji romanization enabled

screenshot-1

CHS lyric, Jyutping romanization enabled

screenshot-2

ENG lyric, CHS translation enabled

screenshot-3

Playlist

playlist

Equalizer

equalizer

Mini player

miniplayer

Current implemented features:

  • Configurable audio output sample rate, from 8kHz (telephone quality) to 192kHz (Hi-Res audio) (only in FAudio shared mode)
  • Exclusive audio output and bit-perfect decode-play pipeline (only in WASAPI exclusive mode)
  • Play/pause/stop
  • Seek bar
  • Volume control
  • Full ML-based Lrc Parser, GPU-accelerated with high accuracy (support translation, JPN romanization detection)
  • LRC encoding sniffing based on uchardet & libiconv
  • Extended Lyric display (support ESLyric with karaoke effect)
  • Portrait mode & Animated switch
  • NCM file decrypt & play
  • Windows System Media Transport Controls (SMTC) support
  • 10-band equalizer support
  • FFT Execution and spectrum analyzer support
  • Playing times record & display
  • Playlist support (.wppl format, in standard JSON)
  • Lyric Intermediate JSON format, fully editor-compatible and high accuracy

Still work in progress. 3rd party libraries are managed by vcpkg.

TODO List:

  • UI Refractor (UI, from @Baicaiye)
  • remove C++/CLI, rewrite MusicPlayerLibary to pure C++ implementation
  • isolate neseccary Windows API Calls, write cross-platform alternatives
  • Migrating to Avalonia, extend platform support to Linux / macOS
  • PcmProvider / PcmSubmitter / PcmObserver refractor, plugable, preemptive rewrite
  • Extract MusicPlayerLibrary into an audio middleware
  • You can submit your ideas in issues, or contact me directly by email.

How to build?

You can download the latest build from Github CI/CD, but if you want to build by yourself, follow the instruction below.

  1. Clone the repository
  2. Install vcpkg and integrate it with Visual Studio 2026
  • You need the following workloads:

Desktop development with C++
Desktop development with .NET

  • Execute vcpkg integrate install in the Developer Powershell
  1. Open the solution file WpfMusicPlayer.slnx in Visual Studio
  • If you are using Qualcomm 8cx series or X Elite Series CPU, Select the WpfMusicPlayer.ARM64.slnx solution file
  1. Build the solution.
  • The build system will automatically download and build the required dependencies using vcpkg.

For users using ARM64 solution with non-English environment:

  • FFmpeg may fail to build under non‑English locales.
  • You can switch your Visual Studio language to en_US and try rebuilding of this solution.

For users using Windows 10 with Intel Hybrid-Architecture CPU (post Alder-lake):

  • On Windows 10, FFmpeg build threads may be scheduled only to E‑cores, causing extremely slow builds.
  • Execute the following command:
powercfg -attributes SUB_PROCESSOR 7f2f5cfa-f10c-4823-b5e1-e93ae85f46b5 -ATTRIB_HIDE
powercfg -attributes SUB_PROCESSOR 93b8b6dc-0698-4d1c-9ee4-0644e900c85d -ATTRIB_HIDE
powercfg -attributes SUB_PROCESSOR bae08b81-2d5e-4688-ad6a-13243356654b -ATTRIB_HIDE
  • the enable the following config inside your control panel's Power Options:

Heterogeneous policy in effect -> Use heterogeneous policy 0
Heterogeneous thread scheduling policy -> Prefer performant processors
Heterogeneous short running thread scheduling policy -> Prefer performant processors

  1. Copy the built DLLs from x64(ARM64)/Debug(Release) to the same folder as the built executable.
  2. Enjoy!
  • Notice: if your audio output sample rate is configured below 44100 Hz, some equalizer band will be disabled, preventing the introduction of high-frequency noise.
  • This behavior complies with the Nyquist-Shannon sampling theorem.

How to contribute?

  1. Write a clear issue
  2. Fork the repository, create your new fix/feature, then PR
  3. Donate to 爱发电

对中国大陆用户:

您可以通过 GitCode 镜像 访问本项目。

About Intermediate Lyric Format (WPLRC v2)

Icon Copyright Notice

Model Weight README & Copyright Notice

  • File Path: WpfMusicPlayer/lyric_lang_vocab.bin
  • File Path: WpfMusicPlayer/lyric_lang_mlp.ncnn.bin
  • File Path: WpfMusicPlayer/lyric_lang_mlp.ncnn.param
  • File Path: WpfMusicPlayer/song_structure_mlp.ncnn.bin
  • File Path: WpfMusicPlayer/song_structure_mlp.ncnn.param
  • See: README.modelweights.md

If you require:

  • higher recognition accuracy,
  • a smaller model, or
  • a model trained on your own dataset,
  • convert the old dlib .dat model weight into ncnn format,

you can retrain the network using the scripts provided in the following repository:

dlib_train

License

  • This software is provided under:

SPDX-License-Identifier: MIT

FFmpeg notice

FFmpeg can be built under LGPL or GPL, depending on the configuration.

  • If you link FFmpeg in LGPL mode, you may distribute the application under MIT without additional requirements.
  • If you link FFmpeg in GPL mode, the entire application becomes GPL‑compatible, and you must distribute the full source code of this project together with the executable.

Make sure you understand the implications before distributing a GPL‑linked build.

MIT repository status remains unchanged

Distributing a GPL‑linked build does not change the license of this repository.
The upstream source code remains under the MIT License, and contributors may continue to use, modify, and distribute it under MIT.
Only the specific binary distribution that links against GPL‑configured FFmpeg is subject to GPL requirements.

LGPL compliance notice

When distributing builds that statically link FFmpeg under LGPL mode, you must ensure end users can relink the application with a modified version of FFmpeg. This can be achieved by either:

  • Providing application object files (excluding FFmpeg) so users can relink, or
  • Publishing the full source code of this project under MIT, which allows users to rebuild with their own FFmpeg version.

FFmpeg source code is available at https://ffmpeg.org.
The LGPL license text is included in LICENSE.thirdparty.txt.

Get in touched with author:

Credit

Thanks to all the contributors of this project:

From ffmpeg_xaudio2 pure CLI demo, to MFCMusicPlayer, then WpfMusicPlayer.
This is an incredible journey with your support.
Let's meet at the next station, Avalonia, with all platform support, richer user interface, native i18n support, and brand new WPLRC v3 format, which fully preserves the semantic information of the lyric.
Thank you!

About

Music player written with ffmpeg, C++/CLI, and WPF. WIP.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages