Skip to content

jieran233/MyLyric

Repository files navigation

MyLyric

Add live display of lyrics to music files downloaded from NetEase Cloud Music (163 key included in metadata) that are being played in DeaDBeeF (or foobar2000)

How it works

See "Acknowledgments" below, I've sorted them according to the process, you should get a rough idea. In fact, the way it is implemented is quite funny, but it can work

How to use

For Linux GNOME, this extension needs to be installed additionally: jieran233/gnome-get-all-titles

git clone https://github.com/jieran233/gnome-get-all-titles.git
cd gnome-get-all-titles
make && make install

Edit preferences of DeaDBeeF (Edit > Preferences > UI/Misc > Player)

  • Title bar text during playback: \<DeaDBeeF\> {"status": "$if(%ispaused%,paused,playing)", "time": "%playback_time%/%length%", "path": "%path%"} \</DeaDBeeF\>
  • Title bar text when stopped: \<DeaDBeeF\>\</DeaDBeeF\>

Clone this repo, create venv and activate it, install requirements. Run python main.py

Play music files downloaded from NetEase Cloud Music (163 key included in metadata) in DeaDBeeF

Check http://127.0.0.1:5000, use an old Android mobile phone for showing lyrics, or continue to the following chapter

Embed web browser in desktop as wallpaper for showing lyrics (for Linux)

Choose a background image as wallpaper for the web page, copy it to static/images and rename to background (no extension)

You should find a satisfied position and font size for lyrics display element in your wallpaper

  • First, modify line 154 return render_template('index.html', in main.py, replace 'index.html' to 'index-wallpaper.html'
  • Modify line 139 .container {} in templates/index-wallpaper.html for position of lyrics
  • Modify line 60 SCALE= in templates/index-wallpaper.html for font size scaling of lyrics
  • Modify line 180 <div class="container"> in templates/index-wallpaper.html to <div class="container no-select"> if you want to make lyrics not selectable

Run main.py, use browser F12 DevTool for quick preview changes, and write results back to index-wallpaper.html

Check this project: jeffshee/hidamari, install it by following its README

Open Hidamari in your app launcher, set Web Page URL as http://127.0.0.1:5000

Autostart after login (for Linux)

Copy mylyric.desktop.template and rename the copy to mylyric.desktop, edit its Exec=

Move mylyric.desktop to ~/.config/autostart

Attention that it can impact performance

Acknowledgments

In building this project, we would like to acknowledge the contributions of the following references:

163 key decrypting references:

Lyric parsing references:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published